specifying a "chord" distance matrix in metaMDS
On 22/09/10 22:01 PM, "Mike Rennie" <mikerennie.r at gmail.com> wrote:
Thanks Jari- however, when I try this code, it gives me some results for runs with stresses, says I have a solution reached, and then I get an error: Error in cov.wt(x, x.w) : weights must be non-negative and not all zero I'm assuming this is saying I have either zeros or negative values in my distance matrix? Which I shouldn't- when I specify the distance matrix outside of metaMDS, it's all values between 0 and root 2, and I don't see any zero values.
Mike, The error message comes probably from wascores() that finds the species scores after ordination. To be sure, you can say traceback() after getting the error message to see how the error is propagated. I'm sure that the computer is correct if she claims that some of your species abundances are non-negative or that all are zero. If you think otherwise, you're wrong. Don't argue with computers. If this is wascores() like I assume, the error is caused by the transformed abundance data, and not by the dissimilarities. Create transformed data with tmp <- decostand(orig.data, "norm") and see if there are any negative values (min(tmp), any(tmp < 0)), or all zero columns (any(colSums(tmp) <= 0)). Cheers, Jari Oksanen