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: and
stochastics processes such that
',
and
is a univariate process. Where
follows a MTAR model with threshold variable
Missing data is allowed for processes ,
and
(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)