Learn R Programming

uGMAR (version 3.2.6)

condmomentPlot: Conditional mean or variance plot for GMAR, StMAR, and G-StMAR models

Description

condmomentPlot plots the one-step in-sample conditional means/variances of the model along with the time series contained in the model (e.g. the time series the model was fitted to). Also plots the regimewise conditional means/variances multiplied with the mixing weights.

Usage

condmomentPlot(gsmar, which_moment = c("mean", "variance"))

Arguments

gsmar

object of class 'gsmar' created with the function fitGSMAR or GSMAR.

which_moment

should conditional means or variances be plotted?

Value

condmomentPlot only plots to a graphical device and does not return anything. Numerical values of the conditional means/variances can be extracted from the model with the dollar sign.

Details

The conditional mean plot works best if the data contains positive values only.

References

  • Galbraith, R., Galbraith, J. 1974. On the inverses of some patterned matrices arising in the theory of stationary time series. Journal of Applied Probability 11, 63-71.

  • Kalliovirta L. (2012) Misspecification tests based on quantile residuals. The Econometrics Journal, 15, 358-393.

  • Kalliovirta L., Meitz M. and Saikkonen P. 2015. Gaussian Mixture Autoregressive model for univariate time series. Journal of Time Series Analysis, 36, 247-266.

  • Meitz M., Preve D., Saikkonen P. 2018. A mixture autoregressive model based on Student's t-distribution. arXiv:1805.04010 [econ.EM].

  • Virolainen S. 2020. A mixture autoregressive model based on Gaussian and Student's t-distribution. arXiv:2003.05221 [econ.EM].

See Also

profile_logliks, diagnosticPlot, fitGSMAR, GSMAR, quantileResidualTests, quantileResidualPlot

Examples

Run this code
# NOT RUN {
# GMAR model
fit12 <- fitGSMAR(simudata, p=1, M=2, model="GMAR")
condmomentPlot(fit12, which_moment="mean")
condmomentPlot(fit12, which_moment="variance")

# Restricted StMAR model: plot also the individual statistics with
# their approximate critical bounds using the given data
fit42r <- fitGSMAR(T10Y1Y, p=4, M=2, model="StMAR", restricted=TRUE)
condmomentPlot(fit42r, which_moment="mean")
condmomentPlot(fit42r, which_moment="variance")

# G-StMAR model with one GMAR type and one StMAR type regime
fit42g <- fitGSMAR(T10Y1Y, p=4, M=c(1, 1), model="G-StMAR")
condmomentPlot(fit42g, which_moment="mean")
condmomentPlot(fit42g, which_moment="variance")
# }

Run the code above in your browser using DataLab