sim_varma | R Documentation |
Simulate from a Vector Autoregressive Moving Average (VARMA) model. Note that no test for model stationarity is performed.
sim_varma(model, n, d, rand.gen = rmvnorm, burnin = 10000, ...)
model |
A list with component |
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 |
If n=1 a vector of length d, otherwise an n by d matrix with one sample in each row.
arima.sim to simulate from univariate ARMA models
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.