Hi Agus.

I think the problem is that c() concatenates your data for the continuous dependent variables in your model into one long vector. Try instead:

table<-as.matrix(table)
Y<-cbind(table[,2],table[,3])
x<-as.factor(table[,1])
phy.manova(tree,Y,x)

Good luck. - 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://phytools.blogspot.com

On 9/25/2012 11:54 AM, Agus Camacho wrote:
Hope not being abusing of this list.

Possibly, I missed something. I tried both with matrix and dataframe and
reached to the same problem:

phy.manova(tree, c(table$option,table$difoption), table$morph, data.names=NULL, 
nsim=1000, test="Wilks")Warning: no tip labels, order assumed to be the same as 
in the treeError in model.frame.default(formula = as.matrix(td$data) ~ group, 
drop.unused.levels = TRUE)


phy.manova(tree, c(table[,"option"],table[,"difoption"]), table[,"morph"], 
data.names=NULL, nsim=1000, test="Wilks")Error in model.frame.default(formula = as.matrix(td$data) ~ group, 
drop.unused.levels = TRUE) :
   variable lengths differ (found for 'group')> length(table[,"morph"])
  [1] 10> length(table[,"option"])[1] 10> length(table[,"difoption"])
[1] 10


theregoes the data:


                   morph   option  difoption
C._leiolepis          2 2.916667 -0.1666667
C._nicterus           2 2.354167 -0.2083333
C._sinebrachiatus     2 2.464286  0.2857143
S._catimbau           2 2.411765  0.2352941
N._ablephara          2 2.795455  0.1363636
P._erythrocercus      1 1.545455  1.0909091
P._tetradactylus      1 1.740000  1.0800000
V._rubricauda         1 1.462500  0.7250000
M._maximiliani        1 1.269231  0.3846154
P._paeminosus         1 1.307692  0.6153846


Morph is of class factor.

For the developers, thanks for making all these analyses possible.
Cheers,
Agus



_______________________________________________
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo


_______________________________________________
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo

Reply via email to