Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with asr.stoch and irreversible model #10

Open
sdwfrost opened this issue Jul 30, 2014 · 0 comments
Open

Problem with asr.stoch and irreversible model #10

sdwfrost opened this issue Jul 30, 2014 · 0 comments

Comments

@sdwfrost
Copy link

Dear @richfitz

Nice job on diversitree - I've just started to play with it.

I'm trying to run stochastic mapping using the example of an irreversible mk2 model given here

The following code works fine with asr.joint and asr.marginal, but throws an error with asr.stoch

pars <- c(.1, .1, .03, .03, .03, .06)
set.seed(1)
phy <- trees(pars, "bisse", max.taxa=4, max.t=Inf, x0=0)[[1]]
h <- history.from.sim.discrete(phy, 0:1)
plot(h, phy, main="True history")
lik <- make.mk2(phy, phy$tip.state)
argnames(lik)
lik2<-constrain(lik, q10~0)
argnames(lik2)
fit2 = find.mle(lik2,c(.1))
st.s2 <- asr.stoch(lik2, fit2$par)

The above gives the following error:

Error in asr(lik(pars, pars.only = TRUE), ...) : 
  Exceeding maximum allowed history size

I don't get this for the unconstrained model when doing stochastic mapping. I've also tried calling make.asr.stoch.constrained explicitly, but I got the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant