plotFit | R Documentation |
Plots observed means/covariances of individual frequencies against the means/covariances sampled from the posterior distribution (posterior predictive distribution).
plotFit(fittedModel, M = 1000, stat = "mean", ...)
fittedModel |
fitted latent-trait or beta MPT model ( |
M |
number of posterior predictive samples. As a maximum, the number of posterior samples in |
stat |
whether to plot mean frequencies ( |
... |
arguments passed to |
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.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.