Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

gen_ma1

Generate an Moving Average Order 1 (MA(1)) Process


Description

Generate an MA(1) Process given θ and σ^2.

Usage

gen_ma1(N, theta = 0.3, sigma2 = 1)

Arguments

N

An integer for signal length.

theta

A double that contains moving average.

sigma2

A double that contains process variance.

Details

The function implements a way to generate the x[t] values without calling the general ARMA function.

Value

A vec containing the MA(1) process.

Process Definition

The Moving Average order 1 (MA(1)) process with non-zero parameter theta in (-1,+1) and sigma^2 in R^{+}. This process is defined as:

x[t] = W[t] + theta*W[t-1]

, where

W[t] ~ N(0,sigma^2) iid

Generation Algorithm

The function first generates a vector of white noise using gen_wn and then obtains the MA values under the above equation.

The X[0] (first value of X[t]) is discarded.


simts

Time Series Analysis Tools

v0.1.1
AGPL-3 | file LICENSE
Authors
Stéphane Guerrier [aut, cre, cph], James Balamuta [aut, cph], Roberto Molinari [aut, cph], Justin Lee [aut], Yuming Zhang [aut], Wenchao Yang [ctb], Nathanael Claussen [ctb], Yunxiang Zhang [ctb], Christian Gunning [cph], Romain Francois [cph], Ross Ihaka [cph], R Core Team [cph]
Initial release
2019-07-21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.