powered by
Simulate data of size n and dimension p from a VAR1 model (without change point) with Gaussian i.i.d. error terms.
simu.VAR1(sigma, p, n, A, vzero = NULL)
A p-by-n matrix.
A numeric scalar representing the standard deviation of error terms.
numeric
An integer scalar representing dimension.
integer
An integer scalar representing sample size.
A numeric p-by-p matrix representing the transition matrix of the VAR1 model.
A numeric vector representing the observation at time 0. If vzero = NULL,it is generated following the distribution of the error terms.
vzero = NULL
Daren Wang
Wang, Yu, Rinaldo and Willett (2019) <arxiv:1909.06359>
p = 10 sigma = 1 n = 100 A = matrix(rnorm(p*p), nrow = p)*0.1 # transition matrix simu.VAR1(sigma, p, n, A)
Run the code above in your browser using DataLab