Hi Graeme,
I am not sure what you want to do with this but...it is straightforward to
disallow reverse transitions in diversitree
## Simulate a dollo character
library(diversitree)
set.seed(1)
t <- tree.bd(c(1,0), max.taxa=100)
d <- sim.character(t, c(0.1, 0), model="mk2")
## make a likelihood
Hi Sergio,
The simplest way to do this in R is just to set the rownames of your data
frame to be the species names and use
library(geiger)
res - treedata(your_tree, your_data)
pruned_tree - res$phy
This is going to be a bit slow but shouldn't be too bad if you are only
doing it a few times.
Hi,
There is a new R implementation of AWTY https://github.com/danlwarren/RWTY
Haven't used it myself but I think this will probably alleviate this issue.
Cheers,
Matt
On Mon, Jun 15, 2015 at 7:43 AM, Daniel Fulop dfulop@gmail.com wrote:
What about using Tracer instead? It's
Hi Ashley,
I think that these two types of analyses are actually asking different
things and therefore the decision of which type of analysis is best should
be made on biological rather than statistical grounds (i.e., no point in
comparing likelihoods or AIC scores). There is a good (albeit,
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
Agus,
The reason is that in PGLS, the model (here, Pagel's lambda) is used to
describe the covariance of the residuals, not of the actual data. In your
cause, it appears that while there is a lot of information in the phylogeny
regarding the traits themselves, that the phylogeny is not that
Hi Luiz,
Yes, non-random sampling of traits, if not taken into account will
certainly bias the estimation of the transition parameters. Methods for
addressing this have been developed by Rich FitzJohn and colleagues
http://sysbio.oxfordjournals.org/content/58/6/595.short (this was discussed
in
So the reason for this is that the default bounds for the EB model in the
CRAN version of geiger allows the a parameter to be both positive and
negative (i.e. the ACDC model of Blomberg et al. 2003), such that the rates
of trait evolution can either increase or decrease. What is happening is
that
Hi Megan,
This looks to me like the problems are arising because the optimal value of
lambda is negative (and you are running into optimization problems by
bounding it at zero). This is a bit strange -- but not unheard of, I have
seen similar results before. What it implies that the trait values
John,
This is a tricky question. If your independent variables were discrete, you
could use a stochastic character mapping approach to map state regimes
onto your tree and ask whether the regimes had different rates using a
model selection approach. (This could be done with the R packages
hi all,
you can use pgls using something like this
require(ape)
require(geiger)
require(nlme)
tree - read.tree(filename.tre)
data - read.csv(dataset.csv)
## make the row names of the dataset equal to the species names
## say one of the columns in your dataset is labeled species
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
Jarrod and Dan,
While I see what Dan is saying and I agree that evaluating this with
non-phylogenetic data is not entirely useful, I think you have stumbled
upon a known issue but one that is not widely appreciated.
While the MK model is a useful model for discrete characters in many ways,
it
Hey all,
This has been a really fantastic discussion. Mark, you make some really
excellent points in response to my earlier comments. I think you are
correct in this.
The question that arises out of Jarrod and Dan's simulations (which I have
just run) is whether a model selection criteria would
correction: the last sentence should have read
I wonder how that would work in this case. I think these are important
questions going forward.
On Thu, Aug 16, 2012 at 11:00 PM, Matt Pennell mwpenn...@gmail.com wrote:
Hey all,
This has been a really fantastic discussion. Mark, you make some
David and Jay,
I am not sure if Liam and Graham's was designed for phylogenetic regression
per se. Tony Ives has done exactly this but his code is only in Matlab as
far as I understand.
An alternative would be to use RMA approach for this which Liam has created
(but note Simon Blomberg's warning
Hi all,
This is perhaps an unconventional use of the r-sig-phylo mailing list.
Rather than asking for advice on how to do an analysis, I am enlisting the
expertise of the community to try and actually help do the analysis. If you
have a few seconds, I would really appreciate it if you could help
Hi all,
Just a note on this topic, which Rich may be able to help clarify if he
sees this. It can be shown that Rich's equation which uses log(abs(...)) is
exactly equivalent to the regular version of the Nee equation. However, for
an ultrametric tree, the ML of lambda will always be greater than
Simon,
For reasons that I do not fully understand, the problem arises with the use
of a coalescent tree (which has a very branch length distribution than a
tree generated under a birthdeath process). maybe someone else has some
insight into why this causes birthdeath to fail.
if you run
Bret,
I think the reason has to do with the fact that c(2,3) is of the class
numeric. It is actually not specifying the tip labels (which are
characters).
for example:
foo = read.tree(text=((1:2.0,(2:1.**0,3:1.0):1.0):1.0,4:3.0);)
class(foo$tip.label)
[1] character
therefore, the following
Hi all,
I am not sure what type of diversitree analysis but there may be some
memory issues if you use mcapply or the likes (this is especially true if
using the mcmc version of QuaSSE). An alternative (albeit slightly more
complicated) way of doing this is to write a bash script which utilizes
Hi Kaspar and others,
Sorry for responding so late to this. I am not sure if there exists any
precedent for doing this but it seems problematic. We do not expect BM
alone (or a variant thereof) to be a good model to account for variation
within a species and I would strongly recommend against
Thanks to everyone for the helpful comments. Thet are very much appreciated.
cheers,
matt
On Wed, Jan 25, 2012 at 11:40 AM, Matthew Helmus mrhel...@gmail.com wrote:
Here is generalized R Code translated from what Tony wrote in Matlab for
the paper.
Matt Pennell please feel free to respond
Hi Robin (and others)
I am not sure what sorts of analyses you plan on doing but you might want
to look into some recent work by Helene Morlon and colleagues. She has
recently published two different approaches (2010 Plos Biology; 2011 PNAS)
to diversification rate which can fit birth-death (and
, 2011, at 6:21 PM, Matt Pennell wrote:
Hi all,
I am trying to build a phylogenetic logistic regression model in which the
response variable is binary and the independent variables are a mix of both
categorical and continuous variables. All of my independent variables are
fixed effects. I know
Hi all,
I am trying to build a phylogenetic logistic regression model in which the
response variable is binary and the independent variables are a mix of both
categorical and continuous variables. All of my independent variables are
fixed effects. I know that a method for doing this has been
26 matches
Mail list logo