gen_arma: Generate Autoregressive Order p - Moving Average Order q...

Description Usage Arguments Details Value Process Definition Generation Algorithm Examples

View source: R/RcppExports.R

Description

Generate an ARMA(p,q) process with supplied vector of Autoregressive Coefficients (φ), Moving Average Coefficients (θ), and σ^2.

Usage

1
gen_arma(N, ar, ma, sigma2 = 1.5, n_start = 0L)

Arguments

N

An integer for signal length.

ar

A vec that contains the AR coefficients.

ma

A vec that contains the MA coefficients.

sigma2

A double that contains process variance.

n_start

An unsigned int that indicates the amount of observations to be used for the burn in period.

Details

For AR(1), MA(1), and ARMA(1,1) please use their functions if speed is important as this function is designed to generate generic ARMA processes.

Value

A vec that contains the generated observations.

Process Definition

The Autoregressive order p and Moving Average order q (ARMA(p,q)) process with non-zero parameters phi[i] in (-1,1) for the AR components, theta[j] in (-1,+1) for the MA components, and sigma^2 in R^{+}. This process is defined as:

X[t] = sum(phi[p]*X[t-1]) + sum(theta[q]*W[t-1]) + W[t]

where

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

Generation Algorithm

The innovations are generated from a normal distribution. The σ^2 parameter is indeed a variance parameter. This differs from R's use of the standard deviation, σ.

Examples

1
gen_arma(10, c(.3,.5), c(.1), 1, 0)

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