-
Notifications
You must be signed in to change notification settings - Fork 3
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
New DD models #34
base: develop
Are you sure you want to change the base?
New DD models #34
Conversation
… DD models in dd_lamuN()
Merge branch 'develop' into new-ddmodels # Conflicts: # R/dd_loglik.R # tests/testthat/test_z_DDD.R
The problem is with |
#if (ddep > 5) { | ||
# stop("This DD model is not implemented for the analytical method yet.") | ||
#} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#if (ddep > 5) { | |
# stop("This DD model is not implemented for the analytical method yet.") | |
#} |
Commented out code is not desirable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only put stop for user-accessible functions
abstol = 1e-10 | ||
reltol = 1e-8 | ||
abstol = 1e-16 | ||
reltol = 1e-10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keep reduced tolerance for CR model?
y = dd_integrate(probs,brts[(k-1):k],rhs_func_name,c(pars1,k1,ddep),rtol = reltol,atol = abstol,method = methode) | ||
probs = y[2,2:(lx+1)] | ||
#y = deSolve::ode(probs,brts[(k-1):k],rhs_func,c(pars1,k1,ddep),rtol = reltol,atol = abstol,method = "analytical") | ||
#probs2 = y[2,2:(lx+1)] | ||
probs = dd_loglik_M(pars1,lx,k1,ddep,tt = abs(brts[k] - brts[k-1]),probs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unsure which version should be kept here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this is just git mismatching the versions because of the large size of the file and the redundancies in the script. In reality, new-dd-models
retains the same version as develop
|
||
if (ddmodel > 5) { | ||
if (methode == "analytical" || cond == 3) { | ||
stop("Sorry, ddmodel options > 5 have not been developed for method = \"analytical\" or cond = 3.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stop("Sorry, ddmodel options > 5 have not been developed for method = \"analytical\" or cond = 3.") | |
stop("Sorry, ddmodel options > 5 have not been tested for method = \"analytical\" or cond = 3.") |
Hi @rsetienne, are there still some standing issues we need to address here, or is this branch ready to be merged to |
Hi, develop needed to be fixed first. I think we're almost ready.
Op vr 10 feb. 2023 18:07 schreef Théo Pannetier ***@***.***>:
… Hi @rsetienne <https://github.com/rsetienne>, are there still some
standing issues we need to address here, or is this branch ready to be
merged to develop?
—
Reply to this email directly, view it on GitHub
<#34 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADMTHGP5NKTGDYDLSW3CRUTWWZYVHANCNFSM5ETK5I6Q>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
There are still errors on GHA when trying to merge. @TheoPannetier, can you please check? |
I expanded the possible of values of arguments
ddmodel
/ddep
from 5 to 15 possible DD models, covering all combinations of linear, power, or exponential DD; or CR speciation / extinction (except of course the CR speciation + CR extinction model).Updated the corresponding doc
Added tests to make sure that
dd_loglik()
doesn't crash and returns a non-infinite loglik when using themdd_loglik()
return-Inf
instead of an errorAdded a few helper functions (
both_rates_vary()
,is_speciation_linear()
,get_Kprime()
) to help with model-dependent conditions