plotFit {TreeBUGS} | R Documentation |
Plot Posterior Predictive Mean Frequencies
Description
Plots observed means/covariances of individual frequencies against the means/covariances sampled from the posterior distribution (posterior predictive distribution).
Usage
plotFit(fittedModel, M = 1000, stat = "mean", ...)
Arguments
fittedModel |
|
M |
number of posterior predictive samples. As a maximum, the number of posterior samples in |
stat |
whether to plot mean frequencies ( |
... |
arguments passed to |
Details
If posterior predictive p-values were computed when fitting the
model (e.g., by adding the argument traitMPT(...,ppp=1000)
), the
stored posterior samples are re-used for plotting. Note that the last
category in each MPT tree is dropped, because one category per multinomial
distribution is fixed.
Examples
## Not run:
# add posterior predictive samples to fitted model (optional step)
fittedModel$postpred$freq.pred <-
posteriorPredictive(fittedModel, M = 1000)
# plot model fit
plotFit(fittedModel, stat = "mean")
## End(Not run)
[Package TreeBUGS version 1.5.0 Index]