Learn R Programming

Boom (version 0.9.15)

log.integrated.gaussian.likelihood: Log Integrated Gaussian Likelihood

Description

Compute the log of the integrated Gaussian likelihood, where the model paramaters are integrated out with respect to a normal-inverse gamma prior.

Usage

LogIntegratedGaussianLikelihood(suf, prior)

Value

Returns a scalar giving the log integrated likelihood.

Arguments

suf

A GaussianSuf object describing the data.

prior

A NormalInverseGammaPrior describing the prior distribution.

Author

Steven L. Scott steve.the.bayesian@gmail.com

Examples

Run this code

prior <- NormalInverseGammaPrior(10, 2, sqrt(2), 1)
y <- c(7.8949, 9.17438, 8.38808, 5.52521)
suf <- GaussianSuf(y)
loglike <- LogIntegratedGaussianLikelihood(suf, prior)
# -9.73975

Run the code above in your browser using DataLab