-
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
Constant #10
Constant #10
Conversation
* Updated notation and function structure in the multi individual constant model file for consistency. Updated rmot_run, rmot_models to reflect the changes. * Removed old constant stan file and cleared out references to it in stanmodels.R, rmot.rmd. * Updated ignore to exclude compiled binaries. * Cleared out .o and .so files. * Added develop branch as a trigger for PR --------- Co-authored-by: Fonti Kar <[email protected]>
…nette. Need to do test files yet.
…gle/y_multi in global environment not being seen within rmot_assign_data function.
…functions, y_single and y_multi are not evaluated globally #1
…functions, y_single and y_multi are not evaluated globally #1
…ecoevo/rmot into constant_single_individual
…y for single and multiple individuals. Tests all complete dynamically and when run in the testing console.
tests/testthat/helper-testing.R
Outdated
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.
Will rmot_test_single_individual
and rmot_test_multi_individual
be used for other models other than the constant?
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.
Yes, they form the basis of the testing template for the respective datasets.
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.
Nice work! Just a few comments that need address and awaiting for @dfalster's eyes on Stan related files. Once all address we can merge away! 🌳
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.
Well done team! A query about the way step is represented.
@@ -51,3 +51,10 @@ rsconnect/ | |||
inst/doc | |||
/doc/ | |||
/Meta/ |
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.
Good to exclude this stuff. FYI, I have these files as a general exclusion in my global gitignore, i.e. applying to all projects. Saves setting it up for each project. I'll send you a copy.
inst/stan/constant_multi_ind.stan
Outdated
if(i < n_obs){ | ||
if(ind_id[i+1]==ind_id[i]){ | ||
//Analytic solution | ||
y_hat[i+1] = y_hat[i] + Delta_hat[i]*(time[i+1]-time[i]); |
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 understand there's an analytic solution which is exact, but at first glance this looks like a Euler step. I think to would better to write as something like
y_hat[i+1] = step(y_hat[I], time[I], time[i+1], pars);
i.e. similar syntax to what is sued when you have Canham or other functions. Then put the
details of the step in the step function at the not.
inst/stan/constant_single_ind.stan
Outdated
Delta_hat[i] = growth(y_hat[i], ind_beta); | ||
|
||
if(i < n_obs){ //Analytic solution | ||
y_hat[i+1] = y_hat[i] + Delta_hat[i]*(time[i+1]-time[i]); |
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.
Similar comment to above
… the constant model and removed reference to the constant branch from R-CMD-checn.yaml.
I've made the requested changes and pushed them to the constant branch. |
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.
Nice, feel free to merge once tests have passed.
I suggest merging with a "squash commit", this will compress all the work non this branch into a single commit. Write a nice commit message than describes what has been added in this merge.
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.
Nice work Tess 🥳
Constant model is ready to be folded into the main branch, passes all tests.