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

Fix for issue with missing.contact.age "sample" and age.limits > 0 #170

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

lwillem
Copy link
Contributor

@lwillem lwillem commented Dec 20, 2024

Make sure the selection of contact.ages above the age.limits is done once, and not for each option of the missing.contact.age. Included also a testthat case to double check.

Fix for #169

lwillem and others added 8 commits December 20, 2024 18:20
…ssing.contact.age` option set to "sample" caused an issue. Specifically, the age groups below the defined `age.limits` were not excluded, unlike with the `missing.contact.age` options "ignore" or "remove." This led to a contact matrix containing contacts with an age of NA. A corresponding `testthat` case has been added to validate this function's behavior.
…ge`, which was introduced in the last update where `is.integer(3)` was changed to `2L` instead of `3L`.
…act.age` is only executed if there is (non-NA) information available to sample from. Additionally, ensured that the final set does not include `NA` values for `contact.age` with this user option.
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.

1 participant