compute_p_si: Compute choice probabilities at posterior samples

View source: R/model_selection.R

compute_p_siR Documentation

Compute choice probabilities at posterior samples

Description

This function computes the probability for each observed choice at the (normalized, burned and thinned) samples from the posterior. These probabilities are required to compute the WAIC and the marginal model likelihood mml.

Usage

compute_p_si(x, ncores = parallel::detectCores() - 1, recompute = FALSE)

Arguments

x

An object of class RprobitB_fit.

ncores

This function is parallelized, set the number of cores here.

recompute

Set to TRUE to recompute the probabilities.

Value

The object x, including the object p_si, which is a matrix of probabilities, observations in rows and posterior samples in columns.


RprobitB documentation built on May 29, 2024, 7:59 a.m.