--
You received this message because you are subscribed to the Google Groups "brms-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brms-users+unsubscribe@googlegroups.com.
To post to this group, send email to brms-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brms-users/9fb20f68-156b-45f9-aa07-02cbf11ef51f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thank you for your quick response!
Just to make sure that I understand – when re_formula = NULL and no conditions are specified, then for a model with a random intercept, the uncertainty in the random effects included in the predictions is the average uncertainty of all the random intercepts? And when re_formula = NULL and a particular subject is specified in the conditions, then the random intercept for that specific subject is included in the predictions? Is this correct?
Thanks a bunch!
Your intuition about re_formula = NA is correct.When we write re_formula = NULL, without using the conditions argument, we include the *uncertainty* in the random effects in the predictions.
Basically, we increase the variance of the predictions. If we have a model with a non-identity link this may change the mean by some degree as well.Where re_formula = NULL is primarily useful is when you want to plot predictions of separate levels of a random effects. Consider the following example:
library(brms)
data("sleepstudy", package = "lme4")
fit <- brm(Reaction ~ 1 + Days + (1 + Days | Subject), data = sleepstudy)
summary(fit)
conditions <- data.frame(Subject = unique(sleepstudy$Subject))
rownames(conditions) <- unique(sleepstudy$Subject)
me <- marginal_effects(fit, conditions = conditions, re_formula = NULL)
plot(me, ncol = 6, points = TRUE)
2018-02-13 16:07 GMT+01:00 John David Coppin <jdco...@gmail.com>:
I am sure that this is a very basic question, but I am having trouble finding the answer. Thanks for your help!When I compare the two options in marginal effects plots for the fixed effects I am interested in (a 4 category predictor), the plots are pretty different both in terms of means and error.When setting the option to NULL, it includes all random effects. What does this exactly mean? If I have a random intercept, how exactly is this changing the predictions? Does it use the intercept for each random effect individually?I am having a little trouble understanding exactly what the "re_formula" command in the "marginal_effects.brmsfit" means. The default is NA, which means predictions are based only on fixed effects and the estimated error of those parameter estimates, correct?First of all, I love the brms package! This package has allowed me to fit some models for my data that I have not been able to adequately fit before. As an applied statistician who has been teaching himself Bayesian methods, I really appreciate this package.
--
You received this message because you are subscribed to the Google Groups "brms-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brms-users+...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to brms-users+unsubscribe@googlegroups.com.
To post to this group, send email to brms-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brms-users/991b4eb5-6c8c-4b2b-b623-b0d4bac95c2a%40googlegroups.com.