rARMA {pdSpecEst}R Documentation

Simulate vARMA(2,2) time series

Description

rARMA generates d-dimensional time series observations from a vARMA(2,2) (vector-autoregressive-moving-average) process based on Gaussian white noise for testing and simulation purposes.

Usage

rARMA(n, d, Phi, Theta, Sigma, burn = 100, freq = NULL)

Arguments

n

number of time series observations to be generated.

d

dimension of the multivariate time series.

Phi

a (d, d, 2)-dimensional array, with Phi[, , 1] and Phi[, , 2] the autoregressive (AR) coefficient matrices.

Theta

a (d, d, 2)-dimensional array, with Theta[, , 1] and Theta[, , 2] the moving-average (MA) coefficient matrices.

Sigma

the covariance matrix of the Gaussian white noise component.

burn

a burn-in period when generating the time series observations, by default burn = 100.

freq

an optional vector of frequencies, if !is.null(freq) the function also returns the underlying Fourier spectral matrix of the stationary generating process evaluated at the frequencies in freq.

Value

The function returns a list with two components:

X

generated time series observations, the d columns correspond to the components of the multivariate time series.

f

if !is.null(freq), f is a (d, d, length(freq))-dimensional array corresponding to the underlying Fourier spectral matrix curve of (d,d)-dimensional HPD matrices evaluated at the frequencies in freq. If is.null(freq), f is set to NULL.

References

Brockwell P, Davis R (2006). Time Series: Theory and Methods. Springer, New York.

Examples

## ARMA(1,1) process: Example 11.4.1 in (Brockwell and Davis, 1991)
freq <- seq(from = pi / 100, to = pi, length = 100)
Phi <- array(c(0.7, 0, 0, 0.6, rep(0, 4)), dim = c(2, 2, 2))
Theta <- array(c(0.5, -0.7, 0.6, 0.8, rep(0, 4)), dim = c(2, 2, 2))
Sigma <- matrix(c(1, 0.71, 0.71, 2), nrow = 2)
ts.sim <- rARMA(200, 2, Phi, Theta, Sigma, freq = freq)
ts.plot(ts.sim$X) # plot generated time series traces.


[Package pdSpecEst version 1.2.4 Index]