Re: [R-sig-phylo] PGLS with non-ultrametric tree

2015-07-16 Thread Paolo Piras
I really think this post could be useful for the discussion

https://stat.ethz.ch/pipermail/r-sig-phylo/2010-September/000773.html

best
paolo


Da: R-sig-phylo  per conto di Solomon Chak 

Inviato: giovedì 16 luglio 2015 23.19
A: Theodore Garland Jr
Cc: r-sig-phylo@r-project.org
Oggetto: Re: [R-sig-phylo] PGLS with non-ultrametric tree

Hi Dr. Garland,

I got the impression that an ultrametric tree is needed for comparative
analysis from this book ch.
2 pg. 38: "most comparative analyses assume that the tree is ultrametric,
as the majority of analyses deal with evolution of phenotypic traits of
extant species with the underlying assumption is that the time available
for phenotypic evolution is the same for all taxa".

I understand that the methodology of PGLS can use any tree form, I suppose
there're different assumptions if I used an additive tree or an ultrametric
tree. Could you guide me to some references that explicitly discuss about
this?

Is it necessary to use an ultrametric tree If I want to estimate lambda in
the residual error of the gls and do a branch length transformation as Revell
2010

suggested?

Many thanks!

Cheers,
Solomon Chak

---
*Solomon **Tin Chi **Chak*
Ph.D. Candidate
Tel: (804) 684-7484
Marine Biodiversity Laboratory

Virginia Institute of Marine Science 
College of William and Mary 
PO Box 1346 / Rt. 1208 Greate Rd., Gloucester Pt, VA 23062, USA


On Thu, Jul 16, 2015 at 2:55 PM, Theodore Garland Jr <
theodore.garl...@ucr.edu> wrote:

> Dear Solomon,
>
> I don;t know where you are trying to go with this, but any proper
> implementation of PGLS (I am not talking about methods that transform the
> branch lengths with things like Grafen's rho, Pagel's lambda or OU models)
> should be able to use any tree of any shape.  This is the same as for
> phylogenetically independent contrasts.
>
> 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 (not confidential)
> Email:  tgarl...@ucr.edu
> http://www.biology.ucr.edu/people/faculty/Garland.html
> http://scholar.google.com/citations?hl=en&user=iSSbrhwJ
>
> Director, UCR Institute for the Development of Educational Applications
>
> Editor in Chief, Physiological and Biochemical Zoology
>
> Fail Lab: Episode One
> http://testtube.com/faillab/zoochosis-episode-one-evolution
> http://www.youtube.com/watch?v=c0msBWyTzU0
>
> 
> From: R-sig-phylo [r-sig-phylo-boun...@r-project.org] on behalf of
> Solomon Chak [tc...@vims.edu]
> Sent: Thursday, July 16, 2015 3:31 AM
> To: r-sig-phylo@r-project.org
> Subject: [R-sig-phylo] PGLS with non-ultrametric tree
>
> Dear all,
>
> What are the pros and cons of the two methods to do pgls with a
> non-ultrametric tree? Many thanks!
>
> 1) Convert the additive tree to ultrametric using penalized likelihood
> (Sanderson 2002) with ape:: chronopl after cross-validation to find the
> best lambda.
>
> 2) Use weighted least-squares in which gls(y ~ x,
> correlation=corPagel(value=0.1, phy=phy, fixed=F),
> weights=varFixed(~tip.heights),
> data=dat)
>
> Cheers,
> Solomon Chak
>
> ---
> *Solomon **Tin Chi **Chak*
> Ph.D. Candidate
> Tel: (804) 684-7484
> Marine Biodiversity Laboratory
> <
> http://www.vims.edu/research/units/labgroups/marine_biodiversity/index.php
> >
> Virginia Institute of Marine Science 
> College of William and Mary 
> PO Box 1346 / Rt. 1208 Greate Rd., Gloucester Pt, VA 23062, 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/
___
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] determine multistate characters in nexus data matrix

2015-03-22 Thread Paolo Piras
Hi folks,
I want to thanks all people who responded to my post; I'm testing the proposed 
codes and I'll let you know their efficiency
the problem, apparently seems the managing of polimorphisms in the data matrix 
(i.e. [0,2] for the same character for a given taxon)
all the best
paolo




