Description Usage Arguments Value See Also Examples
View source: R/Gaussian_Inference.r
Generate random samples from the posterior distribution of the following 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.
The model structure and prior parameters are stored in a "GaussianNIW" object.
Posterior distribution is NIW(mu,Sigma|m,k,v,S).
1 2 | ## S3 method for class 'GaussianNIW'
rPosterior(obj, ...)
|
obj |
A "GaussianNIW" object. |
... |
Additional arguments to be passed to other inherited types. |
list(mu,Sigma), where mu is a numeric vector, Sigma is a symmetric positive definite matrix.
GaussianNIW
, dPosterior.GaussianNIW
1 2 | obj <- GaussianNIW(gamma=list(m=c(0,0),k=1,v=2,S=diag(2)))
rPosterior(obj = obj)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.