sim_varma {beyondWhittle}R Documentation

Simulate from a VARMA model

Description

Simulate from a Vector Autoregressive Moving Average (VARMA) model. Note that no test for model stationarity is performed.

Usage

sim_varma(model, n, d, rand.gen = rmvnorm, burnin = 10000, ...)

Arguments

model

A list with component ar and/or ma giving the VAR and VMA coefficients respectively. An empty list gives an VARMA(0, 0) model, that is white noise.

n

sample size

d

positive integer for the dimensionality

rand.gen

random vector generator, function of type rand.gen(n, d, ...)

burnin

length of burnin period (initial samples that are discarded)

...

further arguments to be parsed to rand.gen

Value

If n=1 a vector of length d, otherwise an n by d matrix with one sample in each row.

See Also

arima.sim to simulate from univariate ARMA models

Examples

## Not run: 
# Example: Draw from bivariate normal VAR(2) model
ar <- rbind(c(.5, 0, 0, 0), c(0, -.3, 0, -.5))
Sigma <- matrix(data=c(1, .9, .9, 1), nrow=2, ncol=2)
x <- sim_varma(n=256, d=2, model=list(ar=ar))
plot.ts(x)

## End(Not run)

[Package beyondWhittle version 1.1.1 Index]