rPosteriorPredictive.GaussianNIW: Posterior predictive random generation of a "GaussianNIW" object
Description
Generate random samples from the posterior predictive distribution of the following structure:
theta|gamma ~ NIW(gamma)
x|theta ~ Gaussian(theta)
where theta = (mu,Sigma) is the Gaussian parameter, gamma = (m,k,v,S) is the Normal-Inverse-Wishart(NIW) parameter.
The model structure and prior parameters are stored in a "GaussianNIW" object.
Posterior predictive is a distribution of x|gamma.
Usage
# S3 method for GaussianNIW
rPosteriorPredictive(obj, n, ...)
Arguments
obj
A "GaussianNIW" object.
n
integer, number of samples.
...
Additional arguments to be passed to other inherited types.
Value
A matrix of n rows, each row is a sample.
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).