Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mtarsim

Multivariate threshold autoregressive process simulation


Description

Given an list object of the class “regime” (length = l) with the model specification simulates N observations for a MTAR (Multivariate threshold autoregressive process) process.

Usage

mtarsim(N, Rg, r = NULL, Xt = NULL, Zt = NULL, seed = NULL)

Arguments

N

numeric type greater than 0. Number of observation to simulate. Not NULL

Rg

list type object of length l number of regimes of the process with names (R1, ..., Rl), each a class “regime” object. Not NULL

r

numeric type of length l - 1, threshold value (within the range of Z_t). Default NULL

Xt

matrix (Nxν) type object, covariate process (admit NA values). Default NULL

Zt

matrix (Nx1) type object, threshold process (admit NA values). Default NULL

seed

numeric type, set a seed for simulation

Details

Given a list of length l of object of class “regime” (model specification), it simulates observations of a MTAR process ($ Sim) and returns them an object of the class “mtarsim”. We have an MTAR process is given by:

Y_t= Φ_{0}^(j)+∑_{i=1}^{p_j}Φ_{i}^{(j)} Y_{t-i}+∑_{i=1}^{q_j} β_{i}^{(j)} X_{t-i} + ∑_{i=1}^{d_j} δ_{i}^{(j)} Z_{t-i}+ Σ_{(j)}^{1/2} ε_{t}

if r_{j-1}< Z_t ≤q r_{j}

The simulation has 100 burn observations to stabilize the process. It is possible to simulate univariate (TAR, SETAR, etc.) or multivariate (VAR) processes, properly specifying the regime type object according to the model.

Value

Return a list type object of class “mtarsim”:

Sim

object class “tsregime

Reg

list type object with names (R1, ..., Rl) each one class “regime

pj

vector of autoregressive orders in each regime

qj

vector of covariate lags orders in each regime

dj

vector of lags orders of threshold process in each regime

Author(s)

Valeria Bejarano vbejaranos@unal.edu.co, Sergio Calderon sacalderonv@unal.edu.co & Andrey Rincon adrincont@unal.edu.co

References

Calderon, S. and Nieto, F. (2017) Bayesian analysis of multivariate threshold autoregress models with missing data. Communications in Statistics - Theory and Methods 46 (1):296–318. doi:10.1080/03610926.2014.990758.

See Also

Examples

## get Ut data process
Tlen = 500
Sigma_ut = 2
Phi_ut = list(phi1 = 0.3)
R_ut = list(R1 = mtaregime(orders = list(p = 1,q = 0,d = 0),Phi = Phi_ut,Sigma = Sigma_ut))
Ut = mtarsim(N = Tlen,Rg = R_ut,seed = 124)
Zt = Ut$Sim$Yt

# Yt process
k = 2
## R1 regime
Phi_R1 = list(phi1 = matrix(c(0.1,0.6,-0.4,0.5),k,k,byrow = TRUE))
Sigma_R1 = matrix(c(1,0,0,1),k,k,byrow = TRUE)
R1 = mtaregime(orders = list(p = 1,q = 0,d = 0),Phi = Phi_R1,Sigma = Sigma_R1)
## R2 regime
Phi_R2 = list(phi1 = matrix(c(0.3,0.5,0.2,0.7),2,2,byrow = TRUE))
Sigma_R2 = matrix(c(2.5,0.5,0.5,1),2,2,byrow = TRUE)
R2 = mtaregime(orders = list(p = 1,q = 0,d = 0),
Phi = Phi_R2,Sigma = Sigma_R2)
## create list of regime-type objects
Rg = list(R1 = R1,R2 = R2)
r = 0.3

# get the simulation
datasim = mtarsim(N = Tlen,Rg = Rg,r = r,Zt = Zt,seed = 124)
autoplot.tsregime(datasim$Sim,1)
autoplot.tsregime(datasim$Sim,2)

BMTAR

Bayesian Approach for MTAR Models with Missing Data

v0.1.1
GPL (>= 2)
Authors
Valeria Bejarano Salcedo <vbejaranos@unal.edu.co>, Sergio Alejandro Calderon Villanueva <sacalderonv@unal.edu.co> Andrey Duvan Rincon Torres <adrincont@unal.edu.co>
Initial release
2021-01-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.