daijiang / phyr

Functions for phylogenetic analyses
https://daijiang.github.io/phyr/
GNU General Public License v3.0
30 stars 10 forks source link

standardize vcv #66

Open daijiang opened 3 years ago

daijiang commented 3 years ago

@arives should we standardize the vcv matrix here too? Without doing so, sometimes, the diag values are too large, and then rr2::R2_resid will have value of 1 because the scal <- prod(diag(s2 * phyV))^(1/n) will be Inf.

https://github.com/daijiang/phyr/blob/d0f91d9213fe562ce61ee2fe051f51363c25ade0/R/pglmm_compare.R#L292

arives commented 3 years ago

This sounds like a good idea, and I can't see any reason not to.