Da: Liam J. Revell 
Inviato: sabato 21 marzo 2015 02.06
A: Paolo Piras; Jacob Berv
Cc: r-sig-phylo@r-project.org
Oggetto: Re: determine multistate characters in nexus data matrix

I don't know if this has already been answered, but read.nexus.data in
ape automatically creates a list character vectors. To get the number of
states in each character you can do:

N<-apply(data.frame(X),1,function(x) length(unique(x)))

if your data is an object of class "DNAbin" then the following highly
similar code does the same thing:

N<-apply(as.matrix(X),2,function(x) length(unique(x)))

Let us know if you found another solution or if this does not work.

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 3/6/2015 6:19 AM, Paolo Piras wrote:
> Hi folks,
> I have a nexus data matrix with n taxa and m discrete characters (including 
> some polymorphisms); I would like to  know which characters are binary and 
> which ones are multistate.
> Maybe some manual coding will be sufficient but just in case...there is a 
> function, in your knowledge, able to do that?
>
> Thankyou in advance
>
> Paolo Piras
>

___
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] determine multistate characters in nexus data matrix

2015-03-06 Thread Paolo Piras
Hi folks,
I have a nexus data matrix with n taxa and m discrete characters (including 
some polymorphisms); I would like to  know which characters are binary and 
which ones are multistate. 
Maybe some manual coding will be sufficient but just in case...there is a 
function, in your knowledge, able to do that?

Thankyou in advance

Paolo Piras


___
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] edge color in phylomorphospace3d

2014-06-10 Thread Paolo Piras
Thankyou very much to all for your effort in improving the function!
all the best
paoo

Da: Liam J. Revell 
Inviato: martedì 10 giugno 2014 15.13
A: Jonas Eberle; Paolo Piras; r-sig-phylo@r-project.org
Oggetto: Re: edge color in phylomorphospace3d

Thanks Jonas.

