loo.RprobitB_fit: Compute approximate leave-one-out cross-validation

View source: R/evaluation.R

looR Documentation

Compute approximate leave-one-out cross-validation

Description

Computes Pareto-smoothed importance-sampling leave-one-out cross-validation using loo::loo().

Usage

loo(x, ...)

## S3 method for class 'RprobitB_fit'
loo(x, ghk_draws = 500L, progress = interactive(), ...)

Arguments

x

[RprobitB_fit]
Fitted choice model.

...

Further arguments passed to loo::loo().

ghk_draws

[integer(1)]
Number of draws of the GHK simulator for multivariate normal probabilities of more than three dimensions, see oeli::pmvnorm().

progress

[logical(1)]
Show progress?

Value

A psis_loo object from loo. It contains estimates and standard errors as well as one Pareto-k diagnostic per independent likelihood unit.

References

\insertRef

Vehtari2017RprobitB

\insertRef

Vehtari2024RprobitB

Examples

set.seed(1)
model <- fit(
  choice ~ x | 0, dgp_parameters = list(beta = c(x = 1)), n_occasions = 5,
  chains = 1
)
loo(model)

RprobitB documentation built on Sept. 20, 2026, 9:07 a.m.