Re: [R-sig-phylo] variation in rates over time, unexpected message when using Brownie.lite

2012-09-25 Thread Agus Camacho
People, many thanks for keeping this list so functional. Sorry for the
slow reply, had a small accident, but is ok now. I'll answer Liam
first and Ted and Brian in sequence.

Liam, yes, the error is fatal, and the BrownieREML worked. But seems
it did not converged:

These are the results:


 brownieREML(tree,data[,Area_Km2],maxit=2000)$sig2.single
[1] 6.444619e+12

$logL1
[1] -135.4347

$sig2.multiple
   2
4.911978e+12

$logL2
[1] -135.6168

$convergence
[1] FALSE



Also tried the Ouwie option, but then I needed to generate a
simmap.tree. Tried with  make.simmap but the help tells me it only
works for discrete data, and my response variable is continuous. To be
more informative, I pasted below a very small graph of the uncorrected
relationship I want to analyze using phylogenetic methods.


Ted and Brian, thanks for you advice and references on number of species.
Im comparing nearly all known syntopic species of two sister clades with
different morphs. I know thats inappropriate for inferring adaptation and
for estimating several parameters from such a low number of species.
However, I expected to be able to reliably recover the differences between
the two groups and the degree to which phylogeny was explaining the
relationships.
However, for this case, as my data are highly heteroskedastic (see graph
below) and the differences between the treatments is related to the maximum
value that the response variable attains, do you think that adding a
outgroup and performing a Bartlets test over phylogenetic contrasts would
at least make a honest test of the relationship?


Agus
[image: Imágenes integradas 1]
2012/9/18 Theodore Garland Jr theodore.garl...@ucr.edu

 That number of 20 comes up from the simulations provided by both of these
 papers:

 Blomberg, S. P., T. Garland, Jr., and A. R. Ives. 2003. Testing for
 phylogenetic signal in comparative data: behavioral traits are more labile.
 Evolution 57:717-745.

 Freckleton, R. P., P. H. Harvey, and M. Pagel. 2002. Phylogenetic analysis
 and comparative data: a test and review of evidence. Am. Nat. 160:712-726.

 Note, however, that both of those sets of simulations assumed no
 measurement error in the phenotypic trait(s) and no error in the
 phylogenetic topology or branch lengths.  Hence, they may well have
 underestimated how many species you need in the real world!  As they say,
 your mileage may vary ...

 Cheers,
 Ted

 Theodore Garland, Jr.
 Professor
 Department of Biology
 University of California, Riverside
 Riverside, CA 92521
 Office Phone:  (951) 827-3524
 Facsimile:  (951) 827-4286 = Dept. office (not confidential)
 Email:  tgarl...@ucr.edu
 http://www.biology.ucr.edu/people/faculty/Garland.html
 http://scholar.google.com/citations?hl=enuser=iSSbrhwJ

 Experimental Evolution: Concepts, Methods, and Applications of Selection
 Experiments. 2009.
 Edited by Theodore Garland, Jr. and Michael R. Rose
 http://www.ucpress.edu/book.php?isbn=9780520261808
 (PDFs of chapters are available from me or from the individual authors)

 
 From: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org]
 on behalf of Brian O'Meara [bome...@utk.edu]
 Sent: Tuesday, September 18, 2012 1:25 PM
 To: Agus Camacho
 Cc: r-sig-phylo@r-project.org
 Subject: Re: [R-sig-phylo] variation in rates over time, unexpected
 message when using Brownie.lite

 That's a fairly small tree to be doing this with -- an old rule of thumb (I
 think from Pagel) is 20 tips per parameter. Common issues are zero length
 (or effectively zero length) branch lengths (what is min(phy$edge.length)?)
 and polytomies (methodologically not a problem, but many packages don't
 deal well with these).

 Brian

 ___
 Brian O'Meara
 Assistant Professor
 Dept. of Ecology  Evolutionary Biology
 U. of Tennessee, Knoxville
 http://www.brianomeara.info

 Students wanted: Applications due Dec. 15, annually
 Postdoc collaborators wanted: Check NIMBioS' website
 Calendar: http://www.brianomeara.info/calendars/omeara


 On Tue, Sep 18, 2012 at 4:08 PM, Agus Camacho agus.cama...@gmail.com
 wrote:

  Dear all, I tried to test something similar to Jason, but relating the
  change in rates to the acquisition of a trait, instead to a specific
 date.
 
  For that, I used a phylogeny with ten taxa, without outgroup.
  I used exactly the same script gently proposed by Liam but got the
  following error message:
  Error in solve.default(model1$hessian) :Lapack routine dgesv: system is
  exactly singular
 
  I've been looking through the internet but was not able to identify what
  causes this error. Any hint about that?
 
  BTW, anybody knows how to directly answer a message found in the digest
 of
  the mail list, without leaving the thread?
 
  Below, I pasted the complete thread dealing with this topic.
 
  Cheers,
  Agus
 
  Message: 9
  Date: Tue, 18 Sep 2012 00:13:00 -0400
  From: Brian O'Meara bome...@utk.edu
  To: Jason 

[R-sig-phylo] phy.manova from Geiger package gives an error of different variable length with variables of equal length

2012-09-25 Thread Agus Camacho
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.167
C._nicterus   2 2.354167 -0.208
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.74  1.080
V._rubricauda 1 1.462500  0.725
M._maximiliani1 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
-- 
Agustín Camacho Guerrero.
Doutorando em Zoologia.
Laboratório de Herpetologia, Departamento de Zoologia, Instituto de
Biociências, USP.
Rua do Matão, trav. 14, nº 321, Cidade Universitária,
São Paulo - SP, CEP: 05508-090, Brasil.

[[alternative HTML version deleted]]

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


Re: [R-sig-phylo] phy.manova from Geiger package gives an error of different variable length with variables of equal length

2012-09-25 Thread Liam J. Revell

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.167
C._nicterus   2 2.354167 -0.208
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.74  1.080
V._rubricauda 1 1.462500  0.725
M._maximiliani1 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