I had just added this to phytools. Not yet on CRAN but more details
(including how to use it) can be seen here:
http://blog.phytools.org/2014/06/coloring-edges-in-phylomorphospace3d.html.

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 6/10/2014 3:26 AM, Jonas Eberle wrote:
> Dear Paolo,
>
> I modified the phylomorphospace3d code some time ago to be able to plot
> colored branches (see below). You can use pointcol and edgecol to color
> the plot. These can be simple color specifications (such as "black") or
> vectors of colors that have the length of your number of tips or edges,
> respectively.
>
> Thank you Liam for this piece of code! It's really usefull for me! I
> hope I didn't spoil your code too much :)
>
> Jonas
>
>
>
>
> ColoredPhylomorphospace3d <- function (tree, X, A = NULL, label = TRUE,
> pointcol="black", edgecol="black", control = list(),
>method = c("dynamic", "static"), ...)
> {
>method <- method[1]
>if (class(tree) != "phylo")
>  stop("tree object must be of class 'phylo.'")
># controls festlegen
>con = list(spin = TRUE, axes = TRUE, box = TRUE, simple.axes = FALSE,
>   lwd = 1, ftype = "reg")
>con[(namc <- names(control))] <- control
>if (con$simple.axes)
>  con$box <- con$axes <- FALSE
>con$ftype <- which(c("off", "reg", "b", "i", "bi") == con$ftype) -
>  1
>if (is.null(A))
>  A <- apply(X, 2, function(x, tree) fastAnc(tree, x),
> tree = tree)
>else A <- A[as.character(1:tree$Nnode + length(tree$tip)),
>]
>x <- y <- z <- matrix(NA, nrow(tree$edge), 2)
>X <- X[tree$tip.label, ]
>for (i in 1:length(tree$tip)) {
>  x[tree$edge[, 2] == i, 2] <- X[i, 1]
>  y[tree$edge[, 2] == i, 2] <- X[i, 2]
>  z[tree$edge[, 2] == i, 2] <- X[i, 3]
>}
>for (i in length(tree$tip) + 1:tree$Nnode) {
>  x[tree$edge[, 1] == i, 1] <- x[tree$edge[, 2] == i,
> 2] <- A[as.character(i), 1]
>  y[tree$edge[, 1] == i, 1] <- y[tree$edge[, 2] == i,
> 2] <- A[as.character(i), 2]
>  z[tree$edge[, 1] == i, 1] <- z[tree$edge[, 2] == i,
> 2] <- A[as.character(i), 3]
>}
>if (is.null(colnames(X)))
>  colnames(X) <- c("x", "y", "z")
>if (method == "dynamic") {
>  params <- get("r3dDefaults")
>  plot3d(rbind(X, A), xlab = colnames(X)[1], ylab = colnames(X)[2],
> zlab = colnames(X)[3], axes = con$axes, box = con$box,
> params = params)
>  spheres3d(X, radius = 0.02 * mean(apply(X, 2, max) -
>  apply(X, 2, min)), col=pointcol)
>  for (i in 1:nrow(tree$edge)) segments3d(x[i, ], y[i, ], z[i, ], lwd
> = con$lwd, col=edgecol[i])
>  ms <- colMeans(X)
>  rs <- apply(rbind(X, A), 2, range)
>  if (con$simple.axes) {
>lines3d(x = rs[, 1], y = c(rs[1, 2], rs[1, 2]),
>z = c(rs[1, 3], rs[1, 3]))
>lines3d(x = c(rs[1, 1], rs[1, 1]), y = rs[, 2],
>z = c(rs[1, 3], rs[1, 3]))
>lines3d(x = c(rs[1, 1], rs[1, 1]), y = c(rs[1, 2],
> rs[1, 2]), z = rs[, 3])
>  }
>  rs <- rs[2, ] - rs[1, ]
>  for (i in 1:length(tree$tip)) {
>adj <- 0.03 * rs * (2 * (X[i, ] > ms) - 1)
>if (con$ftype)
>  text3d(X[i, ] + adj, texts = tree$tip.label[i],
> font = con$ftype)
>  }
>  if (con$spin) {
>xx <- spin3d(axis = c(0, 0, 1), rpm = 10)
>play3d(xx, duration = 5)
>invisible(xx)
>  }
>  else invisible(NULL)
>}
>else if (method == "static") {
>  if (hasArg(angle))
>angle <- list(...)$angle
>  else angle <- 30
>  if (hasArg(xlim))
>xlim <- list(...)$xlim
>  else xlim <- NULL
>  if (hasArg(ylim))
>ylim <- list(...)$ylim
>  e

[R-sig-phylo] edge color in phylomorphospace3d

2014-06-08 Thread Paolo Piras

Dear list,
there is a possbility to color some specific edges in the phylomorphospace3d() ?
plot.phylo() has the argument  "edge.color" to do that in classical tree 
plotting.
I need it, however, in the above mentioned function.
I superficially took a ook to the code, but before trying to modify it maybe a 
trick already exists

thanks in advance
paolo

___
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] fitting multiple OU optima

2014-04-22 Thread Paolo Piras

Dear list,

I write to ask you if it is possible to look for multiple optima in OU process 
as in OUwie.
However, i would like to tun the analysis WITHOUT specifing a priori the 
selective regime group for innner nodes or taxa. 

Do you know if  this approach is possible?
thankyou in advance 

paolo piras

___
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] BAMM: Bayesian analyses of macroevolutionary rates

2014-03-07 Thread Paolo Piras
Dear Dan,
does BAMM can work using NON ultrametric trees?

Thanks 

paolo



Da: r-sig-phylo-boun...@r-project.org  per 
conto di Dan Rabosky 
Inviato: venerdì 7 marzo 2014 17.40
A: r-sig-phylo@r-project.org Mailing-list
Oggetto: [R-sig-phylo] BAMM: Bayesian analyses of macroevolutionary rates

R-sig-phylo community:

We announce the release of BAMM and BAMMtools, a Bayesian framework for the 
analysis of speciation, extinction, and trait evolution on phylogenetic trees 
(www.bamm-project.org). BAMM is oriented entirely towards detecting and 
quantifying heterogeneity in evolutionary rates. It uses reversible jump Markov 
chain Monte Carlo to automatically explore a large number of candidate models 
of lineage diversification and trait evolution. BAMM is a command line program 
written in C++.

