-
Notifications
You must be signed in to change notification settings - Fork 15
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
ranef in predictInterval extremely slow #119
Comments
Commented in linked issue: there isn't anything to do about |
Thank you both. I am not on GitHub nearly as much these days so I am just seeing this now. It is certainly true that the repeated This is really helpful and I see the PR from @bbolker I unfortunately have limited time to maintain the package, but as I noted in #118 there is a need for a refactor of |
There are two minor test failures caused by #120 in |
I can try to take a look if you want (hopefully the fixes are fairly simple once you dig in and look at the failures ... ??) |
I will update and tag you @bbolker if I can't get a line on it - I have a little gap in my schedule today to look at it and it's a good chance to get refamiliar with the code. |
I think I have fixed it with 3abd5fc There was one place the sparse matrix wasn't made dense for an edge case with nested random effects. It was easy to adapt the code you used above. The other issues you raised are important. I like the idea of ensuring it is consistent with I do also think the |
Hi,
I am having an issue where the predictInterval is extremely slow, taking about 70 seconds to execute. After some profiling I've discovered that the ranef() calls take up 99% the compute time.
To test this, what I did was copy the predictInterval function and the helpers methods, precompute the randef, and pass them in to a modified version of predictInterval, e.g.
Then it basically runs under a second.
From what I can see in the code, there is really no reason to have to re-extract the random effects over and over (it's used in about 3 places) since the model doesn't change. But the actual problem is that the ranef() call is just extremely slow. I created a ticket on the lme4 project as well lme4/lme4#637. I'm using the latest version of lme4.
The text was updated successfully, but these errors were encountered: