Below I share with you the details of an R package developed for one of the chapters in my Ph.D. dissertation that we published on the Comprehensive R Archive Network. The package computes the log likelihood for an inverse gamma stochastic volatility model using a closed form expression of the likelihood. The details of the computation of this closed form expression are given in Gonzalez R.L & Majoni B (2024) Journal of Time Series Analysis, while the detailed code is in the Dissertation .
The package includes 3 useful functions. The main function lik_clo computes the log likelihood. This closed form expression is obtained for the log likelihood of a stationary inverse gamma stochastic volatility model by marginalising out the volatilities. This allows the user to obtain the maximum likelihood estimator for this class of non linear non Gaussian state space models. In addition, one can obtain the smoothed estimates of the volatility using draws from the exact posterior distribution of the inverse volatility by calling the function DrawK0. Lastly one can evaluate the 2F1 hypergeometric function using the function ourgeo.
The vignette (tutorial) can be found here.
New algorithms will be posted here as well in future.