powered by
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 )
a data frame that contains the cases and controls
number of controls to be matched
a variable that contains one case with all available controls to be pooled
Id of the patient
total number of controls that are available for each case
a variable containing "case" and "control"
Use replacement or not
a data frame containing the cases and the corresponding number of controls
Here is where I should put all my details. This is where I should give more examples if necessary
# NOT RUN { 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) # }
Run the code above in your browser using DataLab