| Title: | Implementation of Case-Control Optimal Matching |
|---|---|
| Description: | Cases are matched to controls in an efficient, optimal and computationally flexible way. It uses the idea of sub-sampling in the level of the case, by creating pseudo-observations of controls. The user can select between replacement and without replacement, the number of controls, and several covariates to match upon. See Mamouris (2021) <doi:10.1186/s12874-021-01256-3> for an overview. |
| Authors: | Pavlos Mamouris [aut, cre], Vahid Nassiri [aut, ctb] |
| Maintainer: | Pavlos Mamouris <[email protected]> |
| License: | GPL-2 |
| Version: | 0.1.1 |
| Built: | 2026-09-18 09:09:50 UTC |
| Source: | https://github.com/cran/ccoptimalmatch |
A dataset containing cases and controls using the Intego registry data. The variables are as follows:
data(being_processed)data(being_processed)
A data frame with 77110 rows and 11 variables
Each case forms a cluster with all possible controls to be matched.
Unique identifier for each patient.
Binary; if case == Colorectal Cancer, otherwise control.
Binary; 1 = case, otherwise control.
Year of contact.
The year that the patient first entered the database.
Comorbidity Index. Count of chronic diseases before the index date.
Difference in age between cases and controls.
Difference in follow-up between cases and controls.
Total controls available to be pooled per case.
Number of times the control is available to be matched for different cases.
Fast and optimal matching for cases and controls
Maintainer: Pavlos Mamouris [email protected]
Authors:
Vahid Nassiri [email protected] [contributor]
A dataset containing cases and controls using the Intego registry data, but not the final dataset. The variables are as follows:
data(not_processed)data(not_processed)
A data frame with 656506 rows and 9 variables
Unique identifier for each patient.
Year of contact.
Patient's year of birth.
Patient's gender.
Patient's general practice.
Binary; if case == Colorectal Cancer, otherwise control.
The year that the patient first entered the database.
Difference in follow-up between cases and controls.
Comorbidity Index. Count of chronic diseases before the index date.
optimal_matching is performing the optimal match between cases and controls in an iterative way and computational efficient way
optimal_matching( total_database, n_con, cluster_var, Id_Patient, total_cont_per_case, case_control, with_replacement = FALSE )optimal_matching( total_database, n_con, cluster_var, Id_Patient, total_cont_per_case, case_control, with_replacement = FALSE )
total_database |
a data frame that contains the cases and controls |
n_con |
number of controls to be matched |
cluster_var |
a variable that contains one case with all available controls to be pooled |
Id_Patient |
Id of the patient |
total_cont_per_case |
total number of controls that are available for each case |
case_control |
a variable containing "case" and "control" |
with_replacement |
Use replacement or not |
Here is where I should put all my details. This is where I should give more examples if necessary
a data frame containing the cases and the corresponding number of controls
optimal_matching(being_processed, n_con=2, cluster_var=cluster_case, Id_Patient=Patient_Id, total_cont_per_case=total_control_per_case, case_control = case_control)optimal_matching(being_processed, n_con=2, cluster_var=cluster_case, Id_Patient=Patient_Id, total_cont_per_case=total_control_per_case, case_control = case_control)