Hi Everyone,

Thanks for your responses. I guess I failed to explain what I really meant. 
Apologies.

I have a time-scaled ultrametric tree and a binary character (and no missing 
data) and I want to fit a true Dollo character (exactly as Brian describes 
with: 1) a root state of zero, 2) a single gain, and 3) losses if required). 
The thing I want to get at is those losses, and ideally using stochastic 
character mapping so I have both where and when and uncertainties in both.

If I understand correctly the matrix(c(0,0,1,0),2,2) model won’t quite do this 
so maybe ace/make.simmap can’t cope with this?

Thanks again,


Graeme

> On 15 Sep 2015, at 10:36, Liam J. Revell <liam.rev...@umb.edu> wrote:
> 
> Hi Graeme.
> 
> What Matt says is correct, of course, but it is also true that you can do 
> this with ace or make.simmap.
> 
> That would look like:
> 
> model<-matrix(c(0,0,1,0),2,2)
> rownames(model)<-colnames(model)<-0:1
> ## ace
> fit<-ace(x,tree,type="discrete",model=model)
> ## make.simmap
> trees<-make.simmap(tree,x,model=model,nsim=100)
> 
> You (should) get the exact same parameter estimates for the rate 1->0 for all 
> three methods, so it depends what you want to do: stochastic mapping, 
> marginal ASR, joint ASR, or simply estimate the parameters of the Mk model.
> 
> BUT (and I see that Brian just responded with something along the same lines) 
> a Dollo character does not imply that 0->1 does not occur, but that it occurs 
> only once. If the root state is 0, not 1, then this could make things a 
> little more complicated; however one possibility (and, to be fair, I haven't 
> given this too much thought), would be to put a strong prior on the root to 
> be 0 and the transition 0->1 to be low (but non-zero) using stochastic 
> mapping.
> 
> 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 9/14/2015 8:15 PM, Matt Pennell wrote:
>> ## make a likelihood function
>> lik <- make.mk2(t, d)
>> 
>> ## constrain the likelihood so that it only allows forward transitions
>> lik_con <- constrain(lik, q10~0)
>> 
>> ## estimate the MLE
>> fit <- find.mle(lik_con, 0.1)
>> 
>> ## use parameters to do ASR using ML parameters. Other operations also
>> possible.
>> asr <- asr.joint(lik_con, fit$par)

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

Reply via email to