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

Add test switching functionality #16

Merged
merged 10 commits into from
Jun 28, 2024
Merged

Add test switching functionality #16

merged 10 commits into from
Jun 28, 2024

Conversation

sandypreiss
Copy link
Collaborator

Prior to this PR, the routine test used by each person is assigned at the start of their lifespan based on the proportion parameters for each test. They use the same routine test throughout their lifespan.

The goal of this PR is to enable us to simulate scenarios where a person uses multiple different routine tests throughout their lifespan. This is accomplished by specifying a single pattern of routine test availability that each person in the simulation uses. For example, in the default scenario in parameters.json, everyone in the simulation has colonoscopy as their routine test from age 50 to 60 and FIT as their routine test from age 61 to 75.

A tradeoff of this approach is that we lose the ability to probabilistically vary the routine test assigned to people within the simulation. Everyone in the simulation uses the same test-year pattern. Because we may still want to use the old test assignment functionality, a boolean parameter use_variable_routine_test determines whether the test pattern parameters are used.

@sandypreiss sandypreiss requested review from rjmorris and pzirali March 20, 2024 14:56
Copy link
Collaborator

@rjmorris rjmorris left a comment

Choose a reason for hiding this comment

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

I didn't try to run the simulation, but I trust that you did and things worked as expected. I reviewed the logic, and everything looked good to me. My comments are mostly confined to the (py)tests.

crcsim/agent.py Show resolved Hide resolved
tests/test_variable_routine_testing.py Outdated Show resolved Hide resolved
tests/test_variable_routine_testing.py Outdated Show resolved Hide resolved
tests/test_variable_routine_testing.py Outdated Show resolved Hide resolved
tests/test_variable_routine_testing.py Outdated Show resolved Hide resolved
tests/test_variable_routine_testing.py Outdated Show resolved Hide resolved
@sandypreiss
Copy link
Collaborator Author

@rjmorris I finally took this off the back burner today. Ready for another look.

Copy link
Collaborator

@rjmorris rjmorris left a comment

Choose a reason for hiding this comment

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

Looks good!

@pzirali pzirali merged commit 323b706 into main Jun 28, 2024
1 check passed
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