Residual diagnosis for model MTAR
Tests to help evaluate some assumptions about the MTAR model. calculating some tests and graphs.
diagnostic_mtar(regime_model,lagmax = NULL,alpha = '0.05')
regime_model |
Object of class “ |
lagmax |
maximum lag at which to calculate the acf and pacf. Default NULL |
alpha |
level of significance for the graphs, should take values in c('0.10','0.05','0.025','0.01','0.005'). Default '0.05' |
For the graphical tests it returns: “Residuals plot
” and “Residuals density plot
” (overlaps a standard normal density),“Residuals plot
” and “Residuals plot
”, “CUSUM
” statistic for residuals, “ACF
” and “PACF
” plots for residuals series.
Returns a list of ggplot objects with the graphics mentioned before.
Valeria Bejarano vbejaranos@unal.edu.co, Sergio Calderon sacalderonv@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.
library(ggplot2) data("datasim") data = datasim$Sim$Z parameters = list(l = 1,orders = list(pj = 1)) initial = mtarinipars(tsregime_obj = tsregime(data), list_model = list(pars = parameters)) estim1 = mtarns(ini_obj = initial,niter = 500,chain = TRUE,burn = 500) diagnostic_mtar(estim1)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.