tvpbvar.sim: Simulating a Time-varying Parameter Bayesian Vector...

View source: R/tvpbvarsim.R

tvpbvar.simR Documentation

Simulating a Time-varying Parameter Bayesian 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

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

Arguments

len

length of the simulated time series.

M

number of endogenous variables.

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.

sparse.coef

sparsification of coefficients, has to be provided as percentage between zero and one.

sparse.tvp

sparsification of time-variation, has to be provided as percentage between zero and one.

tvp.var

variance of state process governing the time-variation in the coefficients

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 <- tvpbvar.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.