R: Fitted Volatility Series from Simulated Parameters
h.fit
R Documentation
Fitted Volatility Series from Simulated Parameters
Description
Returns fitted volatility series for each set of simulated parameter values used in the calculation of the log-likelihood. Will only operate for simulations from BUGS models with either stochastic volatility or a random variance shift created in the tsbugs package.
Usage
h.fit(bug, sims, pre.beg = FALSE)
Arguments
bug
A BUGS model created in the tsbugs package.
sims
A data.frame of simulated parameter values with column names labelled according to output from the R2OpenBUGS package.
pre.beg
Logical value to include or exclude NA outputs in time periods (columns) before the starting value for which data are considered in the likelihood of the BUGS model. The number of columns will be dependent on the value of the bug argument used when setting up the BUGS model using the tsbugs package. By default this argument is FALSE, i.e. there are no columns of missing values returned.
Value
A data.frame where rows represent simulations and columns time.
Author(s)
Guy J. Abel
See Also
y.fit, tslogl
Examples
## Not run:
# demo example with constant variance models for differenced growth rate
# of England and Wales population as used in Abel et. al. (2013)
demo("cv_bma", "tsbridge")
## End(Not run)