rollmatch
is the main function of the package
<rollmatch>, which implements a comparison group selection
methodology for interventions with rolling participant entry over time.
A difficulty in evaluating rolling entry interventions is that a suitable
"entry" date is not observed for non-participants. This method, called
rolling entry matching, assigns potential comparison non-participants
multiple counterfactual entry periods which allows for matching of
participant and non-participants based on data immediately preceding each
participant's specific entry period, rather than using data from a fixed
pre-intervention period.
rollmatch(formula, data, tm, entry, id, lookback = 1, caliper = 0,
weighted_pooled_stdev = FALSE, num_matches = 3, match_on = "logit",
model_type = "logistic", replacement = TRUE)
A formula
in the form
treat ~ x1 + x2 ...
where treat
is a binary treatment
indicator (Treat = 1, Control = 0) and x1
and x2
are
pre-treatment covariates. Both the treatment indicator and
pre-treatment covariates must be contained in the input dataset.
The input panel dataset.
The time period indicator.
The time period in which the participant enrolled in the intervention (in the same units as the tm variable).
The individual id variable.
The number of time periods to look back before the time period of enrollment (1-10).
The pre-specified distance within which to allow matching.
The caliper width is calculated as the caliper
multiplied by the
pooled standard deviation of the propensity scores or the logit of the
propensity scores - depending on the value of match_on
.
Option that allows for weighted pooled standard deviation for caliper matching. FALSE for average pooled standard deviation and TRUE for weighted pooled standard deviation.
The number of comparison beneficiary matches to attempt to assign to each treatment beneficiary
Match on estimated propensity score ("pscore") or logit of estimated propensity score ("logit").
Use logistic regression ("logistic") or "probit" regression ("probit") to estimate the predicted probability of participating in the innovation.
Assign comparison beneficiaries with replacement (TRUE)
or without replacement (FALSE). If replacement
is TRUE, then
comparison beneficiaries will be allowed to be used with replacement within
a single quarter, but will be allowed to match to different treatment
beneficiaries across multiple quarters.
rollmatch
returns an object of class "rollmatch".
An object of class "rollmatch" is a list containing the following components:
The original rollmatch
call.
The output of the model used to estimate the distance measure.
The propensity score and logit of the propensity score.
The original dataset with matches, scores, and weights applied.
A basic summary table.
The balancing table.
Rolling entry matching requires three steps. First, a quasi-panel dataset is constructed containing multiple observations of non-participants (one for each entry period). Participants enter the data once in the baseline period immediately preceding their unique entry into the intervention. Time-varying covariates (e.g., health conditions, spending, utilization) are dynamic for each entry period's non-participant observations. Second, a predicted probability of treatment is obtained for participants and non-participants (e.g., through propensity score matching). Finally, the pool of potential comparisons for each participant is restricted to those that have the same "entry period" into the intervention. The matching algorithm then selects the best matched comparison(s) for each participant from the pool of non-participants with the same entry period.
# NOT RUN {
data(package="rollmatch", "rem_synthdata_small")
formula <- as.formula(treat ~ qtr_pmt + yr_pmt + age)
r_match <- rollmatch(formula, data = rem_synthdata_small, tm = "quarter",
entry = "entry_q", id = "indiv_id", caliper = 0.2)
r_match
# }
Run the code above in your browser using DataCamp Workspace