Description Usage Arguments Details Value Author(s) References Examples

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.

1 | ```
waic_hetop(ngk, samps)
``` |

`ngk` |
Numeric matrix of dimension |

`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. |

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).

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). |

J.R. Lockwood jrlockwood@ets.org

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.

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)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.