swap_parametrization {sstvars} | R Documentation |
Swap the parametrization of a STVAR model
Description
swap_parametrization
swaps the parametrization of a STVAR model
to "mean"
if the current parametrization is "intercept"
, and vice versa.
Usage
swap_parametrization(stvar, calc_std_errors = FALSE)
Arguments
stvar |
object of class |
calc_std_errors |
should approximate standard errors be calculated? |
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.
Value
Returns an S3 object of class 'stvar'
defining a smooth transition VAR model. The returned list
contains the following components (some of which may be NULL
depending on the use case):
data |
The input time series data. |
model |
A list describing the model structure. |
params |
The parameters of the model. |
std_errors |
Approximate standard errors of the parameters, if calculated. |
transition_weights |
The transition weights of the model. |
regime_cmeans |
Conditional means of the regimes, if data is provided. |
total_cmeans |
Total conditional means of the model, if data is provided. |
total_ccovs |
Total conditional covariances of the model, if data is provided. |
uncond_moments |
A list of unconditional moments including regime autocovariances, variances, and means. |
residuals_raw |
Raw residuals, if data is provided. |
residuals_std |
Standardized residuals, if data is provided. |
structural_shocks |
Recovered structural shocks, if applicable. |
loglik |
Log-likelihood of the model, if data is provided. |
IC |
The values of the information criteria (AIC, HQIC, BIC) for the model, if data is provided. |
all_estimates |
The parameter estimates from all estimation rounds, if applicable. |
all_logliks |
The log-likelihood of the estimates from all estimation rounds, if applicable. |
which_converged |
Indicators of which estimation rounds converged, if applicable. |
which_round |
Indicators of which round of optimization each estimate belongs to, if applicable. |
References
Anderson H., Vahid F. 1998. Testing multiple equation systems for common nonlinear components. Journal of Econometrics, 84:1, 1-36.
Hubrich K., Teräsvirta. T. 2013. Thresholds and Smooth Transitions in Vector Autoregressive Models. CREATES Research Paper 2013-18, Aarhus University.
Lanne M., Virolainen S. 2024. A Gaussian smooth transition vector autoregressive model: An application to the macroeconomic effects of severe weather shocks. Unpublished working paper, available as arXiv:2403.14216.
Kheifets I.L., Saikkonen P.J. 2020. Stationarity and ergodicity of Vector STAR models. Econometric Reviews, 39:4, 407-414.
Lütkepohl H., Netšunajev A. 2017. Structural vector autoregressions with smooth transition in variances. Journal of Economic Dynamics & Control, 84, 43-57.
Tsay R. 1998. Testing and Modeling Multivariate Threshold Models. Journal of the American Statistical Association, 93:443, 1188-1202.
Virolainen S. 2024. Identification by non-Gaussianity in structural threshold and smooth transition vector autoregressive models. Unpublished working paper, available as arXiv:2404.19707.
Examples
## Create a Gaussian STVAR p=1, M=2 model with the weighted relative stationary densities
# of the regimes as the transition weight function; use the intercept parametrization:
theta_122relg <- c(0.734054, 0.225598, 0.705744, 0.187897, 0.259626, -0.000863,
-0.3124, 0.505251, 0.298483, 0.030096, -0.176925, 0.838898, 0.310863, 0.007512,
0.018244, 0.949533, -0.016941, 0.121403, 0.573269)
mod122 <- STVAR(p=1, M=2, d=2, params=theta_122relg, parametrization="intercept")
mod122$params[1:4] # The intercept parameters
# Swap from the intercept parametrization to mean parametrization:
mod122mu <- swap_parametrization(mod122)
mod122mu$params[1:4] # The mean parameters
# Swap back to the intercept parametrization:
mod122int <- swap_parametrization(mod122mu)
mod122int$params[1:4] # The intercept parameters
## Create a linear VAR(p=1) model with the intercept parametrization, include
# the two-variate data gdpdef to the model and calculate approximate standard errors:
theta_112 <- c(0.649526, 0.066507, 0.288526, 0.021767, -0.144024, 0.897103,
0.601786, -0.002945, 0.067224)
mod112 <- STVAR(data=gdpdef, p=1, M=1, params=theta_112, parametrization="intercept",
calc_std_errors=TRUE)
print(mod112, standard_error_print=TRUE) # Standard errors are printed for the intercepts
# To obtain standard errors for the unconditional means instead of the intercepts,
# swap to mean parametrization:
mod112mu <- swap_parametrization(mod112, calc_std_errors=TRUE)
print(mod112mu, standard_error_print=TRUE) # Standard errors are printed for the means