Skip to contents

The pointwise log-likelihood of the observed data, suitable for loo::loo().

Usage

# S3 method for class 'kb_fit'
log_lik(object, ...)

Arguments

object

A kb_fit object.

...

These dots are for future extensions and must be empty.

Value

A draws-by-observations (D x N) matrix.

Details

Each value is the log density of the response as recorded (for example weight in kg, not log weight), so models of the same response can be compared with loo::loo_compare().

Examples

ll <- log_lik(fit_weight_sim_nereo)
dim(ll)
#> [1] 1500  660