Learn R Programming

uGMAR (version 3.1.0)

swap_parametrization: Swap the parametrization of object of class 'gsmar' defining a gsmar model

Description

swap_parametrization swaps the parametrization of object of class 'gsmar' to "mean" if the current parametrization is "intercept", and vice versa.

Usage

swap_parametrization(gsmar, calc_std_errors = TRUE)

Arguments

gsmar

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

calc_std_errors

should approximate standard errors be calculated?

Value

Returns an object of class 'gsmar' defining the specified GMAR, StMAR or G-StMAR model. If data is suplied, the returned object contains (by default) empirical mixing weights, conditional means and variances and quantile residuals. Note that the first p observations are taken as the initial values so mixing weights, conditional moments and qresiduals start from the p+1:th observation (interpreted as t=1).

Details

swap_parametrization is convenient tool if you have estimated the model in "intercept"-parametrization, but wish to work with "mean"-parametrization in the future, or vice versa. In gsmarkit, for example the approximate standard errors are only available for parametrized parameters.

References

  • 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].

  • There are currently no published references for the G-StMAR model, but it's a straightforward generalization with theoretical properties similar to the GMAR and StMAR models.

See Also

fitGSMAR, GSMAR, iterate_more, get_gradient, get_regime_means, swap_parametrization, stmar_to_gstmar

Examples

Run this code
# NOT RUN {
# GMAR model with intercept parametrization
params12 <- c(0.18, 0.93, 0.01, 0.86, 0.68, 0.02, 0.88)
gmar12 <- GSMAR(data=logVIX, p=1, M=2, params=params12, model="GMAR")
gmar12

# Swap to mean parametrization
gmar12 <- swap_parametrization(gmar12)
gmar12
# }

Run the code above in your browser using DataLab