Open daijiang opened 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.
rr2::R2_resid
scal <- prod(diag(s2 * phyV))^(1/n)
Inf
https://github.com/daijiang/phyr/blob/d0f91d9213fe562ce61ee2fe051f51363c25ade0/R/pglmm_compare.R#L292
This sounds like a good idea, and I can't see any reason not to.
@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 thescal <- prod(diag(s2 * phyV))^(1/n)
will beInf
.https://github.com/daijiang/phyr/blob/d0f91d9213fe562ce61ee2fe051f51363c25ade0/R/pglmm_compare.R#L292