Learn R Programming

gmvarkit (version 1.4.1)

iterate_more: Maximum likelihood estimation of a GMVAR model with preliminary estimates

Description

iterate_more uses a variable metric algorithm to finalize maximum likelihood estimation of a GMVAR model (object of class 'gmvar') which already has preliminary estimates.

Usage

iterate_more(
  gmvar,
  maxit = 100,
  calc_std_errors = TRUE,
  stat_tol = 0.001,
  posdef_tol = 1e-08
)

Arguments

gmvar

an object of class 'gmvar' created with fitGMVAR or GMVAR.

maxit

the maximum number of iterations in the variable metric algorithm.

calc_std_errors

should approximate standard errors be calculated?

stat_tol

numerical tolerance for stationarity of the AR parameters: if the "bold A" matrix of any regime has eigenvalues larger that 1 - stat_tol the model is classified as non-stationary. Note that if the tolerance is too small, numerical evaluation of the log-likelihood might fail and cause error.

posdef_tol

numerical tolerance for positive definiteness of the error term covariance matrices: if the error term covariance matrix of any regime has eigenvalues smaller than this, the model is classified as not satisfying positive definiteness assumption. Note that if the tolerance is too small, numerical evaluation of the log-likelihood might fail and cause error.

Value

Returns an object of class 'gmvar' defining the estimated GMVAR model.

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 GMVAR model with the main estimation function fitGMVAR. iterate_more is essentially a wrapper around the function optim from the package stats and GMVAR from the package gmvarkit.

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. 2020. Structural Gaussian mixture vector autoregressive model. Unpublished working paper, available as arXiv:2007.04713.

See Also

fitGMVAR, GMVAR, optim, profile_logliks, update_numtols

Examples

Run this code
# NOT RUN {
## These are long running examples that use parallel computing!
## Running the below examples takes approximately 2 minutes

# These examples use the data 'eurusd' which comes with the
# package, but in a scaled form.
data <- cbind(10*eurusd[,1], 100*eurusd[,2])
colnames(data) <- colnames(eurusd)

# GMVAR(1,2) model, only 5 iterations of the variable metric
# algorithm
fit12 <- fitGMVAR(data, p=1, M=2, ncalls=1, maxit=5, seeds=7)
fit12

# Iterate more:
fit12_2 <- iterate_more(fit12)
fit12_2
# }

Run the code above in your browser using DataLab