| Gauss_MCMC | R Documentation |
Run the MCMC algorithm for a conditional Gaussian likelihood given (i) a function to initialize model parameters and (ii) a function to sample (i.e., update) model parameters. This is similar to the STAR framework, but without the transformation and rounding.
Gauss_MCMC(
y,
sample_params,
init_params,
nsave = 5000,
nburn = 5000,
nskip = 2,
verbose = TRUE
)
y |
|
sample_params |
a function that inputs data
and outputs an updated list |
init_params |
an initializing function that inputs data |
nsave |
number of MCMC iterations to save |
nburn |
number of MCMC iterations to discard |
nskip |
number of MCMC iterations to skip between saving iterations, i.e., save every (nskip + 1)th draw |
verbose |
logical; if TRUE, print time remaining |
a list with the following elements:
coefficients the posterior mean of the coefficients
fitted.values the posterior mean of the conditional expectation of the data y
post.coefficients nsave posterior draws of the coefficients
post.fitted.values nsave posterior draws of the conditional mean of y
post.pred nsave draws from the posterior predictive distribution of y
post.sigma nsave draws from the posterior distribution of sigma
post.log.like.point nsave draws of the log-likelihood for each of the n observations
logLik the log-likelihood evaluated at the posterior means
WAIC Widely-Applicable/Watanabe-Akaike Information Criterion
p_waic Effective number of parameters based on WAIC
# Fixme
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.