Learn R Programming

gmvarkit (version 2.1.4)

swap_parametrization: Swap the parametrization of a GMVAR, StMVAR, or G-StMVAR model

Description

swap_parametrization swaps the parametrization of a GMVAR, StMVAR or G-StMVAR, model to "mean" if the current parametrization is "intercept", and vice versa.

Usage

swap_parametrization(gsmvar)

Value

Returns an object of class 'gsmvar' defining the specified reduced form or structural GMVAR, StMVAR, or G-StMVAR model. Can be used to work with other functions provided in gmvarkit.

Note that the first autocovariance/correlation matrix in $uncond_moments is for the lag zero, the second one for the lag one, etc.

Arguments

gsmvar

an object of class 'gsmvar', typically created with fitGSMVAR or GSMVAR.

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. In gmvarkit, the approximate standard errors are only available for parametrized parameters.

References

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

  • Kalliovirta L. and Saikkonen P. 2010. Reliable Residuals for Multivariate Nonlinear Time Series Models. Unpublished Revision of HECER Discussion Paper No. 247.

  • Virolainen S. 2022. Gaussian and Student's t mixture vector autoregressive model with application to the asymmetric effects of monetary policy shocks in the Euro area. Unpublished working paper, available as arXiv:2109.13648.

  • Virolainen S. 2025. A statistically identified structural vector autoregression with endogenously switching volatility regime. Journal of Business & Economic Statistics, 43, 1, 44-54.

See Also

fitGSMVAR, GSMVAR, iterate_more, update_numtols

Examples

Run this code
# \donttest{
# GMVAR(2, 2), d=2 model with mean-parametrization:
params22 <- c(0.869, 0.549, 0.223, 0.059, -0.151, 0.395, 0.406,
 -0.005, 0.083, 0.299, 0.215, 0.002, 0.03, 0.576, 1.168, 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 <- GSMVAR(gdpdef, p=2, M=2, params=params22, parametrization="mean")
mod22 # mean parametrization

mod22_2 <- swap_parametrization(mod22)
mod22_2 # intercept parametrization

# G-StMVAR(2, 1, 1), d=2 model with mean-parametrization:
mod22gs <- GSMVAR(gdpdef, p=2, M=c(1, 1), params=c(params22, 10), model="G-StMVAR",
                  parametrization="mean")
mod22gs # mean parametrization

mod22gs_2 <- swap_parametrization(mod22gs)
mod22gs_2 # intercept parametrization

# Structural GMVAR(2, 2), d=2 model identified with sign-constraints:
params22s <- c(0.36, 0.121, 0.484, 0.072, 0.223, 0.059, -0.151, 0.395,
  0.406, -0.005, 0.083, 0.299, 0.218, 0.02, -0.119, 0.722, 0.093, 0.032,
  0.044, 0.191, 0.057, 0.172, -0.46, 0.016, 3.518, 5.154, 0.58)
W_22 <- matrix(c(1, 1, -1, 1), nrow=2, byrow=FALSE)
mod22s <- GSMVAR(p=2, M=2, d=2, params=params22s, structural_pars=list(W=W_22))
mod22s # intercept parametrization

mod22s_2 <- swap_parametrization(mod22s)
mod22s_2 # mean parametrization
# }

Run the code above in your browser using DataLab