Learn R Programming

sparsevar (version 0.0.3)

simulateVAR: VAR simulation

Description

This function generates a simulated multivariate VAR time series.

Usage

simulateVAR(N = 100, p = 1, nobs = 250, rho = 0.5, sparsity = 0.05,
  method = "normal", covariance = "toeplitz")

Arguments

N
dimension of the time series.
p
number of lags of the VAR model.
nobs
number of observations to be generated.
rho
base value for the covariance matrix.
sparsity
density (in percentage) of the number of nonzero elements of the VAR matrices.
method
which method to use to generate the VAR matrix. Possible values are "normal" or "bimodal".
covariance
type of covariance matrix to use in the simulation. Possible values: "toeplitz", "block1", "block2" or simply "diagonal".

Value

  • A a list of NxN matrices ordered by lag

    data a list with two elements: series the multivariate time series and noises the time series of errors

    S the variance/covariance matrix of the process