Open richelbilderbeek opened 5 years ago
Marked test with
skip("Cannot do ML estimation on BD trees, Issue #4, #4")
Please give a look inside mbd_loglik on the error triggered by condition2. I suppose you get the error because you are using q=0 which is not allowed by the "safety_threshold". In general q==0 could create problems. However if you want to test under BD conditions, any value of q should work, as long as nu==0 (if the environmental change never triggers, the probability of multiple speciation is not influent).
Thanks! I'm wondering if some elegant rewrite could allow for q == 0
. Combining the code with the mathematical derivation may help me succeed :+1:
i think you can add an if statement like if (nu == 0) then (whatever with q)
Note to self pmb_loglik
could handle every combination of q == 0
and nu == 0
. This was disabled by an if-statement, but dropping that restriction just worked. For mbd_loglik
this restriction cannot be dropped, due to log(pc)
being NaN
, where pc
is created by calc_cond_prob
.
The maximum likelihood estimation of the MBD package fails on (Single)BD trees.