mtarns {BMTAR} | R Documentation |
Estimation of non-structural parameters for MTAR model
Description
Bayesian method for estimating non-structural parameters of a MTAR model with prior conjugate.
Usage
mtarns(ini_obj, level = 0.95, burn = NULL, niter = 1000,
chain = FALSE, r_init = NULL)
Arguments
ini_obj |
class “ |
level |
numeric type, confident interval for estimations. Default 0.95 |
burn |
numeric type, number of initial runs. Default NULL (30% of niter) |
niter |
numeric type, number of runs of MCMC. Default 1000 |
chain |
logical type, if return chains of parameters. Default FALSE |
r_init |
numeric type of length l - 1. If r not known, starting value of the chain. Default NULL |
Details
Based on the equation of the Multivariate Threshold Autoregressive(MTAR) Model
where process is a k-variate independent Gaussian process,
is k-variate process,
The function implements Bayesian estimation of non-structural parameters of each regime j(
) is carried out. The structural parameters: Number of Regimes(l), Thresholds(
), and autoregressive orders(
) must be known. Prior distributions where selected in order to get conjugate distributions.
Value
Return a list type object of class “regime_model
”
Nj |
number of observations in each regime |
estimates |
list for each regime with confident interval and mean value of the parameters |
regime |
“ |
Chain |
if chain TRUE list type object with parameters chains |
fitted.values |
matrix type object with fitted.values of the estimated model |
residuals |
matrix type object with residuals of the estimated model |
logLikj |
log-likelihood of each regime with final estimations |
data |
list type object $Yt and $Ut = (Zt,Xt) |
r |
final threshold value with acceptance percentage or r if known |
orders |
list type object with names (pj,qj,dj) known |
Author(s)
Valeria Bejarano vbejaranos@unal.edu.co, Sergio Calderon sacalderonv@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.
Examples
data("datasim")
data = datasim
#r known
parameters = list(l = 2,
orders = list(pj = c(1,1)),
r = data$Sim$r)
initial = mtarinipars(tsregime_obj = data$Sim,
list_model = list(pars = parameters))
estim1 = mtarns(ini_obj = initial,niter = 1000,chain = TRUE)
print.regime_model(estim1)
autoplot.regime_model(estim1,2)
autoplot.regime_model(estim1,3)
autoplot.regime_model(estim1,5)
diagnostic_mtar(estim1)
#r unknown
parameters = list(l = 2,orders = list(pj = c(1,1)))
initial = mtarinipars(tsregime_obj = data$Sim,
list_model = list(pars = parameters))
estim2 = mtarns(ini_obj = initial,niter = 500,chain = TRUE)
print.regime_model(estim2)
autoplot.regime_model(estim2,1)
autoplot.regime_model(estim2,2)
autoplot.regime_model(estim2,3)
autoplot.regime_model(estim2,5)
diagnostic_mtar(estim2)