-
Notifications
You must be signed in to change notification settings - Fork 2
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
Refac effectiveness matching #57
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* feat: match function * refac: added MatchtIt to Description * feat: documentation, removed in output. Changed name of function * roxygen: generate documentation match_cohort * feat: added basic estructure of function to censore matches * Fix 38 age interval get age group (#43) * fix: definition of age interval when (max_val-min_val)%%setp !=0. Added option to set interval '<min_val' when min_val<0 * refac: removed test forcing interval '>max_val', when (max_val-min_val)%%step!=0. Added test for min_val>0 * refac: step=10 on PH-accept test * feat: pulled description from previous PR * feat: warning for module of interval by step different to zero. Updated documentation of the function * simplified tests to control warning * roxygen: description of warning and lower value * fix: assert_number replaced by assert_integerish * fix: upper = max_val for assertion on min_val * style: documentation * fix: warning message for (max-min)%%step!=0 * roxygen: automatic update * fix: assert_integerish replaced by assert_int, better for integer numbers. Removed upper check for min_val to avoid redundancy with lower check for max_mal * fix: example in documentation * feat: test for non-integer values * refac: simplified workflow of match_cohort. Set method = nearest by default and ratio = 1 in matchit * fix: documentation reflecting changes in match_cohort() * roxygen: refac match_cohort * feat: documentation censore_match * roxygen: documentation censore_cohort * fix: example in documentation of both functions and column selection excluding weights to pass gp() * roxygen: fixed examples * feat: test for basic expectations and minimum censoring date * fix: return ordered datetype column matching with order of data frame * fix: test for minimum values. Added test for datetype * feat: tests for match_cohort * added MatchIt to wordlist * refac: replaced 'censore' by 'censor'. This misspelling had propagated throughout all the new functions * removed duplicated test * refac: added control for censoring date of matches. No censoring if member of couple presents outcome before censoring date * feat: test for outcome date before censoring date * sytle: lintr line 73 * roxygen: changes in documentation by adding outcome_date_col to params * feat: input checks censor_match * refac: censor_match() renamed as get_censoring_date_match * refac: removed caliper from input. receives it now
…ctiveness-matching
…orrecteness of estimation, simplified output and names
…in the estimation of the effectiveness
…model() vai survival
…. Returns ve, test and loglog plot
… from generic methods
GeraldineGomez
approved these changes
Jul 8, 2024
This was referenced Jul 17, 2024
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces many breaking changes in Vaccineff. The number of functions and steps for computing vaccine effectiveness has been reduced. The new pipeline for estimation consists of three main functions:
make_immunization()
: This function prepares the information on immunization date and vaccine status. It can handle more than one column for vaccine dates and custom vaccine statuses. In such cases, it returns the name of the column that was selected as immunizing and the custom name, if provided.match_cohort()
: We improved and generalized this function to reduce observation bias in cohorts. The default matching strategy isstatic
, based onnearest
andexact
characteristics usingMahalanobis
distance. The exposure times of the pairs are adjusted after matching. In future releases, rolling calendar matching will be introduced as a more accurate method to account for exposure times. The function returns ans3 object
of typematch
, from which a summary and balance of the cohorts can be printed using thesummary()
method, and the matched cohort can be extracted using thedataset()
method. The matched cohort contains all the necessary information to estimate vaccine effectiveness.effectiveness()
: This function receives a (matched) cohort and estimates vaccine effectiveness using the Hazard Ratio (HR). Ans3 object
of typeeffectiveness
is returned, compatible with theplot
andsummary
methods. Future releases will provide relative risk (RR) as an alternative for cases where the proportional hazards hypothesis is not satisfied.Related issues
summary(effectiveness)
includes the suggestions made in issue Simplifying output cohort effectiveness #49match_cohort
) solves issue Dynamic matching #37Compatibility: Users can still access the previous estimation pipeline of Vaccineff via release
0.0.1
.