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
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.
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).
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).
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.
# NOT RUN {## example call using data 'ngk' and FH-HETOP model object 'm'## (demonstrated in examples for fh_hetop):#### waic_hetop(ngk, m$BUGSoutput$sims.matrix)# }