Hi Agus (& list).

Thanks for sending along your files. This is what I discovered:

1) Your tree had an extra taxon ("robusta") not represented in your data.
2) However, when removed the analysis still doesn't work because some of your environmental variables seem to be perfect linear combinations of other variables (this creates a "computationally singular" error). 3) When I subsampled the columns of X, the function returned the following error:
Error in ccs > 0 : invalid comparison with complex values

This turns out to be because some parts of the calculation result in complex numbers. (I think this is just rounding error in spectral decomposition because some eigenvalues of the cross-product matrices are almost exactly zero and have tiny imaginary parts.) However in later steps the imaginary part of these numbers go to zero. R doesn't automatically change the class of a complex number to real when it's imaginary part disappears.

I'll try and fix this final issue, but I can't do much about (1) & (2).

Thanks for the report!

- Liam

Liam J. Revell, Assistant Professor of Biology
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
email: liam.rev...@umb.edu
blog: http://blog.phytools.org

On 7/17/2013 2:10 AM, Agus Camacho wrote:
Dear list,

Im trying to perform a phylogenentic CCA, using the function phyl.cca from
Liam Revell's site.

I used several steps to guarantee that the names of the compared matrices
(enviro1 and morpho1) are the same, in the same order, the same as the tree,
etc.

However it keeps sending me the error message:


Error in phyl.cca(tree, morpho, enviro1) : subscript out of bounds

It smells to something is not pairing well among the two matrices, but
i cant tell what it could be.

Any hint?


The whole script im using is:

enviro1=na.omit(enviro[tree$tip,c(20:40)])> filter=rownames(enviro1)> 
enviro1=as.matrix(enviro1)> morpho1=na.omit(morpho[tree$tip,c(3:5)])> 
morpho1=morpho1[filter,]> morpho1=as.matrix(morpho1)> dim(enviro1)[1] 62 21> dim(morpho1)[1] 
62  3> setdiff(rownames(morpho1),rownames(enviro1))character(0)

result<-phyl.cca(tree,morpho,enviro1)Error in phyl.cca(tree, morpho, enviro1) : 
subscript out of bounds







_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/


_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Reply via email to