rPosteriorPredictive.GaussianGaussian {bbricks} | R Documentation |
Generate random samples from the posterior predictive distribution of the following structure:
x \sim Gaussian(mu,Sigma)
mu \sim Gaussian(m,S)
Where Sigma is known. Gaussian() is the Gaussian distribution. See ?dGaussian
for the definition of Gaussian distribution.
The model structure and prior parameters are stored in a "GaussianGaussian" object.
Posterior predictive is a distribution of x|m,S,Sigma.
## S3 method for class 'GaussianGaussian' rPosteriorPredictive(obj, n = 1, ...)
obj |
A "GaussianGaussian" object. |
n |
integer, number of samples. |
... |
Additional arguments to be passed to other inherited types. |
A matrix of n rows, each row is a sample.
Gelman, Andrew, et al. Bayesian data analysis. CRC press, 2013.
GaussianGaussian
, dPosteriorPredictive.GaussianGaussian
obj <- GaussianGaussian(gamma=list(Sigma=matrix(c(2,1,1,2),2,2),m=c(0.2,0.5),S=diag(2))) rPosteriorPredictive(obj=obj,20)