diagnostic_mtar {BMTAR} R Documentation

## Residual diagnosis for model MTAR

### Description

Tests to help evaluate some assumptions about the MTAR model. calculating some tests and graphs.

### Usage

diagnostic_mtar(regime_model,lagmax = NULL,alpha = '0.05')


### Arguments

 regime_model Object of class “regime_model”. Not NULL 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'

### Details

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.

### Value

Returns a list of ggplot objects with the graphics mentioned before.

### 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

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)


[Package BMTAR version 0.1.1 Index]