tsregime {BMTAR}R Documentation

Creation of class “tsregime” for some data

Description

The function tsregime is used to create time-series-regime objects.

Usage

tsregime(Yt, Zt = NULL, Xt = NULL, r = NULL)

Arguments

Yt

matrix (Nxk)(Nxk) type object, observed process (admit NA values). Not NULL

Zt

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

Xt

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

r

numeric type, threshold value (within the range of ZtZ_t) if known. Default NULL

Details

Create a class “tsregime” object composed of: YtY_t and XtX_t stochastics processes such that Yt=[Y1t,...,Ykt]Y_t=[Y_{1t},...,Y_{kt}]', Xt=[X1t,...,Xνt]X_t=[X_{1t},...,X_{\nu t}]' and ZtZ_t is a univariate process. Where YtY_t follows a MTAR model with threshold variable ZtZ_t

Yt=Φ0(j)+i=1pjΦi(j)Yti+i=1qjβi(j)Xti+i=1djδi(j)Zti+Σ(j)1/2ϵt Y_t= \Phi_{0}^(j)+\sum_{i=1}^{p_j}\Phi_{i}^{(j)} Y_{t-i}+\sum_{i=1}^{q_j} \beta_{i}^{(j)} X_{t-i} + \sum_{i=1}^{d_j} \delta_{i}^{(j)} Z_{t-i}+ \Sigma_{(j)}^{1/2} \epsilon_{t}

ifrj1<Ztrjif r_{j-1}< Z_t \leq r_{j}

Missing data is allowed for processes YtY_t, XtX_t and ZtZ_t (can then be estimated with “mtarmissing” function). In the case of known r, the output returns the percentages of observations found in each regimen.

Value

Return a list type object of class “tsregime”:

Yt

stochastic output process

Xt

stochastic covariate process (if enter)

Zt

stochastic threshold process (if enter)

N

number of observations

k

number of variables

If r known:

r

threshold value

Ind

numeric type, number of the regime each observation belong

Summary_r

data.frame type, number and proportion of observations in each regime

Author(s)

Valeria Bejarano vbejaranos@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

mtaregime, mtarinipars, mtarsim

Examples

data("datasim")
yt = datasim$Sim
Yt = yt$Yt
Zt = yt$Zt
(datos = tsregime(Yt,Zt))
autoplot.tsregime(datos,1)
autoplot.tsregime(datos,2)

[Package BMTAR version 0.1.1 Index]