Timeline for R-squared for glmmTMB with beta distribution and logit link
Current License: CC BY-SA 4.0
23 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 20, 2021 at 10:03 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| Sep 21, 2020 at 5:02 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| May 18, 2020 at 3:06 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| Apr 17, 2020 at 22:33 | answer | added | psolymos | timeline score: 1 | |
| Aug 13, 2018 at 10:25 | comment | added | Guillaume A2 | The code is a copy paste from the Supplementary material (Appendix S6) but is adapted to glmer models. Nakagawa does not provide examples for glmmTMB models. stats::family(mod_ref)$variance yields NULL. Concerning your discrepancy between r2() and Nakagawa's approach, I found the same thing and decided (for other families) to stick with rsquared.glmerMod() which yields the same as sem.model.fits(). | |
| Aug 13, 2018 at 9:59 | comment | added | Daniel | I'm not quite sure if your described code is correct. I've implemented an r2()-function for glmmTMB in my sjstats package, based on the code from Ben Bolker (github.com/glmmTMB/glmmTMB/blob/master/glmmTMB/inst/misc/…). That function does currently not support beta-families (due to the missing of the former mentioned variance-function), but when I run r2() with another model (say, poisson), and then use your implementation of the Nakagawa-approach, I get different results. | |
| Aug 13, 2018 at 9:54 | comment | added | Daniel | What is the variance of your mod_ref? Most families in glmmTMB have a stats::family(x)$variance function, however, this does not exist for the beta-family. | |
| Aug 13, 2018 at 9:37 | comment | added | Daniel | To fixef() applies the same, so you probably need to use fixef()[[1]]. | |
| Aug 13, 2018 at 7:16 | history | edited | Guillaume A2 | CC BY-SA 4.0 | added 12 characters in body |
| Aug 13, 2018 at 7:01 | comment | added | Guillaume A2 | @Daniel Thanks for you interest. I haven't gotten to VarCorr() because the script bugs at VarF <- var(as.vector(model.matrix(mod_ref) %*% fixef(mod_ref))) (line 3 of Nakagawa's method) and at Sf <- var(X %*% Beta) (line 4 of Johnson's method). I added a short reproducible example :) | |
| Aug 13, 2018 at 6:59 | history | edited | Guillaume A2 | CC BY-SA 4.0 | i added a short reproducible example |
| Aug 12, 2018 at 10:29 | comment | added | Daniel | I'm not sure, doesn't glmmTMB return a list for VarCorr(), because it always returns an element for the conditional and the possible zero-inflated model. So you may need VarCorr()[[1]] here, but a reprex would make debugging-life easier. :-) | |
| Aug 4, 2018 at 13:22 | comment | added | Heteroskedastic Jim | I can't think of what is wrong. I've never had this happen whenever doing this except I had non numbers or was multiplying a data.frame by mistake. | |
| Aug 3, 2018 at 14:01 | comment | added | Guillaume A2 | @user162986 Thanks again for pushing things a little further. I added the output of model.matrix(mod_ref) and fixef(mod_ref). They seem pretty typical to me but I rarely dig this deep! | |
| Aug 3, 2018 at 13:59 | history | edited | Guillaume A2 | CC BY-SA 4.0 | I added some outputs to answer a concern |
| Aug 3, 2018 at 11:39 | comment | added | Heteroskedastic Jim | That error usually occurs when one of the objects you're multiplying is not a matrix or contains text. Check the result of model.matrix(mod_ref) to be sure it is what you think it is. | |
| Aug 3, 2018 at 9:02 | comment | added | Guillaume A2 | @user162986 I edited the post in a more detailed way because I tried to use the framework for glmmTMB and ended up with some error messages. Maybe you have some idea as to how to adapt this? Thanks for your interest | |
| Aug 2, 2018 at 14:59 | history | edited | Guillaume A2 | CC BY-SA 4.0 | log was transformed to logit - personal error |
| Aug 1, 2018 at 14:54 | history | edited | Guillaume A2 | CC BY-SA 4.0 | I added another reference, posted the code and the error messages |
| Jul 27, 2018 at 11:22 | comment | added | Heteroskedastic Jim | Is this a mixed model? Or a single level model? If you use the framework of Nakagawa, Schielzeth and Johnson, then it is possible. | |
| S Jul 26, 2018 at 9:39 | history | suggested | tuomastik | CC BY-SA 4.0 | Reformatted, removed unnecessary text |
| Jul 26, 2018 at 9:36 | review | Suggested edits | |||
| S Jul 26, 2018 at 9:39 | |||||
| Jul 26, 2018 at 9:04 | history | asked | Guillaume A2 | CC BY-SA 4.0 |