If you run a brms model with just warmup samples, and you call the model object (which calls the summary function), you get an error:
fit1 <- brm(count ~ zAge + zBase * Trt + (1|patient),
data = epilepsy,
family = poisson(),
warmup = 1000,
save_warmup = TRUE,
iter = 1000)
fit1
#> Error in object$fit@stan_args[[1]] : subscript out of bounds
or a different error with the cmdstanr backend:
fit2 <- brm(count ~ zAge + zBase * Trt + (1|patient),
data = epilepsy,
family = poisson(),
warmup = 1000,
iter = 1000,
save_warmup = TRUE,
backend = 'cmdstanr')
fit2
#> Error in `[.data.frame`(full_summary, , "Rhat") :
#> undefined columns selected
If you acces the fit slot, instead you get a more informative message:
fit1$fit
#> Stan model 'model_a52a580d3cb87237a8fc6e2875fe741c-202403181850-1-509462' does not contain samples after warmup.
It could be nice, though not high priority by any means, to give a similar message instead of throwing an error when you call the brmsfit object as well.
If you run a brms model with just warmup samples, and you call the model object (which calls the summary function), you get an error:
or a different error with the cmdstanr backend:
If you acces the fit slot, instead you get a more informative message:
It could be nice, though not high priority by any means, to give a similar message instead of throwing an error when you call the brmsfit object as well.