Usage
get_matches(cases, control_pool, n_controls, match_vars, extra_vars, extra_conditions = NULL, cores = 1, track = TRUE, tracker = function(case_num) ".", method = c("incidence_density", "exact"), diagnosis_date = NULL)
Arguments
control_pool
dataframe of potential controls to be used for matching
n_controls
number of controls to match to each case
match_vars
character vector of variables in the dataframes to be used to perform the
matching
extra_vars
character vector of other variables to be used in the matching to define other
conditions
extra_conditions
a character vector of length 1 defining further restrictions on matching
cores
number of cpu cores to be used by multicore (windows users should leave set to 1)
track
logical should a dot be printed to std.out for each case?
tracker
function to track progress of the function (See details)
method
The method of selection of controls (see details)
diagnosis_date
character the name of the variable in the cases and control_pool datasets
containing the date of diagnosis (or other event to base the IDM method on). If there is no
diagnosis date for a patient, this should be represented by NA