I am getting started with bayesian analysis, so let me know if my question does not make sense. I’m using brms, and I want to plot the priors for my conditional effects.
This much is okay:
# Fit the model
my.brms.model.fit <- brm(eff ~ fct1 * fct2 + (1 | subject_id),
data = my.data)
# Display the final estimates for the regression coefficients
summary(my.brms.model.fit)
# Plot the final estimates for conditional effects, example:
plot(conditional_effects(my.brms.model.fit,
effects = "fct1",
conditions = data.frame(fct2 = c("fc2.level1"))))
# Display the priors for the regression coefficients
prior_summary(my.brms.model.fit)
However, how do I plot the priors for my conditional effects?
# This fails with no applicable method for 'conditional_effects'
# applied to an object of class "c('brmsprior', 'data.frame')"
plot(conditional_effects(prior_summary(my.brms.model.fit)))
How do I achieve this?
Another way I guessed could be to supply empty data:
my.brms.model.fit <- brm(eff ~ fct1 * fct2 + (1 | subject_id),
data = my.data %>% filter(fct1 == ''))
But that gives me the error Argument 'data' does not contain observations.
- Operating System: Linux / Ubuntu 24.04 VM
- brms Version: 2.23.0