gen_arma11: Generate an ARMA(1,1) sequence

View source: R/RcppExports.R

gen_arma11R Documentation

Generate an ARMA(1,1) sequence

Description

Generate an ARMA(1,1) sequence given \phi, \theta, and \sigma^2.

Usage

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 {\rm I\!R}^{+}. This process is defined as:

{X_t} = {\phi _1}{X_{t - 1}} + {\theta _1}{\varepsilon_{t - 1}} + {\varepsilon_t}

, where

{\varepsilon_t}\mathop \sim \limits^{iid} N\left( {0,\sigma^2} \right)

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.


simts documentation built on Aug. 31, 2023, 5:07 p.m.