Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plotFit

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

fitted latent-trait or beta MPT model (traitMPT, betaMPT)

M

number of posterior predictive samples. As a maximum, the number of posterior samples in fittedModel is used.

stat

whether to plot mean frequencies ("mean") or covariances of individual frequencies ("cov")

...

arguments passed to boxplot

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)

TreeBUGS

Hierarchical Multinomial Processing Tree Modeling

v1.4.7
GPL-3
Authors
Daniel W. Heck [aut, cre] (<https://orcid.org/0000-0002-6302-9252>), Nina R. Arnold [aut, dtc], Denis Arnold [aut], Alexander Ly [ctb], Marius Barth [ctb] (<https://orcid.org/0000-0002-3421-6665>)
Initial release
2021-01-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.