GaussianInvWishart: Create objects of type "GaussianInvWishart".

Description Usage Arguments Value References See Also Examples

View source: R/Gaussian_Inference.r

Description

Create an object of type "GaussianInvWishart", which represents the Gaussian and Inverse-Wishart conjugate structure:

x \sim Gaussian(mu,Sigma)

Sigma \sim InvWishart(v,S)

mu is known. Gaussian() is the Gaussian distribution. See ?dGaussian and ?dInvWishart for the definition of the distributions.
The created object will be used as a place for recording and accumulating information in the related inference/sampling functions such as posterior(), posteriorDiscard(), MAP(), marginalLikelihood(), dPosteriorPredictive(), rPosteriorPredictive() and so on.

Usage

1
2
3
4
5
GaussianInvWishart(
  objCopy = NULL,
  ENV = parent.frame(),
  gamma = list(mu = 0, v = 3, S = 1)
)

Arguments

objCopy

an object of type "GaussianInvWishart". If "objCopy" is not NULL, the function create a new "GaussianInvWishart" object by copying the content from objCopy, otherwise this new object will be created by using "ENV" and "gamma". Default NULL.

ENV

environment, specify where the object will be created.

gamma

list, a named list of parameters, gamma=list(mu,v,S). Where gamma$mu is the known mean vector of x, gamma$v and gamma$S are the prior degree of freedom and scale of Sigma.

Value

An object of class "GaussianInvWishart".

References

Gelman, Andrew, et al. Bayesian data analysis. CRC press, 2013.

See Also

posterior.GaussianInvWishart,posteriorDiscard.GaussianInvWishart,MAP.GaussianInvWishart,MPE.GaussianInvWishart,marginalLikelihood.GaussianInvWishart,rPosteriorPredictive.GaussianInvWishart,dPosteriorPredictive.GaussianInvWishart ...

Examples

1
2
obj <- GaussianInvWishart(gamma=list(mu=c(-1.5,1.5),v=3,S=diag(2)))
obj #print the content

bbricks documentation built on July 8, 2020, 7:29 p.m.