macroevolution / bamm

A program for multimodel inference on speciation and trait evolution
GNU General Public License v2.0
33 stars 10 forks source link

time integrated branch rate and other R fxns #77

Closed drabosky closed 10 years ago

drabosky commented 10 years ago

Just noticed that this implements the old version of the exponential change function, needs to be updated - anything else?

also, I think it is safer to have a tolerance (TOL) argument for checks for zero-valued variables eg., not if (x == 0) but if (abs(x) < TOL) TOL = some small value

I probably do x == 0 in R on occasion but it's suboptimal

blueraleigh commented 10 years ago

Can you confirm? I changed it last week so that for positive values of p2 it is (p1/p2) * (2 * p2 * (t2-t1) + exp(-p2_t2) - exp(-p2_t1) )

drabosky commented 10 years ago

Ah, I didn't look closely at the code just the comments at the head of the file

On Feb 10, 2014, at 7:20 PM, blueraleigh wrote:

Can you confirm? I changed it last week so that for positive values of p2 it is (p1/p2) * (2 * p2 * (t2-t1) + exp(-p2_t2) - exp(-p2_t1) )

— Reply to this email directly or view it on GitHub.