[R-sig-phylo] Cross-validation with independent contrasts

2014-05-16 Thread Diego Bilski
Dear all,

I'm wondering if it would be statistically/philosophically correct to use
n-fold cross-validation to evaluate a linear regression with independent
contrasts. My doubt comes from the fact that when simply dividing the IC
dataset in, lets say, 10 folds, some folds will remove the contrasts of
internal nodes without necessarily removing an entire clade above that
point, producing what can be viewed as two independent clades (a graphical
example would be, in Felsenstein's seminal paper, fig. 8, remove the
contrast at node 13, while keeping those at nodes 9 and/or 10).

Any thoughts?

Best wishes,

Diego Bilski

[[alternative HTML version deleted]]

___
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] Concentrated changes test

2014-05-16 Thread Matt Pennell
Hi everyone,

Just a quick question: I was wondering if there is a R implementation of
Wayne Maddison's (1990) concentrated changes test (
http://www.jstor.org/stable/2409434). After a little looking around, I
can't seem to find it but was hoping someone else might have some ideas.

Thanks in advance,
Matt

[[alternative HTML version deleted]]

___
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/


Re: [R-sig-phylo] Concentrated changes test

2014-05-16 Thread Theodore Garland Jr
Isn't it in Mesquite?

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

Director, UCR Institute for the Development of Educational Applications
http://idea.ucr.edu/

Inquiry-based Middle School Lesson Plan:
Born to Run: Artificial Selection Lab
http://www.indiana.edu/~ensiweb/lessons/BornToRun.html

Fail Lab: Episode One
http://testtube.com/faillab/zoochosis-episode-one-evolution
http://www.youtube.com/watch?v=c0msBWyTzU0


From: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] on 
behalf of Matt Pennell [mwpenn...@gmail.com]
Sent: Friday, May 16, 2014 9:04 AM
To: R-phylo Mailing-list
Subject: [R-sig-phylo] Concentrated changes test

Hi everyone,

Just a quick question: I was wondering if there is a R implementation of
Wayne Maddison's (1990) concentrated changes test (
http://www.jstor.org/stable/2409434). After a little looking around, I
can't seem to find it but was hoping someone else might have some ideas.

Thanks in advance,
Matt

[[alternative HTML version deleted]]

___
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/


Re: [R-sig-phylo] plot trees after different branch transformations

2014-05-16 Thread Liam J. Revell

It looks like transform.phylo has been deprecated. Use rescale.phylo.

All the best, 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 5/16/2014 2:20 PM, Agus Camacho wrote:

Dear list users,

Im trying to show what happens when we apply lambda transformations to a
tree.

For that, I was following swenson's book explanations:

library(geiger)
lambda.phylo=transform(tree,1)

however,  I got the following errors:


lambda.phylo=transform(tree,lambda)

Error in as.data.frame.default(x[[i]], optional = TRUE, stringsAsFactors =
stringsAsFactors) :   cannot coerce class phylo to a data.frame


lambda.phylo=geiger::transform(tree,lambda)

Error: 'transform' is not an exported object from 'namespace:geiger'

Any one would point to a workaround for branch transformation and posterior
visualization of the tree?

Thanks in advance.
Agus



___
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/


Re: [R-sig-phylo] plot trees after different branch transformations

2014-05-16 Thread Luke Harmon
Hi Agus - 

Geiger has changed - now you should use rescale. E.g.

library(geiger)
geo - get(data(geospiza))
lphy - rescale(geo$phy, lambda, 0.5) # transform tree in one fell swoop
plot(lphy)



