Learn R Programming

ksm (version 1.0)

rWAR: Random matrix generation from first-order autoregressive Wishart process

Description

Given a matrix of coefficients M and a covariance matrix Sigma, simulate n random matrices from a first-order autoregressive Wishart process by simulating from cross-products of vector autoregressions

Usage

rWAR(n, M, Sigma, K = 1L, order = 1L, burnin = 25L)

Value

an array of size d by d by n containing the samples

Arguments

n

sample size

M

matrix of autoregressive coefficients

Sigma

covariance matrix

K

integer, degrees of freedom

order

order of autoregressive process, only 1 is supported at current.

burnin

number of iterations discarded

References

C. Gourieroux, J. Jasiak, and R. Sufana (2009). The Wishart Autoregressive process of multivariate stochastic volatility, Journal of Econometrics, 150(2), 167-181, <doi:10.1016/j.jeconom.2008.12.016>.

Examples

Run this code
M <- matrix(c(0.3, -0.3, -0.3, 0.3), nrow = 2)
Sigma <- matrix(c(1, 0.5, 0.5, 1), nrow = 2)
rWAR(n = 10, M = M, Sigma = Sigma, K = 5)

Run the code above in your browser using DataLab