Creation of class “tsregime” for some data
The function tsregime is used to create time-series-regime objects.
tsregime(Yt, Zt = NULL, Xt = NULL, r = NULL)
Yt |
matrix (Nxk) type object, observed process (admit NA values). Not NULL |
Zt |
matrix (Nx1) type object, threshold process (admit NA values). Default NULL |
Xt |
matrix (Nxν) type object, covariate process (admit NA values). Default NULL |
r |
numeric type, threshold value (within the range of Z_t) if known. Default NULL |
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_{ν t}]' and Z_t is a univariate process. Where Y_t follows a MTAR model with threshold variable Z_t
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}
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.
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 |
Valeria Bejarano vbejaranos@unal.edu.co & Andrey Rincon adrincont@unal.edu.co
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.
data("datasim") yt = datasim$Sim Yt = yt$Yt Zt = yt$Zt (datos = tsregime(Yt,Zt)) autoplot.tsregime(datos,1) autoplot.tsregime(datos,2)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.