gen_arma11: Generate an ARMA(1,1) sequence

Description Usage Arguments Details Value Process Definition Generation Algorithm Examples

View source: R/RcppExports.R

Description

Generate an ARMA(1,1) sequence given φ, θ, and σ^2.

Usage

1
gen_arma11(N, phi = 0.1, theta = 0.3, sigma2 = 1)

Arguments

N

An integer for signal length.

phi

A double that contains autoregressive.

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 Autoregressive order 1 and Moving Average order 1 (ARMA(1,1)) process with non-zero parameters phi in (-1,1) for the AR component, theta in (-1,+1) for the MA component, and sigma^2 in R^{+}. This process is defined as:

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

, 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 ARMA values under the above equation.

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

Examples

1
gen_ma1(10, .2, 1.2)

SMAC-Group/gmwm documentation built on Sept. 11, 2021, 10:06 a.m.