iterate_more {uGMAR} | R Documentation |
Maximum likelihood estimation of GMAR, StMAR, or G-StMAR model with preliminary estimates
Description
iterate_more
uses a variable metric algorithm to finalize maximum likelihood
estimation of a GMAR, StMAR or G-StMAR model (object of class 'gsmar'
) which already has
preliminary estimates.
Usage
iterate_more(gsmar, maxit = 100, custom_h = NULL, calc_std_errors = TRUE)
Arguments
gsmar |
a class 'gsmar' object, typically generated by |
maxit |
the maximum number of iterations for the variable metric algorithm. |
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 |
calc_std_errors |
should approximate standard errors be calculated? |
Details
The main 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 model with the
main estimation function fitGSMAR
. iterate_more
is essentially a wrapper for the functions
optim
from the package stats
and GSMAR
from the package uGMAR
.
Value
Returns an object of class 'gsmar'
defining the estimated model.
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
, stmar_to_gstmar
,
profile_logliks
, optim
Examples
# Estimate GMAR model with on only 1 iteration in variable metric algorithm
fit12 <- fitGSMAR(simudata, p=1, M=2, maxit=1, ncalls=1, seeds=1)
fit12
# Iterate more since iteration limit was reached
fit12 <- iterate_more(fit12)
fit12