View source: R/PolyaTreeFunctions.R
PolyaTreePredDraws | R Documentation |
Generate draws from a Polya Tree model's Predictive distribution
PolyaTreePredDraws(PolyaTreePriorLik, ndraw = 2000)
PolyaTreePriorLik |
An object constructed by PolyaTreePriorLikCons for a dataset. |
ndraw |
Number of draws desired from Predictive Polya Tree distribution. |
A list of draws from the Predictive Polya Tree Posterior
set.seed(100)
dataset1 = rnorm(200)
PTmodel1 = PolyaTreePriorLikCons(datasetX = dataset1, Ginv = qnorm)
Predictiveposteriordraws = PolyaTreePredDraws(PTmodel1, ndraw = 400)
plot(density(Predictiveposteriordraws))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.