We have also created BAMMtools, an R package for the analysis and visualization 
of BAMM output. The package is available for installation via CRAN or through 
the project website.

BAMM / BAMMtools functionality includes a number of novel methods for 
visualization and analysis of complex macroevolutionary dynamics, including:

- Inference on evolutionary rate variation through time and among clades
- Visualization of dynamic rates on phylogenetic trees with BAMMtools
- Estimation of credible sets of macroevolutionary rate configurations
- Estimation of the "best" (maximum a posteriori probability) macroevolutionary 
rate configuration
- Bayes factors for inferring numbers of evolutionary rate regimes on 
phylogenies
- Summarize marginal distributions of evolutionary rates for individual clades
- Analyze diversification rates with incomplete and phylogenetically non-random 
taxon sampling

The documentation includes a graph gallery illustrating some of data 
visualizations and analyses that can be done "out of the box" with BAMMtools 
(www.bamm-project.org/bammgraph.html). A conceptual discussion how the BAMM 
framework differs from stepwise AIC-based approaches can be found at 
http://bamm-project.org/rateshifts.html.

A complete description of the general model that underlies BAMM (and a 
performance evaluation) is available at:

** Rabosky, DL. 2014. Automatic detection of key innovations, rate shifts, and 
diversity-dependence on phylogenetic trees. PLoS ONE. 
http://www.plosone.org/article/info%3Adoi%2F10.1371%2Fjournal.pone.0089543

*** If you previously installed BAMM or BAMMtools, please download the latest 
versions. The code for both has changed during the past month and we cannot 
guarantee compatibility.

~Dan Rabosky

_

Dan Rabosky
Assistant Professor & Curator of Herpetology
Museum of Zoology &
Department of Ecology and Evolutionary Biology
University of Michigan
Ann Arbor, MI 48109-1079 USA

drabo...@umich.edu
http://www-personal.umich.edu/~drabosky
http://www.lsa.umich.edu/ummz/

___
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] phylogenetic MANOVA

2014-03-06 Thread Paolo Piras
PCscores coming from the same PCA are independent (orthogonal) by definition
best
paolo



Da: r-sig-phylo-boun...@r-project.org  per 
conto di Anna Kostikova 
Inviato: giovedì 6 marzo 2014 20.37
A: Frédérich Bruno
Cc: r-sig-phylo@r-project.org
Oggetto: Re: [R-sig-phylo] phylogenetic MANOVA

Hello Bruno,

Could you check how much your individual PCs are correlated with each other? 
What you see might be a result of (high) multicollinearity (negative or 
positive) between predictors.

Cheers,
Anna


