Supports 1:k nearest-neighbor caliper matching and IPTW weighting for observational cohorts.
Usage
consortium_propensity_score(
con = NULL,
cohort_table = "cohort",
exposure_col = "treatment",
covariate_cols = NULL,
method = "matching",
caliper = 0.2,
ratio = 1L,
trim = 0.01
)Arguments
- con
Active DBI connection (required if
cohort_tableis a string table name).- cohort_table
Character table name or
data.frame.- exposure_col
Column indicating treatment (1 = target, 0 = comparator).
- covariate_cols
Optional character vector of covariate column names to balance.
- method
Adjustment method: 'matching' (1:k caliper matching) or 'iptw' (IPTW weighting).
- caliper
Caliper distance in units of SD of logit(PS) (default 0.2).
- ratio
Ratio for 1:k matching (default 1L).
- trim
Trimming threshold for extreme propensity scores (default 0.01).
