waic_hetop: WAIC for FH-HETOP model

Description Usage Arguments Details Value Author(s) References Examples

Description

Computes the Watanabe-Akaike information criterion (WAIC) for the FH-HETOP model using the data and posterior samples of the group means, group standard deviations and cutpoints.

Usage

1
waic_hetop(ngk, samps)

Arguments

ngk

Numeric matrix of dimension G x K in which column k of row g indicates the number of units from group g falling into category k.

samps

A matrix of posterior samples that includes at least the group means, group standard deviations and the cutpoints. Column names for these three collections of parameters must contain the strings 'mu', 'sigma' and 'cuts', respectively.

Details

Although this function can be called directly by the user, it is primarily intended to be used to compute WAIC as part of the function fh_hetop. Details on the WAIC calculation are provided by Vehtari and Gelman (2017).

Value

A list with the following components:

lpd_hat

Part 1 of the WAIC calculation: the estimated log pointwise predictive density, summed across groups.

phat_waic

Part 2 of the WAIC calculation: the effective number of parameters.

waic

The WAIC criterion: -2 times (lpd_hat - phat_waic).

Author(s)

J.R. Lockwood jrlockwood@ets.org

References

Lockwood J.R., Castellano K.E. and Shear B.R. (2018). “Flexible Bayesian models for inferences from coarsened, group-level achievement data,” Journal of Educational and Behavioral Statistics. 43(6):663–692.

Vehtari A., Gelman A. and Gabry J. (2017). “Practical Bayesian model evaluation using leave-one-out cross-validation and WAIC,” Statistics and Computing. 27(5):1413–1432.

Examples

1
2
3
4
## example call using data 'ngk' and FH-HETOP model object 'm'
## (demonstrated in examples for fh_hetop):
##
## waic_hetop(ngk, m$BUGSoutput$sims.matrix)

HETOP documentation built on June 28, 2019, 5:03 p.m.

Related to waic_hetop in HETOP...