Pages

Monday, April 4, 2011

Bug fix in phyl.resid()

I just updated a couple of minor issues with phyl.resid().

First, I realized that with a very minor change to the code I could allow the function to accept multiple variables for x. This would be useful for multivariable regression and size correction. Basically, in the method="lambda" portion of the code, I simply changed:

beta

to:

beta

(method="BM", the default, already worked for multiple x or size variables without modification).

Second, in making this change I realized that there was a small error when the number of y variables was only one. Again, this affected method="lambda". It turns out that although for matrix Y, when:

1 comment:

Note that we never fit a model with multiple Y variables; rather the number of columns of Y determines the number of separate models that we fit. This just allows us to, say, correct for size using phylogenetic regression for a set of different morphological traits simultaneously.

About this blog

This web-log chronicles the development of new tools for phylogenetic analyses in the phytools R package. Unless you a reading a very recent page of the blog, I recommend that you install the latest CRAN version of phytools (or latest beta release) before attempting to replicate any of the analyses of this site. That is because the linked functions may be archived, and very likely have been replaced by newer versions.