waic_all: Compute WAIC for all outcomes.

Description Usage Arguments Value Examples

View source: R/RcppExports.R

Description

Compute WAIC for all outcomes.

Usage

1
waic_all(iter, l_pred)

Arguments

iter

The length of the sampled chain.

l_pred

A iter x D matrix of predictive likelihoods (NOT log-likelihoods).

Value

Vector of (1) WAIC for model, (2) standard error for WAIC, and (3) the effective number of parameters.

Examples

1
2
3
data(teacher_rate)
fit_mlr <- gibbs_mlr(rating ~ grade, data = teacher_rate, m = 5)
waic_all(iter = 5, t(lpd(fit_mlr)))

ktw5691/psychtm documentation built on Nov. 3, 2021, 9:10 a.m.