I have a question about conditional_effects. When I have a brms object and put it inside the conditional_effects, which a low-level function was used to generate that data for its plot? I find I can extract the data inside the output list, but I find the row number of that data does not meet the data I used to fitted the brms model. So I was wondering how these data were generated.
I am doing a mixed-effect ordinal logit regression:
brm(formula = form ~ dose + (1|id), data = p504, family = cumulative(“probit”), prior = c(prior(normal(0,10), class = “Intercept”),
prior(cauchy(0,10), class = “b”), prior(cauchy(0,1), class = “sd”))
data p504 had 374 rows
I found with the code:
conditional_effects(brms_object, categorical = TRUE, probs = c(0.025, 0.975),robust = TRUE)
I got 300 rows with each probability of three outcomes column by column. It does not have id in the model.
However, when I try to use
fitted(brms_object, probs = c(0.025, 0.975, 0.25, 0.75)) which require id and dose.
I got 374 rows same to my data, with id show inside.
Can you explain how the data generated? is it different from the fitted function? If I want an output with 10 kinds of dose (my x, continue variable), without a specific id inside which the function of fitted required me to add id in the conditions (I guess it would be the population-level effect?), what should I do?