Skip to content

Fully featured DiseasyModelOde #162

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

Merged
merged 129 commits into from
Feb 18, 2025
Merged

Conversation

RasmusSkytte
Copy link
Contributor

@RasmusSkytte RasmusSkytte commented Jan 30, 2025

Intent

Fixes #154, #141

This PR improves the implementation of DiseasyModelOde and DiseasyModelOdeSeir

Approach

  • The $get_results() function can now be called for DiseasyModelOde.
  • Mapping from the model infections to different observables is now supported.
  • A $plot() method has been added to easily visualise the model results (works with the plot() generic)
  • Using different age stratification than the data source is now supported by DiseasyModelOde
  • In initialise_state_vector we now actually use "incidence" for the input data (previously we used a different normalisation by accident and providing the incidence gave wrong results (The "SEIR-initialisation" vignette has been updated accordingly)
  • A new vignette has been added to show case how to use DiseasyModelOdeSeir.

In addition, a number of fixes has been made and features added

  • A flag is added to DiseasyObservables$get_observation called "respect_last_queryable_date" to allow the fetching of data
    beyond the last_queryable_date.
  • data base connections in DiseasyObservables are now closed as expected.
  • hash_environment has been improved to allow arbitrarily nested functions.
  • Lots of additional tests has been added

Known issues

Waiting on the following

Tests fail on r-devel. I can't wait to see how R manages to make dates "equal" but not "identical".

Checklist

  • The PR passes all local unit tests
  • I have documented any new features introduced
  • If the PR adds a new feature, please add an entry in NEWS.md
  • A reviewer is assigned to this PR

RasmusSkytte and others added 30 commits January 27, 2025 15:18
@RasmusSkytte RasmusSkytte force-pushed the feature/DiseasyModelOde-get_results branch from 74c444f to 35e20e8 Compare February 3, 2025 14:08
@RasmusSkytte RasmusSkytte force-pushed the feature/DiseasyModelOde-get_results branch 2 times, most recently from ad5599f to db24936 Compare February 4, 2025 11:29
@RasmusSkytte RasmusSkytte force-pushed the feature/DiseasyModelOde-get_results branch from 90c9ce9 to 9b504a4 Compare February 4, 2025 13:26
@RasmusSkytte RasmusSkytte force-pushed the feature/DiseasyModelOde-get_results branch from 9b504a4 to 32897e2 Compare February 4, 2025 13:38
@RasmusSkytte RasmusSkytte force-pushed the feature/DiseasyModelOde-get_results branch from 32897e2 to 29f5422 Compare February 4, 2025 13:40
@RasmusSkytte RasmusSkytte marked this pull request as ready for review February 7, 2025 22:42
Copy link
Contributor

@kaare-gr kaare-gr left a comment

Choose a reason for hiding this comment

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

Vignettes may be reviewed further separately.

@RasmusSkytte
Copy link
Contributor Author

Vignettes updated after discussion with Kaare -- merging

@RasmusSkytte RasmusSkytte merged commit abc56c0 into main Feb 18, 2025
23 of 26 checks passed
@RasmusSkytte RasmusSkytte deleted the feature/DiseasyModelOde-get_results branch February 18, 2025 11:27
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.

FEATURE: Implement $get_results() in DiseasyModelOde FEATURE: Vignette for DiseasyModelOdeSeir
2 participants