swap_parametrization {uGMAR} | R Documentation |
Swap the parametrization of object of class 'gsmar' defining a GMAR, StMAR, or G-StMAR 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, custom_h = NULL)
Arguments
gsmar |
a class 'gsmar' object, typically generated by |
calc_std_errors |
should approximate standard errors be calculated? |
custom_h |
A numeric vector with same the length as the parameter vector: i:th element of custom_h is the difference
used in central difference approximation for partial differentials of the log-likelihood function for the i:th parameter.
If |
Details
swap_parametrization
is a convenient tool if you have estimated the model in
"intercept"-parametrization but wish to work with "mean"-parametrization in the future,
or vice versa. For example, approximate standard errors are readily available for
parametrized parameters only.
Value
Returns an object of class 'gsmar'
defining the specified GMAR, StMAR, or G-StMAR model. If data is supplied,
the returned object contains (by default) empirical mixing weights, some conditional and unconditional moments, and quantile
residuals. Note that the first p observations are taken as the initial values so the mixing weights, conditional moments, and
quantile residuals start from the p+1:th observation (interpreted as t=1).
References
Kalliovirta L., Meitz M. and Saikkonen P. 2015. Gaussian Mixture Autoregressive model for univariate time series. Journal of Time Series Analysis, 36(2), 247-266.
Meitz M., Preve D., Saikkonen P. 2023. A mixture autoregressive model based on Student's t-distribution. Communications in Statistics - Theory and Methods, 52(2), 499-515.
Virolainen S. 2022. A mixture autoregressive model based on Gaussian and Student's t-distributions. Studies in Nonlinear Dynamics & Econometrics, 26(4) 559-580.
See Also
fitGSMAR
, GSMAR
, iterate_more
, get_gradient
,
get_regime_means
, swap_parametrization
, stmar_to_gstmar
Examples
# G-StMAR model with intercept parametrization
params42gs <- c(0.04, 1.34, -0.59, 0.54, -0.36, 0.01, 0.06, 1.28, -0.36,
0.2, -0.15, 0.04, 0.19, 9.75)
gstmar42 <- GSMAR(data=M10Y1Y, p=4, M=c(1, 1), params=params42gs,
model="G-StMAR")
summary(gstmar42)
# Swap to mean parametrization
gstmar42 <- swap_parametrization(gstmar42)
summary(gstmar42)