> On 6 Mar 2014, at 17:19, Frédérich Bruno  wrote:
>
> Dear All,
>
> I am exploring body shape variation in a fish family, using shape variables 
> generated by landmark-based geometric morphometrics. To test shape divergence 
> among ecomorphs, I would like to perform a phylogenetic MANOVA.
>
> To perform such a test, the function aov.phylo in geiger is available.
> However, I think I have some troubles with it...
>
> Indeed, firstly, I performed phylo ANOVAs using phylANOVA function in 
> phytools on the three first PCs (explaining more than 70% of shape variation) 
> of my shape dataset and found highly significant differences among ecomorphs 
> for PC2 and PC3.
>
> Then, I applied a phylo MANOVA using aov.phylo including all the shape 
> variables and got a non-significant result (P-value = 1).
>
> So, according to my expectations and the univariate results from phylANOVAs, 
> the results of phylo MANOVA seems a little bit strange to me...
>
> Do someone have an explanation?
> Do you know another function than aov.phylo to perform a phyloMANOVA? (for 
> comparisons)
>
> Thank you in advance for your advices and your help!
>
> Best,
>
> Bruno
>
> --
> Dr. Bruno Frédérich
> Postdoctoral Researcher F.R.S.-FNRS
> Lab. of Functional and Evolutionary Morphology
> University of Liège, Institut de Chimie (B6c)
> 4000 Liège, BELGIUM
>
> Phone: 003243665133
> Fax: 003243663715
> E-mail: bruno.freder...@ulg.ac.be
> Website: http://www2.ulg.ac.be/morfonct/
> 
> Open Repository and Bibliography (ORBi) http://orbi.ulg.ac.be/
> Personal Publications (Open Access) http://tinyurl.com/Bruno-Reef
>
>
>   [[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/

___
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] Mesquite issues

2014-01-31 Thread Paolo Piras
Thanks a lot Alejandro!

I hope to solve my issues!

best

paolo





Da: Alejandro Gonzalez 
Inviato: venerd? 31 gennaio 2014 15.05
A: Paolo Piras
Cc: R-phylo Mailing-list
Oggetto: Re: [R-sig-phylo] Mesquite issues

Paolo,

The issue of instability in Mesquite recently came up in their mailing list. 
Apparently there is a fix to this problem. Hope it helps you too.

Cheers

Alejandro



This is Wayne Maddison's message to the Mesquite mailing list.



There was an update released in November that worked around what I think is 
your issue, which represents a bug in a new version of Java for Windows.  When 
you started Mesquite at some point in the last few weeks, did you see a message 
about an update fixing a Windows crash?  If so, could you install it? 
Otherwise, check under File>Available to Install or Update.

Here is the email we sent to the list in November with a link to install the 
fix by hand.

==
Your InternalError crash is caused by a bug in the latest Java 1.7 for Windows. 
 Several users have reported it, and it seems to be a widespread problem.

We believe we have found a workaround that avoids this Java bug.  If you or 
anyone else on the MesquiteList would like to test this fix before we release 
it generally, please download the zip file here and install as per contained 
instructions:

http://mesquiteproject.org/mesquite/addenda/November2013/

Once we get word from some of you that this fixes your problem, we will release 
an update more broadly. We hope to release the update within a day or so.
=

Wayne


On 31, Jan 2014, at 14:41, Paolo Piras 
mailto:paolo.pi...@uniroma3.it>> wrote:


I apologize in advance if this question is off topic in relation to strict R 
issues but maybe someone expierenced my same problem.
Recently, after the last Java updata the software Mesquite became highly 
unstable, while in the last years it worked perfectly.
Moreover, when exporting nexus the resulting file, once read in R, lacks some 
nodes and branch lengths are altered.
We use Mesquite extensively to manually build phylogenetic trees (i.e. upon 
literature sources) for comparative studies.
Does someone know a valid alternative to Mesquite or a way to fix unstability 
issues?
R mesquite does not work under R 3.02
Thankyou in advance for your kind reply

best
paolo

___
R-sig-phylo mailing list - 
R-sig-phylo@r-project.org<mailto: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/

__

Alejandro Gonzalez Voyer

Post-doc

Estaci?n Biol?gica de Do?ana
Consejo Superior de Investigaciones Cient?ficas (CSIC)
Av Am?rico Vespucio s/n
41092 Sevilla
Spain

Tel: + 34 - 954 466700, ext 1749

E-mail: alejandro.gonza...@ebd.csic.es<mailto:alejandro.gonza...@ebd.csic.es>

Web site:

Personal page: http://consevol.org/members/alejandro_combo.html

Group page: http://consevol.org/people.html

For PDF copies of papers see:

http://csic.academia.edu/AlejandroGonzalezVoyer



[[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] Mesquite issues

2014-01-31 Thread Paolo Piras

I apologize in advance if this question is off topic in relation to strict R 
issues but maybe someone expierenced my same problem.
Recently, after the last Java updata the software Mesquite became highly 
unstable, while in the last years it worked perfectly.
Moreover, when exporting nexus the resulting file, once read in R, lacks some 
nodes and branch lengths are altered. 
We use Mesquite extensively to manually build phylogenetic trees (i.e. upon 
literature sources) for comparative studies. 
Does someone know a valid alternative to Mesquite or a way to fix unstability 
issues?
R mesquite does not work under R 3.02 
Thankyou in advance for your kind reply

best 
paolo

___
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] phylogenetic multiple correspondence analysis

2013-04-25 Thread Paolo Piras
Hi,
maybe you could perform a standard MCA and then you could use the scores as 
continuous vars in standard comparative methods (including phyl pca)

dont know if this helps..
best
paolo



Da: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] per 
conto di Danny Rojas [rojasmartin...@gmail.com]
Inviato: giovedì 25 aprile 2013 16.11
A: r-sig-phylo@r-project.org
Oggetto: [R-sig-phylo] phylogenetic multiple correspondence analysis

