-
-
Notifications
You must be signed in to change notification settings - Fork 204
Open
Labels
Milestone
Description
The following plots the conditional effects as probability but the data points as counts. I was not able to figure out how to have both either in probability scale or count scale. If it's possible, then documentation could be updated, if it's not possible then additional argument to make it possible could be added
library(brms)
options(brms.backend = "cmdstanr", mc.cores = 4)
ggplot2::theme_set(bayesplot::theme_default(base_family = "sans", base_size=16))
df_bioassay <- data.frame(
dose = c(-0.86, -0.30, -0.05, 0.73),
batch_size = c(5, 5, 5, 5),
deaths = c(0, 1, 3, 5)
)
bfit1 <- brm(deaths | trials(batch_size) ~ dose,
family = binomial(),
data = df_bioassay,
refresh = 0)
plot(conditional_effects(bfit1), points=TRUE)