Matches treated and control units based on estimated propensity scores.
Fits a logistic regression model (or accepts a pre-fitted one), computes
logit propensity scores, and calls match_couples() with a caliper on
the logit scale.
Usage
ps_match(
formula = NULL,
data = NULL,
treatment = NULL,
ps_model = NULL,
caliper_sd = 0.2,
method = "auto",
replace = FALSE,
ratio = 1L,
...
)Arguments
- formula
Formula for propensity score model (treatment ~ covariates). Required if
ps_modelis NULL.- data
Combined dataset containing both treated and control units
- treatment
Name of the binary treatment column (0/1 or logical)
- ps_model
Pre-fitted
glmobject (alternative to formula). If provided,formulais ignored.- caliper_sd
Caliper width in standard deviations of logit(PS). Default: 0.2 (Rosenbaum and Rubin recommendation).
- method
LAP solver method (default: "auto")
- replace
If TRUE, match with replacement (default: FALSE)
- ratio
Integer k for k:1 matching (default: 1)
- ...
Additional arguments passed to
match_couples()
Value
A matching_result object with additional propensity score info
in result$info$ps_model and result$info$caliper_value.
Details
The propensity score is the probability of treatment assignment conditional on observed covariates. Matching is performed on the logit of the propensity score (Rosenbaum and Rubin 1985), which provides better distributional properties than matching on the raw probability scale.
The default caliper of 0.2 SD of logit(PS) is recommended by Austin (2011) as removing approximately 98% of bias.