Dear colleagues,

Anybody know if there is an alternative to the phylogenetic principal
component analysis of Revell (2009; Evolution 63-12: 3258–3268), let's say
a phylogenetic multiple correspondence analysis, to analyze non-continuous
variables? I would appreciate any suggestion.

Thanks in advance.

--
Danny Rojas, Ph.D.
Facultade de Bioloxía
Universidade de Vigo
http://rojasdanny.wordpress.com

[[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] on evolutionary models

2013-01-24 Thread Paolo Piras
Hi pas,

Besides the other arguments, I think that one should test for phylogenetic 
signal AFTER trasforming the tree according to the best mode of evolution IF it 
is not brownian. Maybe someone else can add some more on this.
best
paolo



Da: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] per 
conto di Theodore Garland Jr [theodore.garl...@ucr.edu]
Inviato: giovedì 24 gennaio 2013 21.30
A: pasquale.r...@libero.it; r-sig-phylo@r-project.org Mailing-list
Oggetto: Re: [R-sig-phylo] R: Re:  From ClustalW2 Tree to Heat Map in R

Hi Pas,

K is just a descriptive statistic for tip data on a tree with some specified 
branch lengths.
Obviously, if you change the branch lengths (or the topology or the tip data), 
then K will be different.
How much different depends on the details.

It is likely that certain branch-length transformations (whether purely 
statistical or designed to mimic something like an OU process) will tend to 
make K either larger or smaller, at least when checked cross a large number of 
examples.  Somebody would need to do a lot of simulations to sort this out.  
Some related relevant things are here:

Revell, L. J., L. J. Harmon, and D. C. Collar. 2008. Phylogenetic signal, 
evolutionary process, and rate. Syst. Biol. 57:591-601.

In the original Blomberg et al. (2003) paper we avoided this issue entirely by 
only reporting K using whatever tree the original paper used.  We wanted to be 
able to compare K values among traits and studies in some sort of simple and 
"fair" way.

If lambda and OU transforms are leading to very different K values (how 
different?) that does not mean one K value is better than the other.  But it 
does mean you would want to be careful if you tried to compare your K value 
with other studies that did not use lambda and/or OU transforms.

Cheers,
Ted

Theodore Garland, Jr.
Professor
Department of Biology
University of California, Riverside
Riverside, CA 92521
Office Phone:  (951) 827-3524
Wet Lab Phone:  (951) 827-5724
Dry Lab Phone:  (951) 827-4026
Home Phone:  (951) 328-0820
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=en&user=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 pasquale.r...@libero.it [pasquale.r...@libero.it]
Sent: Thursday, January 24, 2013 12:14 PM
To: r-sig-phylo@r-project.org Mailing-list
Subject: [R-sig-phylo] R: Re:  From ClustalW2 Tree to Heat Map in R

Hi Gents and Lads,

I have a very rapid question with a perhaps not-so-obvious reply. I'm in the
process of testing a number of evolutionary models and estimating phylogenetic
signal on a certain univariate data set. So something very basic and very
simple. The point is, I found BM  performs poorly as compared to OU (single
peak) and lambda. Thus, I transformed the tree by using the fitted lamdba
and/or alpha before calculating Blomberg et al's K statistic. Does this make
sense?
If yes, the competing models have similar Akaike weigths (OU = 0.5, lambda =
0.3) but give very different estimates of K when their fitted parameters are
used to transform the tree branch lenghts. How does discriminate which K
estimate is best?
Translating in R-esque:


require(geiger)
require(phytools)

fitContinuous(tree, x, model="OU") ## gives relatively low alpha (.07)
phylosig(ouTree(tree,alpha=alpha),x,method ="K", test =T, nsim =1000) ## gives
very low K


