Re: [R-sig-phylo] Estimating discrete ancestral states with ARD model in ace

2016-12-06 Thread Katharine Walter
Fantastic, thank you. Yes, diversitree works well for my data. I fit a
3-state model, comparing symmetric vs. asymmetric rates and found that the
asymmetric rates model was the best fit. The marginal likelihood node
reconstructions make more sense than did the results from ace.

Thank you for your help!

On Mon, Dec 5, 2016 at 10:52 AM, Liam J. Revell  wrote:

> Hi Katharine.
>
> You can also do ancestral state estimation for the model "ARD" using the
> packages diversitree. There is a worked example on my blog here:
> https://urldefense.proofpoint.com/v2/url?u=http-3A__blog.phy
> tools.org_2016_09_possible-2Dbug-2Din-2Dacemodelard-2Dand-
> 2Dother.html=CwIC-g=-dg2m7zWuuDZ0MUcV7Sdqw=xoGnL4
> 0RVzN6D2MIG8KmZ26dy3o8eec0rBKUtCA6gh4=rIQpuCeVkjAvCCk1mmLY
> Le-xQKuhvk1LA_V4YQ1hglQ=uHgZqwdDk6rAgVazzwKjjUdTrk7gGJbR0agrKcCaSag=
> (also highlighting a possible bug in ace for model="ARD" & other
> non-reversible models). Let us know if this helps.
>
> All the best, Liam
>
> Liam J. Revell, Associate Professor of Biology
> University of Massachusetts Boston
> web: https://urldefense.proofpoint.com/v2/url?u=http-3A__faculty.
> umb.edu_liam.revell_=CwIC-g=-dg2m7zWuuDZ0MUcV7Sdqw=xoG
> nL40RVzN6D2MIG8KmZ26dy3o8eec0rBKUtCA6gh4=rIQpuCeVkjAvCCk1m
> mLYLe-xQKuhvk1LA_V4YQ1hglQ=1xd3YzpUZ_dGrHVJ0c_UnTkz3T1Koxf
> racHjlH7_8Os= email: liam.rev...@umb.edu
> blog: https://urldefense.proofpoint.com/v2/url?u=http-3A__blog.phy
> tools.org=CwIC-g=-dg2m7zWuuDZ0MUcV7Sdqw=xoGnL40RVzN6D2
> MIG8KmZ26dy3o8eec0rBKUtCA6gh4=rIQpuCeVkjAvCCk1mmLYLe-xQKuh
> vk1LA_V4YQ1hglQ=sOkLdKstR35Im3KMDgRA9caOvPT4PgnQqEleSi1O6XU=
> On 12/5/2016 10:07 AM, Katharine Walter wrote:
>
>> Hi,
>>
>> I am interested in estimating discrete ancestral states in ace using the
>> calls:
>> fitER<-ace(tipRegion,tree,model="ER",type="discrete")
>> fitARD<-ace(tipRegion,tree,model="ARD",type="discrete", use.expm=TRUE)
>>
>> When I fit the ARD model (with either use.expm=TRUE or use.eigen=TRUE), I
>> get the following warning:
>>  1: In nlminb(rep(ip, length.out = np), function(p) dev(p), lower = rep(0,
>>  : imaginary parts discarded in coercion
>>
>> Additionally, the two rates which I expect to be the highest are estimated
>> as 0. There are 3 tip states for a tree of 146 tips and 145 internal
>> nodes.
>> A likelihood ratio test supports the ARD model, but I cannot trust model
>> results. I am wondering:
>> 1) is there an obvious error that is creating this warning and unexpected
>> output?
>> 2) should I use a simpler model (i.e. SYM)? Or should I reclassify tip
>> states so that I examine transitions between only 2 states?
>>
>> Thank you in advance for your help! This is a fantastic package!
>> Best,
>>
>> [[alternative HTML version deleted]]
>>
>> ___
>> R-sig-phylo mailing list - R-sig-phylo@r-project.org
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.et
>> hz.ch_mailman_listinfo_r-2Dsig-2Dphylo=CwIC-g=-dg2m7zWuu
>> DZ0MUcV7Sdqw=xoGnL40RVzN6D2MIG8KmZ26dy3o8eec0rBKUtCA6gh4&
>> m=rIQpuCeVkjAvCCk1mmLYLe-xQKuhvk1LA_V4YQ1hglQ=pSBdOYX6UUnU
>> bfNnRjbpX31WKCWoAzTVaiZstHv5jII= Searchable archive at
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mail
>> -2Darchive.com_r-2Dsig-2Dphylo-40r-2Dproject.org_=CwIC-g&
>> c=-dg2m7zWuuDZ0MUcV7Sdqw=xoGnL40RVzN6D2MIG8KmZ26dy3o8eec0r
>> BKUtCA6gh4=rIQpuCeVkjAvCCk1mmLYLe-xQKuhvk1LA_V4YQ1hglQ=
>> Lx_B88b73BWgbpOmze_VJuaDDnU2DAv1EXhCN9wGAbw=
>>
>

[[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] Estimating discrete ancestral states with ARD model in ace

2016-12-05 Thread Liam J. Revell

Hi Katharine.

You can also do ancestral state estimation for the model "ARD" using the 
packages diversitree. There is a worked example on my blog here: 
http://blog.phytools.org/2016/09/possible-bug-in-acemodelard-and-other.html 
(also highlighting a possible bug in ace for model="ARD" & other 
non-reversible models). Let us know if this helps.


All the best, Liam

Liam J. Revell, Associate 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 12/5/2016 10:07 AM, Katharine Walter wrote:

Hi,

I am interested in estimating discrete ancestral states in ace using the
calls:
fitER<-ace(tipRegion,tree,model="ER",type="discrete")
fitARD<-ace(tipRegion,tree,model="ARD",type="discrete", use.expm=TRUE)

When I fit the ARD model (with either use.expm=TRUE or use.eigen=TRUE), I
get the following warning:
 1: In nlminb(rep(ip, length.out = np), function(p) dev(p), lower = rep(0,
 : imaginary parts discarded in coercion

Additionally, the two rates which I expect to be the highest are estimated
as 0. There are 3 tip states for a tree of 146 tips and 145 internal nodes.
A likelihood ratio test supports the ARD model, but I cannot trust model
results. I am wondering:
1) is there an obvious error that is creating this warning and unexpected
output?
2) should I use a simpler model (i.e. SYM)? Or should I reclassify tip
states so that I examine transitions between only 2 states?

Thank you in advance for your help! This is a fantastic package!
Best,

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