Cross Validated
2022-09-28 19:47 UTC
By Picapica
AI-113-20220928-social-media-0f0afd7e
Is it incorrect to calculate residuals directly from a phylogenetically-controlled linear regression?
I would like to calculate the residuals from a regression of log body mass and log brain mass, controlling for phylogeny. I originally used phylolm in R to run this regression, under a Brownian Motion assumption. I then saw that there is a function (phyl.resid) in phytools that is designed to calculate this, so I used that (again, set under the Brownian Motion assumption). I compared the two methods and the results are very different (I've double-checked that they are both using the same data and tree). Is the first method wrong? I also ran a non-phylogenetic regression and the pattern of residuals from that is almost identical to that given by phyl.resid. Can anyone explain why phylolm might be giving such a different result? I'm not sure which method I should be using.
I would like to calculate the residuals from a regression of log body mass and log brain mass, controlling for phylogeny. I originally used phylolm in R to run this regression, under a Brownian Motion assumption. I then saw that there is a function (phyl.resid) in phytools that is designed to calculate this, so I used that (again, set under the Brownian Motion assumption). I compared the two methods and the results are very different (I've double-checked that they are both using the same data and tree). Is the first method wrong? I also ran a non-phylogenetic regression and the pattern of residuals from that is almost identical to that given by phyl.resid. Can anyone explain why phylolm might be giving such a different result? I'm not sure which method I should be using.
Full article content could not be extracted automatically. Read the original below.
Source:
Cross Validated
· stats.stackexchange.com