optimal_matching {ccoptimalmatch}R Documentation

optimal_matching

Description

optimal_matching is performing the optimal match between cases and controls in an iterative way and computational efficient way

Usage

optimal_matching(
  total_database,
  n_con,
  cluster_var,
  Id_Patient,
  total_cont_per_case,
  case_control,
  with_replacement = FALSE
)

Arguments

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

Details

Here is where I should put all my details. This is where I should give more examples if necessary

Value

a data frame containing the cases and the corresponding number of controls

Examples

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)

[Package ccoptimalmatch version 0.1.0 Index]