Maximum likelihood estimation of a reduced form or structural STVAR model based on preliminary estimates
Maximum likelihood estimation of a reduced form or structural STVAR model based on preliminary estimates
iterate_more uses a variable metric algorithm to estimate a reduced form or structural STVAR model (object of class 'stvar') based on preliminary estimates.
stvar: an object of class 'stvar', created by, e.g., fitSTVAR or fitSSTVAR.
maxit: the maximum number of iterations in the variable metric algorithm.
h: the step size used in the central difference approximation of the gradient of the log-likelihood function, so h should be a small positive real number.
penalized: should penalized log-likelihood function be used that penalizes the log-likelihood function when the parameter values are close the boundary of the stability region or outside it? If TRUE, estimates that do not satisfy the stability condition are allowed (except when weight_function="relative_dens"). The default is TRUE for three-phase estimation and FALSE for two-phase estimation.
penalty_params: a numeric vector with two positive elements specifying the penalization parameters: the first element determined how far from the boundary of the stability region the penalization starts (a number between zero and one, smaller number starts penalization closer to the boundary) and the second element is a tuning parameter for the penalization (a positive real number, a higher value penalizes non-stability more).
allow_unstab: If TRUE, estimates not satisfying the stability condition are allowed. Always FALSE if weight_function="relative_dens".
calc_std_errors: Calculate approximate standard errors (based on standard asymptotics)?
print_trace: should the trace of the optimization algorithm be printed?
Returns
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.
seeds: The seeds used in the estimation in fitSTVAR, if applicable.
LS_estimates: The least squares estimates of the parameters in the form (ϕ1,0,...,ϕM,0,φ1,...,φM,α (intercepts replaced by unconditional means if mean parametrization is used), if applicable.
Details
The purpose of iterate_more is to provide a simple and convenient tool to finalize the estimation when the maximum number of iterations is reached when estimating a STVAR model with the main estimation function fitSTVAR or fitSSTVAR.
Examples
## These are long running examples that take approximately 20 seconds to run.# Estimate two-regime Gaussian STVAR p=1 model with the weighted relative stationary densities# of the regimes as the transition weight function, but only 5 iterations of the variable matrix# algorithm:fit12 <- fitSTVAR(gdpdef, p=1, M=2, nrounds=1, seeds=1, ncores=1, maxit=5)# The iteration limit was reached, so the estimate is not local maximum.# The gradient of the log-likelihood function:get_foc(fit12)# Not close to zero!# So, we run more iterations of the variable metric algorithm:fit12 <- iterate_more(fit12)# The gradient of the log-likelihood function after iterating more:get_foc(fit12)# Close (enough) to zero!
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. 2025. 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.
Tsay R. 1998. Testing and Modeling Multivariate Threshold Models. Journal of the American Statistical Association, 93 :443, 1188-1202.
Virolainen S. 2025. Identification by non-Gaussianity in structural threshold and smooth transition vector autoregressive models. Unpublished working paper, available as arXiv:2404.19707.