BMSC_loo: loo and waic.

View source: R/BMSC-loo.R

BMSC_looR Documentation

loo and waic.

Description

bmscstan wrapper for computing approximate leave-one-out cross-validation (loo) and Watanabe-Akaike Information Criterion or Widely Applicable Information Criterion (WAIC) using PSIS-LOO for the single case and the control group

Usage

BMSC_loo(x, cores = 1, ...)

BMSC_waic(x, ...)

## S3 method for class 'loo_BMSC'
plot(x, ...)

## S3 method for class 'waic_BMSC'
print(x, ...)

## S3 method for class 'loo_BMSC'
print(x, ...)

Arguments

x

An object of class BMSC, resulting from the BMSC function.

cores

The number of cores for the 'loo::relative_eff' function

...

for 'BMSC_loo' and 'BMSC_waic' further arguments passed to the 'loo::extract_log_lik' function. for 'print' and 'plot' methods further arguments to be passed to the 'print' or 'plot' functions

Value

for 'BMSC_loo' a list with the log likelihood of the single case and the control group, the MCMC effective sample size divided by the total sample size, and the leave-one-out cross-validation. For 'BMSC_waic' a list with the log likelihood of the single case and the control group, and the waic scores.


bmscstan documentation built on Sept. 5, 2022, 1:05 a.m.