bpvar.sim: Simulating a Panel Vector Autoregression

View source: R/bpvarsim.R

bpvar.simR Documentation

Simulating a Panel Vector Autoregression

Description

This function is used to produce simulated realizations which follow a Vector Autorgression (GVAR). It will also automatically simulate coefficients. All parameters can also be set by the user.

Usage

bpvar.sim(len, M, N, plag=1, cons=FALSE, trend=FALSE, SV=FALSE)

Arguments

len

length of the simulated time series.

M

number of endogenous variables.

N

number of countries.

plag

number of lags.

cons

logical indicating whether to include an intercept. Default set to FALSE.

trend

logical indicating whether to include an intercept. Default set to FALSE.

SV

logical indicating whether the process should be simulated with or without stochastic volatility. Default set to FALSE.

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

library(BTSM)
sim <- bvar.sim(len=200, M=3, plag=1, cons=TRUE, trend=FALSE, SV=FALSE)
Data = sim$obs$xglobal
W    = sim$obs$W

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