fitContinuous(tree, x, model="lambda") ## gives very high lambda (.95)
phylosig(lambdaTree(tree,lambda=lambda),x,method ="K", test =T, nsim =1000) ##
gives very high K


thanks for help,

Pas

___
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/
___
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] Phylogenetic signal and PGLS

2012-11-28 Thread Paolo Piras
Hi Antigoni
try the new package by Carl Boettiger "pmc"
it seems to be suited EXACTLY for you purpose (if I did not misanderstand...)

ciaoo
paolo

Da: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] per 
conto di Alejandro Gonzalez Voyer [alejandro.gonza...@ebd.csic.es]
Inviato: mercoledì 28 novembre 2012 18.16
A: Antigoni Kaliontzopoulou
Cc: 
Oggetto: Re: [R-sig-phylo] Phylogenetic signal and PGLS

Hi Antigoni

You can try ape (and nlme) with the functions gls and corPagel (the latter to 
define the covariance structure, ie the evolutionary model) and also caper (I 
don't know the exact function there).

Cheers

Alejandro

_

Dr. Alejandro Gonzalez Voyer

Estación Biológica de Doñana (CSIC)
Avenida Américo Vespucio s/n
41092 Sevilla
Spain

Tel: +34- 954 466700, ext 1749

E-mail: alejandro.gonza...@ebd.csic.es

Web-site (Under Construction):
Group page: http://consevol.org/index.html
Personal web-page: http://consevol.org/members/alejandro.html

On 28/11/2012, at 18:02, Antigoni Kaliontzopoulou  wrote:

> Hello everyone,
>
> I am trying to implement Liam Revell's suggestion on the evaluation of 
> Pagel's lambda simultaneous to fitting PGLS to minimize the effects of wrong 
> model selection (OLS vs. PGLS) on species data (i.e. Revell 2010, Methods in 
> Ecology and Evolution 1: 319-329).
>
> Does anyone know if this kind of simultaneous optimization of lambda and PGLS 
> parameters is presently implemented in R? The obvious place would be 
> phytools, but I could not find anything similar in that package.
>
> I would be grateful if you can provide any suggestions.
>
> Antigoni
>
> --
> ATTENTION: New e-mail address, please change to antig...@cibio.up.pt
>
> ---
> Antigoni Kaliontzopoulou
>
> Post-doctoral researcher
>
> CIBIO, Centro de Investigacao em Biodiversidade e Recursos Geneticos
>
> Campus Agrario de Vairao, 4485-661 Vairao
>
> PORTUGAL
>
> Department of Ecology, Evolution, and Organismal Biology
>
> Iowa State University, Ames,
>
> Iowa 50011, USA
>
> ___
> 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

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


Re: [R-sig-phylo] node ages

2012-10-31 Thread Paolo Piras
Hi ..
the code I just sent deals with both ultrametric and non ultrametric trees and 
rbind ages of both terminal taxa (as firsts) and internal nodes with proper 
rownames
I must check the identity with Liam solution...

best
paolo


Da: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] per 
conto di Liam J. Revell [liam.rev...@umb.edu]
Inviato: mercoledì 31 ottobre 2012 18.55
A: Nicolas Campione
Cc: r-sig-phylo@r-project.org
Oggetto: Re: [R-sig-phylo] node ages

Hi Nic.

If your tree is ultrametric, you should be able to use the ape function
branching.times, i.e., node.ages<-branching.times(tree). However, this
will not work properly, I don't think, if the tree contains lineages
that terminate before the present (for instance, extinct taxa). In that
case, if we assume that the maximum total height above the root is the
present time, we can use the following:

library(phytools)
node.ages<-max(nodeHeights(tree))-
  nodeHeights(tree)[match(1:tree$Nnode+length(tree$tip),tree$edge[,1]),1]
names(node.ages)<-1:tree$Nnode+length(tree$tip)

This should give the same result as branching.times for ultrametric
trees, but will not be "messed up" for trees containing lineages that
terminate before the present.

