Learn R Programming

gmvarkit (version 1.5.0)

cond_moment_plot: Conditional mean or variance plot for a GMVAR model

Description

cond_moment_plot plots the one-step in-sample conditional means/variances of the model along with the individual 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 mixing weights.

Usage

cond_moment_plot(
  gmvar,
  which_moment = c("mean", "variance"),
  grid = FALSE,
  ...
)

Arguments

gmvar

an object of class 'gmvar' created with fitGMVAR or GMVAR.

which_moment

should conditional means or variances be plotted?

grid

add grid to the plots?

...

additional paramters passed to grid(...) plotting the grid if grid == TRUE.

Details

The conditional mean plot works best if the data contains positive values only. acf from the package stats and the plot method for class 'acf' objects is employed.

References

  • Kalliovirta L., Meitz M. and Saikkonen P. 2016. Gaussian mixture vector autoregression. Journal of Econometrics, 192, 485-498.

  • L<U+00FC>tkepohl H. 2005. New Introduction to Multiple Time Series Analysis, Springer.

  • McElroy T. 2017. Computation of vector ARMA autocovariances. Statistics and Probability Letters, 124, 92-96.

  • Virolainen S. 2020. Structural Gaussian mixture vector autoregressive model. Unpublished working paper, available as arXiv:2007.04713.

See Also

profile_logliks, fitGMVAR, GMVAR, quantile_residual_tests, LR_test, Wald_test, diagnostic_plot

Examples

Run this code
# NOT RUN {
# GMVAR(2, 2), d=2 model;
params22 <- c(0.36, 0.121, 0.223, 0.059, -0.151, 0.395, 0.406, -0.005,
 0.083, 0.299, 0.215, 0.002, 0.03, 0.484, 0.072, 0.218, 0.02, -0.119,
 0.722, 0.093, 0.032, 0.044, 0.191, 1.101, -0.004, 0.105, 0.58)
mod22 <- GMVAR(gdpdef, p=2, M=2, params=params22)

cond_moment_plot(mod22, which_moment="mean")
cond_moment_plot(mod22, which_moment="variance")
cond_moment_plot(mod22, which_moment="mean", grid=TRUE, lty=3)
# }

Run the code above in your browser using DataLab