cctppc: Calculate or Plot the Posterior Predictive Model Checks

Description Usage Arguments Details Value Examples

Description

Plots (and calculates if not calculated already), the posterior predictive model checks for the cctfit object

Usage

1
cctppc(cctfit, polych = FALSE, doplot = TRUE)

Arguments

cctfit

The cctfit object as obtained from the cctapply() function.

polych

used for ordinal data only, if the polychoric correlations, rather than Pearson correlations, should be used (for the posterior predictive checks) – these take a long time to calculate but are more precise in the ordinal data case.

doplot

If the diagnostics should be plotted.

Details

Generates 500 posterior predictive data sets that are randomly sampled from the posterior predictive data; it uses these to calculate 2 posterior predictive checks that respectively pertain to fitting the consensus structure of the data (the number of latent cultures), and if heterogeneous item difficulty should be used.

Value

returns the cctfit object with the posterior predictive data and checks saved.

Examples

1
2
3
4
data(hotcold)
# cctfit <- cctapply(data = hotcold, clusters = 2, itemdiff = TRUE, samples = 10000, 
#                     chains = 3, burnin = 2000, runchecks = FALSE)
# cctfit <- cctppc(cctfit)

CCTpack documentation built on Oct. 10, 2017, 5:03 p.m.