On May 16, 2014, at 11:20 AM, Agus Camacho agus.cama...@gmail.com wrote:

 Dear list users,
 
 Im trying to show what happens when we apply lambda transformations to a
 tree.
 
 For that, I was following swenson's book explanations:
 
 library(geiger)
 lambda.phylo=transform(tree,1)
 
 however,  I got the following errors:
 
 lambda.phylo=transform(tree,lambda)
 Error in as.data.frame.default(x[[i]], optional = TRUE, stringsAsFactors =
 stringsAsFactors) :   cannot coerce class phylo to a data.frame
 
 lambda.phylo=geiger::transform(tree,lambda)
 Error: 'transform' is not an exported object from 'namespace:geiger'
 
 Any one would point to a workaround for branch transformation and posterior
 visualization of the tree?
 
 Thanks in advance.
 Agus
 
 -- 
 Agustín Camacho Guerrero.
 Doutor 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
 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/


Re: [R-sig-phylo] Cross-validation with independent contrasts

2014-05-16 Thread Diego Bilski
Thank you both, Ted and Joe,

My first (or second) option would be doing what Ted suggested, but it will
require a bit more coding than just using already existing functions. I
will try to do that anyway, and compare the results to those from the
cross-validation on the independent contrasts.

Best,

Diego




On Fri, May 16, 2014 at 2:10 PM, Joe Felsenstein j...@gs.washington.eduwrote:

 Diego Bilski --

  I'm wondering if it would be statistically/philosophically correct to use
  n-fold cross-validation to evaluate a linear regression with independent
  contrasts. My doubt comes from the fact that when simply dividing the IC
  dataset in, lets say, 10 folds, some folds will remove the contrasts of
  internal nodes without necessarily removing an entire clade above that
  point, producing what can be viewed as two independent clades (a
 graphical
  example would be, in Felsenstein's seminal paper, fig. 8, remove the
  contrast at node 13, while keeping those at nodes 9 and/or 10).

 and Ted Garland wrote:

 Couldn't you also just do this back at the level of the original tree and
  tip data, creating subsets by pruning the tree before you compute
 contrasts?
 

 Under the model of multivariate normality with Brownian Motion
 change along the phylogeny, the contrasts are i.i.d. so of course
 one can use them as points for cross-validation.  But of course,
 unless the regression is nonlinear, there is already a parametric
 framework for distributions of regression coefficients (and other
 associated phenomena) in that i.i.d. MVN framework.

 The issue of what entities should be sampled in cross-validation
 depends on how, at what level, you expect the model to depart from
 multivariate normality with Brownian Motion.  Diego and Ted seem to
 have some such expectation but I can't see what that alternative
 model would be.

 Joe
 
 Joe Felsenstein j...@gs.washington.edu
  Department of Genome Sciences and Department of Biology,
  University of Washington, Box 355065, Seattle, WA 98195-5065 USA

 [[alternative HTML version deleted]]

 ___
 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/


[[alternative HTML version deleted]]

___
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/


Re: [R-sig-phylo] plot trees after different branch transformations

2014-05-16 Thread Agus Camacho
Thank you both,

However,

 geo - get(data(geospiza))
 lphy - rescale(geo$phy, lambda, 0.5) # transform tree in one fell swoop
Error in colMeans(x, na.rm = TRUE) : 'x' must be numeric

I got this error also for simulated and other real trees.


2014-05-16 15:24 GMT-03:00 Liam J. Revell liam.rev...@umb.edu:

 It looks like transform.phylo has been deprecated. Use rescale.phylo.

 All the best, 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 5/16/2014 2:20 PM, Agus Camacho wrote:

 Dear list users,

 Im trying to show what happens when we apply lambda transformations to a
 tree.

 For that, I was following swenson's book explanations:

 library(geiger)
 lambda.phylo=transform(tree,1)

 however,  I got the following errors:

  lambda.phylo=transform(tree,lambda)

 Error in as.data.frame.default(x[[i]], optional = TRUE, stringsAsFactors =
 stringsAsFactors) :   cannot coerce class phylo to a data.frame

  lambda.phylo=geiger::transform(tree,lambda)

 Error: 'transform' is not an exported object from 'namespace:geiger'

 Any one would point to a workaround for branch transformation and
 posterior
 visualization of the tree?

 Thanks in advance.
 Agus



 ___
 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-ph...@r-project.org/




-- 
Agustín Camacho Guerrero.
Doutor 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
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/