h.fit: Fitted Volatility Series from Simulated Parameters

Description Usage Arguments Value Author(s) See Also Examples

View source: R/h.fit.R

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

1
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

1
2
3
4
5
6
## 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)

tsbridge documentation built on May 30, 2017, 1:14 a.m.