Compute by Bayesian methodology a MTAR model for some data
auto_mtar(Yt, Zt = NULL, Xt = NULL, l0_min = 2, l0_max = 3,
maxorders = list(pj = 2,qj = 0,dj = 0),
niter = 3000, chain = FALSE, method = 'KUO',parallel = FALSE)
matrix type object, observed process. Not NULL
matrix type object, threshold process. Default NULL
matrix type object, covariate process. Default NULL
numeric type between 1 and 4, number of regimes minimum to consider. Default 2
numeric type between 1 and 4, number of regimes maximum to consider. Default 3
list type object with names (pj,qj,dj), maximum lags consider for the processes in each regime. Default pj = 2, qj = 0,dj = 0
numeric type, number of runs for every estimation. Default 3000
logical type, if return chains of estimations parameters and values (if missing)
character type, must be one ``KUO'' or ``SSVS''
logical, if parallel
package should be used. Default FALSE
Return list type object
class “tsregime
” object, if missing values completed with estimations
class “regime_number
”, number of regimes estimated
class “regime_model
” object with final estimations of parameters
The default arguments are designed for rapid estimation of models for any data (Yt, Zt and Xt). Returns the fit of MTAR model.
The function conducts Bayesian estimation with ``niter'' chains of the number of regimes with maximum ``l0'' and within the maximum lags orders provided ``maxorders''.
It can be a little be faster when used ``parallel'' for parallel
package.
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<U+2013>318. doi:10.1080/03610926.2014.990758.
# NOT RUN {
data('datasim')
data = datasim$Sim
# }
# NOT RUN {
auto = auto_mtar(Yt = data$Yt, Zt = data$Zt,niter = 1000)
# }
Run the code above in your browser using DataLab