# dataVAR1: Sample data from a VAR(1) model In wvanwie/ragt2ridges: Ridge Estimation of Vector Auto-Regressive (VAR) Processes

## Description

Sample data from a VAR(1) model.

## Usage

 1 dataVAR1(n, T, A, SigmaE, TburnIn=1000) 

## Arguments

 n Positive numeric of length one: number of individuals to be sampled. T Positive numeric of length one: number of time points (per individual) to be sampled. A Matrix \mathbf{A} of autoregression parameters. SigmaE Covariance matrix of the errors (innovations). TburnIn Positive numeric of length one: number of time points used to burn in the process.

## Value

A three dimensional array containing the data. The first, second and third dimensions correspond to covariates, time and samples, respectively.

## Author(s)

Wessel N. van Wieringen <[email protected]>

ridgeVAR1.
  1 2 3 4 5 6 7 8 9 10 11 # set dimensions (p=covariates, n=individuals, T=time points) p <- 3; n <- 4; T <- 10 # set model parameters SigmaE <- diag(p)/4 A <- matrix(c(-0.1, -0.3, 0.6, 0.5, -0.4, 0, 0.3, -0.5, -0.2), byrow=TRUE, ncol=3) # generate data Y <- dataVAR1(n, T, A, SigmaE)