Re: [R-sig-phylo] multi-state categorical predictor variables in PGLS

2011-03-07 Thread Marguerite Butler
Hi Andrew, >> >> Does this sidestep the degrees of >> freedom problem discussed by Garland et al.? Can anybody point me to >> references discussing the mechanics of this process and why this is an >> appropriate thing to do? > Others on this list will disagree with me, but it's not a "degree

Re: [R-sig-phylo] erroneous results with rTraitCont simulations of the OU process

2011-03-07 Thread Carl Boettiger
Hi Emmanuel, Great point that it will be faster to simulate from the root up rather than compute the matrix for large trees. In that case, how about simulate from the equation x(t'') = x(t') e^{-alpha (t''-t') }+theta (1-e^{-alpha (t''-t') }) + sqrt( sigma^2( 1 -e^{-2\alpha (t''-t') )/2 alpha )

Re: [R-sig-phylo] fitContinuous in geiger: positive log-likelihoods when trait values <1

2011-03-07 Thread Nick Matzke
Ah, so while re-creating my problem for copy-paste-debug goodness on the listserv, I discovered what was confusing me. Originally, when I ran the various models, I got these log-likelihoods for results: == tf2ic2kzkr t

Re: [R-sig-phylo] fitContinuous in geiger: positive log-likelihoods when trait values <1

2011-03-07 Thread Dan Rabosky
Hi Nick- Are you are getting differences in relative AICs between models from simple rescaling (multiplying by a constant)? The actual values of the traits *might* matter for optimization, depending on various parameters associated with optimization (and whatever algorithm is being used - th

Re: [R-sig-phylo] fitContinuous in geiger: positive log-likelihoods when trait values <1

2011-03-07 Thread Nick Matzke
Doh! Really should have remembered that, likelihoods-can-be-greater-than-1 is likelihood 101... I am still a little puzzled by the dramatically different results between rescaling and not, will try to post an example in a sec... On 3/7/11 12:37 PM, Nick Matzke wrote: Hi all, It seems to

Re: [R-sig-phylo] The Speed of Different Methods For Obtaining the Descendant Tip Taxa per Node

2011-03-07 Thread Klaus Schliep
Hi Rob, this is partly also possible in R. You can find all generic functions specificly written for an (S3) object using: methods(class="phylo") This will miss functions, which are not generic and generic function which use the default mechanism, e.g. class "pml" has a specific "logLik.pml" meth

Re: [R-sig-phylo] fitContinuous in geiger: positive log-likelihoods when trait values <1

2011-03-07 Thread Liam J. Revell
Nick, Log-likelihoods are calculated as the logarithm of the product of the heights of the probability density function. Since the probability density function must integrate to 1.0, it can have a height that is much greater than 1.0 if all the probability density is concentrated on a small

[R-sig-phylo] fitContinuous in geiger: positive log-likelihoods when trait values <1

2011-03-07 Thread Nick Matzke
Hi all, It seems to be a popular week for questions! I am running fitContinuous on a variety of continuous trait data. I am noticing that when the traits are in units where the max is less than 1 (these are not ratio data, though), many of the various models produce log-likelihoods that are

Re: [R-sig-phylo] The Speed of Different Methods For Obtaining the Descendant Tip Taxa per Node

2011-03-07 Thread Rob Lanfear
Hi All, On the issue of visibility of functions in R, I definitely find it a struggle to 'discover' things that I could do with a particular object. Python has this worked out in a really nice way - if I have an object I can simply put a full-stop after it and hit tab, and I get a list of all curr

Re: [R-sig-phylo] multi-state categorical predictor variables in PGLS

2011-03-07 Thread Alejandro Gonzalez V
Hi Andrew, > As I understand it, gls() is doing a multiple generalized LS > regression with as many dummy variables as there are factor levels. > Is this a correct characterization? I think you'd get one dummy variable less than factor levels in your characterization (at least in regards to the

[R-sig-phylo] multi-state categorical predictor variables in PGLS

2011-03-07 Thread Andrew Barr
Hi everyone, I am trying to piece together the current best-practices for "phylogenetic ANOVA" with multi-state predictors. In my dataset, my four-level factor is non-random with respect to phylogeny. That is, if I know which higher level clade an species belongs to, I can predict with pretty go

Re: [R-sig-phylo] The Speed of Different Methods For Obtaining the Descendant Tip Taxa per Node

2011-03-07 Thread David Bapst
Emmanuel, all- That's pretty fast, even on my cheap laptop! > system.time(desc1<-c(as.list(1:Ntip(res_tree)),prop.part(res_tree))) user system elapsed 0.650.000.66 As far as why I didn't try prop.part, to be honest, I had no idea that prop.part() did that. The help file says: Desc

Re: [R-sig-phylo] Ancestral Character Estimation in ape

2011-03-07 Thread Liam J. Revell
Hi Alanna, It looks like the alpha of your fitted OU model is very large (>800)? In this case the corStruct from corMartins will essentially be a diagonal matrix of ones and the estimated ancestral state using GLS will be the arithmetic mean of your samples. Thus, your result makes sense - a

Re: [R-sig-phylo] Ancestral Character Estimation in ape

2011-03-07 Thread Luke Harmon
Hi Alanna - I can't vouch for the r code but if you have an OU model with a very high alpha, then you should expect all of the ancestral state estimates to be exactly the "optimal" trait value under OU - which will be the mean of all the tip species. Luke On Mar 7, 2011, at 3:59 PM, Alanna

[R-sig-phylo] Ancestral Character Estimation in ape

2011-03-07 Thread Alanna Maltby
Dear all I am trying to estimate ancestral characters using 'ace' in ape. I'm using GLS with a corStruct based on an alpha I estimated using OUCH, and corMartins. The estimate I get for the root node for each of my parameters exactly matches the mean of the tip values (to at least 6 decimal places

[R-sig-phylo] FW: read.tree() problem?

2011-03-07 Thread Thierry Janssens - TNW
Dear r-sig-phylo mailing list, The problem with reading a pre-computed species tree from www.microbesonline.org has been solved. See the text for details. Kind regards, Thierry Janssens -Original Message- From: Emmanuel Paradis [mailto:emmanuel.para...@ird.fr] Sent: maandag 7 maart 20