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 |
Zt |
matrix |
Xt |
matrix |
r |
numeric type, threshold value (within the range of |
Details
Create a class “tsregime
” object composed of: Y_t
and X_t
stochastics processes such that Y_t=[Y_{1t},...,Y_{kt}]
', X_t=[X_{1t},...,X_{\nu t}]'
and Z_t
is a univariate process. Where Y_t
follows a MTAR model with threshold variable Z_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}
if r_{j-1}< Z_t \leq r_{j}
Missing data is allowed for processes Y_t
, X_t
and Z_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)