Description Usage Arguments Value References See Also Examples
View source: R/Gaussian_Inference.r
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.
1 2 3 4 5 | GaussianNIW(
objCopy = NULL,
ENV = parent.frame(),
gamma = list(m = 0, k = 1, v = 2, S = 1)
)
|
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. |
An object of class "GaussianNIW".
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
...
1 2 | obj <- GaussianNIW(gamma=list(m=c(0,1),k=0.0001,v=2,S=diag(2)))
obj #print the content
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.