- 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 10/31/2012 12:03 PM, Nicolas Campione wrote:
> Hello R Phylo List,
>
> I have a tree that has branch lengths calculated using time (in millions of 
> years). Is there any function out there that can extract the ages at the 
> nodes into a vector that I can then use? I would like to plot ancestral state 
> reconstruction's against time.
>
> Thanks,
>
> -Nic-
>
> 
> Nicolás E. Campione
> M.Sc., Ph.D. Candidate
> Dept. Ecology & Evolutionary Biology
> University of Toronto
> 25 Wilcocks St.
> Toronto, ON
> Canada M5S 3B2
>
> Royal Ontario Museum
> 100 Queen's Park
> Toronto, ON
> Canada M5S 2C6
> Office: 416-586-5591
> Email: nicolas.campi...@mail.utoronto.ca
>
>   [[alternative HTML version deleted]]
>
>
>
> ___
> 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


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


Re: [R-sig-phylo] node ages

2012-10-31 Thread Paolo Piras
Hi!

if treesim is your tree

myvector<-as.matrix(as.matrix(dist.nodes(treesim))[,length(treesim$tip)+1],rownames=c(rbind(treesim$tip.label),c((length(treesim$tip)+1):max(length(dist.nodes(treesim)[,1])
colnames(myvector)<-c("depth")
rownames(myvector)<-c(rbind(treesim$tip.label),c((length(treesim$tip)+1):max(length(dist.nodes(treesim)[,1]
myvector

let me know

ciao
paolo



Da: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] per 
conto di Nicolas Campione [nicolas.campi...@mail.utoronto.ca]
Inviato: mercoledì 31 ottobre 2012 17.03
A: r-sig-phylo@r-project.org
Oggetto: [R-sig-phylo] node ages

Hello R Phylo List,

I have a tree that has branch lengths calculated using time (in millions of 
years). Is there any function out there that can extract the ages at the nodes 
into a vector that I can then use? I would like to plot ancestral state 
reconstruction's against time.

Thanks,

-Nic-


Nicolás E. Campione
M.Sc., Ph.D. Candidate
Dept. Ecology & Evolutionary Biology
University of Toronto
25 Wilcocks St.
Toronto, ON
Canada M5S 3B2

Royal Ontario Museum
100 Queen's Park
Toronto, ON
Canada M5S 2C6
Office: 416-586-5591
Email: nicolas.campi...@mail.utoronto.ca

[[alternative HTML version deleted]]


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


[R-sig-phylo] R: variation in rates over time

2012-09-18 Thread Paolo Piras
Hi
look also for motmot and auteur packages

best


Paolo


Da: r-sig-phylo-boun...@r-project.org [r-sig-phylo-boun...@r-project.org] per 
conto di Matt Pennell [mwpenn...@gmail.com]
Inviato: martedì 18 settembre 2012 1.46
A: Jason S
Cc: R-sig-phylo@r-project.org
Oggetto: Re: [R-sig-phylo] variation in rates over time

Jason,

I think the best way to do this is with the approach of O'Meara et al. 2006
Evolution "Brownie".

Liam Revell has implemented this in R in his package phytools. You can
modify the steps taken in this tutorial here
http://phytools.blogspot.com/2011/07/running-brownielite-for-arbitrarily.html
perhaps
in conjunction with the function make.era.map()
http://phytools.blogspot.com/2011/10/new-function-to-plot-eras-on-tree.html
though
I admittedly have not tried this myself.

Perhaps Liam or someone else has a better explanation but I hope this is at
least somewhat helpful.

cheers,
matt

On Mon, Sep 17, 2012 at 7:33 PM, Jason S  wrote:

>
>
> Hello,
>
> I see that there are several interesting alternatives to test for
> different rates among clades. However, I was wondering if there is a method
> to test for varying rates over time. I'm aware of Pagel's delta and the EB
> model, but I was thinking more in terms of testing if there is a different
> rate for the entire tree after a specified point in time. For instance, if
> a snail predator colonizes an island 3.4 Mya, is there evidence for an
> increased rate of evolution in the prey after that point in time? Something
> like two lambdas, one for before and one for after that point in time.
>
> Thanks!
>
> Jason
> [[alternative HTML version deleted]]
>
> ___
> R-sig-phylo mailing list
> R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
>

[[alternative HTML version deleted]]

___
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