arives / rr2

R2 for correlated data; see https://academic.oup.com/sysbio/advance-article/doi/10.1093/sysbio/syy060/5098616
GNU General Public License v3.0
18 stars 7 forks source link

Added R2_pred and R2_lik for glmmTMB classes #17

Closed jydu closed 2 years ago

jydu commented 4 years ago

These functions are straightforward and rely only on the logLik, fitted, model.frame and model.matrix functions defined for glmmTMB. I feel like the R2_resid could also be implemented for these classes, but since I am not 100% sure I did not implement the corresponding methods. The glmmTMB package needs to be loaded for the functions to work, otherwise, the default methods will be used and lead to an error (e.g. model frame has the wrong dimension).

Hope this may prove useful...

Julien.