Learn R Programming

BMTAR (version 0.1.1)

autoplot.regime_model: regime_model object ggplot for the outputs on the function outputs mtarns and mtastr

Description

Produces a ggplot object for the results of the mtarns and mtarstr functions.

Usage

# S3 method for regime_model
autoplot(object, type = 1,...)

Arguments

object

Object of class “regime_model”. Not NULL

type

character string giving the type of plot to be computed. Allowed values are 1 for "Thresholds chains" (the default), 2 for “Sigma chains”, 3 for “Theta chains”, 4 for “Gamma chains” or 5 for “Output process fit

...

other arguments passed to specific methods

Value

Return a ggplot object.

Details

Graph the strings for the outputs corresponding to the functions “mtarns” and “mtarstr” which return an object of class “regime_model”. The chains corresponding to the samplings in each case do not contain the burning period.

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<U+2013>318. doi:10.1080/03610926.2014.990758.

See Also

mtarns, mtarstr

Examples

Run this code
# NOT RUN {
library(ggplot2)
data("datasim")
data = datasim$Sim$Zt
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)
# }
# NOT RUN {
autoplot.regime_model(estim1,2)
autoplot.regime_model(estim1,3)
# }
# NOT RUN {
autoplot.regime_model(estim1,5)
# }

Run the code above in your browser using DataLab