I have posted a new function to compute phylogenetic signal for continuous traits using two methods: the lambda method of Pagel (1999) and Blomberg et al. (2003)'s K-statistic. Rich Glor already created a very helpful wiki page on how to do this in R using several different functions. My function, phylosig() (code here), should make this even easier. With phylosig() you can specify method (presently either "K" or "lambda") and optionally return a P-value for either the randomization test of Blomberg et al. or a likelihood ratio test against the null hypothesis that lambda=0.
For instance, after loading our function from source, to compute K and conduct a hypothesis test of the null hypothesis of no signal we just type:
By default, the function uses method="K" and nsim=1000.
Next, we can also estimate lambda using maximum likelihood:
Now, for comparison, let's simulate data with no phylogenetic signal:
> x<-rnorm(100); names(x)<-tree$tip.label
Cool. Please check out the function (on my R-phylogenetics page) and let me know how it works.