GaussianNIW: Create objects of type "GaussianNIW". In bbricks: Bayesian Methods and Graphical Model Structures for Statistical Modeling

Description

Create an object of type "GaussianNIW", which represents the Gaussian-Normal-Inverse-Wishart (Gaussian-NIW) conjugate structure:

mu,Sigma|m,k,v,S \sim NIW(m,k,v,S)

x|mu,Sigma \sim Gaussian(mu,Sigma)

Where NIW() is the Normal-Inverse-Wishart distribution, Gaussian() is the Gaussian distribution. See `?dNIW` and `dGaussian` for the definitions of these distribution.
This 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``` ```GaussianNIW( objCopy = NULL, ENV = parent.frame(), gamma = list(m = 0, k = 1, v = 2, S = 1) ) ```

Arguments

 `objCopy` An object of type "GaussianNIW". If "objCopy" is not NULL, the function create a new "GaussianNIW" object by copying the content from objCopy, otherwise this new object will be created by using "ENV" and "gamma". Default NULL. `ENV` environment, specify in which environment the object will be created. `gamma` list, a named list of NIW parameters, gamma=list(m,k,v,S). Where gamma\$m is a numeric "location" parameter; gamma\$S is a symmetric positive definite matrix representing the "scale" parameters; gamma\$k and gamma\$v are numeric values.

Value

An object of class "GaussianNIW".

References

Murphy, Kevin P. "Conjugate Bayesian analysis of the Gaussian distribution." def 1.22 (2007): 16.

Gelman, Andrew, et al. "Bayesian Data Analysis Chapman & Hall." CRC Texts in Statistical Science (2004).

`posterior.GaussianNIW`,`posteriorDiscard.GaussianNIW`,`MAP.GaussianNIW`,`MPE.GaussianNIW`,`marginalLikelihood.GaussianNIW`,`rPosteriorPredictive.GaussianNIW`,`dPosteriorPredictive.GaussianNIW` ...

Examples

 ```1 2``` ```obj <- GaussianNIW(gamma=list(m=c(0,1),k=0.0001,v=2,S=diag(2))) obj #print the content ```

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