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
A closer look at dispformula=~0 - never needing the R-side in gaussian mixed models again? #653
Comments
One piece of low-hanging fruit would be to allow the small non-zero value (currently |
Do you think that experimenting with even smaller non-zero values would actually resolve issues in some cases? I assume you already chose To me this issue was actually more to see if you had any objections or apprehensions to the approach described. It seems that you don't and if so I'm fine with closing this issue and in the future I can refer skeptic colleagues to it 😀 P.S. I wrote a mini documentation on this now |
There is an example here (you'll need to I admit I don't understand the behaviour of this example: the random-effects variance decreases a lot when the fixed residual variance is decreased. I don't know whether this represents a bug (although the code to implement this feature is pretty simple, it's hard to see what could go wrong ...?) or an aspect of the stats I don't understand. It might be worth trying with a less mis-specified model (e.g. |
This is now in #659 (and there are some better tests). |
Thoughts on this? Shall we go ahead and close it once #659 is accepted? I admit I don't have much to say about this, beyond the fact that adding this flexibility seems something that has advantages for people who want to use it and doesn't have a big downside (tiny increase in code complexity). @SchmidtPaul do you want to play around with it a bit? As far as resolving errors go: in my experience the "false convergence" warning has always been fairly mysterious: from the documentation
In this case it's hard to believe the gradient is computed incorrectly (since it's computed by AD) or that the objective function or gradient are discontinuous, which leaves "the other stopping tolerances may be too tight". I don't even know what that means. My guess would be that any improvement on the fit/change in warning behaviour would be haphazard. |
Thank you for the effort and your comments on this! As stated above, it would be fine for me to close this issue now as I may or may not find time to play around with it in the future. |
In the plant sciences and related fields we often deal with linear mixed models with non-iid variance structures:
Therefore, in the past I was forced to use
nlme
with itsweights =
argument and basically hoped that my model would not get too complex. If it did get too complex, I switched to theasreml
package or even SAS'PROC MIXED
and itsREPEATED
argument. Both of them are certainly great, but not open source. I was happy to learn aboutglmmTMB
's ability to deal with variance structures while giving me the advantages oflme4
. I was really happy when I found this in the documentation:Fixing the residual variance to be 0 and then mimicing it with an additional random effect should theoretically lead to identical results. In addition, I may now use all the variance structures with this pseudo error term. So all the problems are solved! What is this issue about then? It's basically this:
How well does
dispformula=~0
really do the trick? What are the caveats and is there more info/citeable proof somewhere of how well it works?Here is an example of how the pseudo-error-approach can lead to obtaining essentially identical variance component estimates and AICc values.
Created on 2020-12-17 by the reprex package (v0.3.0.9001)
Although this works to satisfaction, there are the first two caveats that become apparent:
false convergence
warning for the pseudo-error-model but not for the standard model.It can be argued that these are minor, acceptable issues and not so practically relevant. But this is basically how far my train of thought has come and I wanted to reach out to you as I am interested in your thoughts on this.
Thanks!
More stuff on this:
Shamelessly referring to my github page with more examples of how to different mixed models with variance structures translate between packages.
Also, this issue bbolker/broom.mixed#97 is related
The text was updated successfully, but these errors were encountered: