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

Functions for static matching #44

Merged
merged 28 commits into from
Mar 13, 2024
Merged

Functions for static matching #44

merged 28 commits into from
Mar 13, 2024

Conversation

davidsantiagoquevedo
Copy link
Member

@davidsantiagoquevedo davidsantiagoquevedo commented Mar 5, 2024

This PR introduces two functions for matching:

  • match_cohort() matches the cohort based on nearest and exact characteristics. It uses matching algorithms implemented in MatchIt

  • censor_match() imputes the censoring date to matched couples

Notes:

  • Both functions include testing scripts. To keep 100% coverage of the package
  • In commit 47d70e2 a refactorization of censor_match() was included to correct a spelling mistake.

Copy link
Member

@GeraldineGomez GeraldineGomez left a comment

Choose a reason for hiding this comment

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

  • Please remove caliper parameter and related validations, nearest can provide the variables names required for MatchIt

@davidsantiagoquevedo
Copy link
Member Author

Final edits:

  • Added control to guarantee that the censoring date of matched couples is always greater than the outcome date.
  • Added input checks to get_censoring_date_match().
  • Renamed censor_cohort() as get_censoring_date_match() to make it easier for users to understand.
  • Refactored match_cohort to unify input for caliper and nearest.

@davidsantiagoquevedo davidsantiagoquevedo merged commit a6c2bab into main Mar 13, 2024
7 checks passed
@davidsantiagoquevedo davidsantiagoquevedo deleted the feat-matching branch March 13, 2024 15:38
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.

2 participants