Usage
match_on_index(cases, control_pool, index_var, match_vars, extra_conditions = "", index_diff_limit = 90, consult_path, n_controls = 5, cores = 1, import_fn = read.delim, ...)
Arguments
cases
A dataframe of cases to which to match controls
control_pool
A dataframe of possible contols to match to cases
index_var
character string of the name of the variable containing index dates
match_vars
character vector detailing the common variables in cases
and
control_pool
to match on
extra_conditions
character string detailing other matching constraints (see details)
index_diff_limit
integer number of days before or after the case index date that
dummy index dates can be picked from the consultation files
consult_path
path to directory containing consultation files
n_controls
integer the number of controls to attempt to match to each case
cores
integer the number of processor cores to be used in processing
import_fn
function name stipulating the function used to read the consultation files
...
extra arguments to be passed to import_fn