bvec.sim: Simulating a Vector Error Correction Model

View source: R/bvecsim.R

bvec.simR Documentation

Simulating a Vector Error Correction Model

Description

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.

Usage

bvec.sim(len, M, B, beta, plag=1, include="none")

Arguments

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.

Details

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.

Value

Returns a list with the following elements

Author(s)

Maximilian Boeck

Examples

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)

mboeck11/BTSM documentation built on Oct. 9, 2022, 9:14 p.m.