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

Constant #10

Merged
merged 36 commits into from
Apr 4, 2024
Merged

Constant #10

merged 36 commits into from
Apr 4, 2024

Conversation

Tess-LaCoil
Copy link
Collaborator

Constant model is ready to be folded into the main branch, passes all tests.

Tess-LaCoil and others added 30 commits October 17, 2023 14:52
* 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]>
…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
…y for single and multiple individuals. Tests all complete dynamically and when run in the testing console.
@Tess-LaCoil Tess-LaCoil requested a review from fontikar April 3, 2024 05:53
Copy link
Collaborator

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?

Copy link
Collaborator Author

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.

Copy link
Collaborator

@fontikar fontikar left a 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! 🌳

@Tess-LaCoil Tess-LaCoil requested a review from dfalster April 3, 2024 06:20
Copy link
Member

@dfalster dfalster left a 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/
Copy link
Member

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 Show resolved Hide resolved
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]);
Copy link
Member

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.

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]);
Copy link
Member

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.
@Tess-LaCoil
Copy link
Collaborator Author

I've made the requested changes and pushed them to the constant branch.

Copy link
Member

@dfalster dfalster left a 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.

Copy link
Collaborator

@fontikar fontikar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work Tess 🥳

@Tess-LaCoil Tess-LaCoil merged commit 9365267 into master Apr 4, 2024
8 checks passed
@Tess-LaCoil Tess-LaCoil deleted the constant branch April 4, 2024 04:25
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

Successfully merging this pull request may close these issues.

3 participants