bvec.sim | R Documentation |
This function is used to produce simulated realizations which follow a Vector error correction model. It will also automatically simulate coefficients. All parameters can also be set by the user.
bvec.sim(len, M, B, beta, plag=1, include="none")
len |
length of the simulated time series. |
M |
number of endogenous variables. |
B |
matrix of coefficients. |
beta |
cointegrating vector. |
plag |
number of lags. |
include |
either "none", "const", "trend" or "both" for including deterministics. |
For testing purposes, this function enables to simulate time series processes which can be described by a Global Vector Autoregression. Since stability conditions are not checked, it is only implemented for M=3
.
Returns a list with the following elements
Maximilian Boeck
len <- 1000 M <- 3 plag <- 1 include <- "none" B <- rbind(c(0.7, 0, 0, 0.4), c(0.6, -0.5, 0.2, 0), c(0.2, 0, 0.4, 0.9)) beta <- c(1,-1,-1) yb <- bvec.sim(len=len, M=M, B=B, beta=beta, plag=plag, include=include)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.