Learn R Programming

uGMAR (version 3.1.0)

stmar_to_gstmar: 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 currect parametrization is "intercept", and vice versa.

Usage

stmar_to_gstmar(gsmar, maxdf = 100, estimate, calc_std_errors,
  maxit = 100)

Arguments

gsmar

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

maxdf

regimes with degrees of freedom parameter value large than this will be turned into GMAR type.

estimate

set TRUE if the new model should be estimated with variable metric algorithm using the StMAR model parameters as the initial values. By default TRUE iff the model contains data.

calc_std_errors

set TRUE if the approximate standard errors should be calculated. By default TRUE iff the model contains data.

maxit

the maximum number of iterations for the variable metric algorithm. Ignored if estimate == FALSE.

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

If a StMAR model contains large estimates for the degrees of freedom parameters one should consider switching to the corresponding G-StMAR model that lets the corresponding regimes to be GMAR type. stmar_to_gstmar makes it convenient to do this switch.

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 {
 # These are long running examples and use parallel computing
 fit13tr <- fitGSMAR(logVIX, 1, 3, model="StMAR", restricted=TRUE)
 fit13tr
 fit13gsr <- stmar_to_gstmar(fit13tr)
 fit13gsr
# }

Run the code above in your browser using DataLab