Last chance! 50% off unlimited learning
Sale ends in
Compute exact cross-validation for problematic observations for which approximate leave-one-out cross-validation may return incorrect results.
reloo(x, ...)# S3 method for loo
reloo(x, fit, k_threshold = 0.7, check = TRUE, resp = NULL,
...)
An R object typically of class loo
.
Further arguments passed to
update.brmsfit
such
as iter
, chains
, or cores
.
An R object typically of class brmsfit
.
The threshold at which pareto 0.7
.
See pareto_k_ids
for more details.
Logical; If TRUE
(the default), a crude
check is performed if the loo
object was generated
from the brmsfit
object passed to argument fit
.
Optional names of response variables. If specified, fitted values of these response variables are returned.
An object of the class as x
.
Warnings about Pareto k_threshold
, then reloo
will refit the original model
loo
object.
# NOT RUN {
fit1 <- brm(count ~ log_Age_c + log_Base4_c * Trt + (1|patient),
data = epilepsy, family = poisson())
# throws warning about some pareto k estimates being too high
(loo1 <- loo(fit1))
(loo1 <- reloo(loo1, fit1))
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab