Mixed models: How to generate predictions "fixed" (marginalised?) over the random factors #2390
Unanswered
DominiqueMakowski
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Maybe I'm misunderstanding, but do you just want μ_intercept + μ_x * x[i, 1] ? If you want to marginalize over the participants, then you need a notion of what the distribution of the participants are (which it doesn't seem like you have here, IIUC) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Let's start with a simple linear mixed model that takes
participant
as random factors.I can easily generate predictions on the original data, useful for instance for posterior predictive checks.
However, often for visualization purposes / postprocessing (marginal effects computation) we would need to generate predictions on new data, for instance on a data "grid" with specific values. While these values are often specifically chosen for the fixed effects, we are often interested in "marginalising" over the random effects, i.e., having the average prediction for the average random factor.
I thought that one way to go about it would be to also set
participant
asmissing
, but that doesn't seem to be the correct way.Any advice on how to achieve something like that?
Beta Was this translation helpful? Give feedback.
All reactions