-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get_predicted
confidence intervals in mixed-effects models
#677
Comments
Speaking for myself, the current behavior is not what I would have hoped for and I like the options Vincent suggested. |
Definitely would prefer for the uncertainty due to random effects to be included. But I think this might be a limitation of lme4? I think maybe if we did bootstrap intervals it might work? |
Because the clever linear algebra tricks that lme4 uses, I don't think it's feasible to get correlations between fix effect and random effect estimates in this package. (They could be obtained in glmmTMB but currently aren't provided because they are computationally expensive). We should probably add a message saying that these default intervals don't include uncertainty due to random effects. And then we can recommend using |
How computationally expensive are we talking in the glmmTMB case? |
One possible way is following Ben's suggestion of adding sigma/random effect variances before computing SE for predictions: |
Or we look at |
Re: bootstrap I played around with some ideas and didn't come out reassured. My guess is that a good handling of the nested structure of the data will require something fancy. We probably don't want to give the user the impression that a plain-vanilla approach will give great results by giving them a Re: Bolker He sounds lukewarm about all of these solutions, and ends up recommending Bayes. Seems like a lot of work to implement for a suboptimal result... might be best to just remove CIs or issue a warning. Re: Those are prediction intervals, not confidence, right? |
I think
Ok, you were thinking about some bias adjustment? |
Yep, you're right. |
See lme4/lme4#739 |
At the moment, confidence intervals around predicted values for
lmerMod
only take into account the fixed effects.For example, in a model with Chick-level random intercepts and coefficients, each Chick will have intervals of the exact same width at every time point:
I was chatting with @ASKurz and we were wondering if this is what most users would expect/want. In particular, it seems like many would want the random components to be accounted for in the computation. Should we supply CIs at all, issue a warning, or is the status quo just fine?
Curious what everyone thinks (and maybe especially @bwiernik )
The text was updated successfully, but these errors were encountered: