Propensity Score
Analyze → Propensity Score. For observational data, where treatment was not randomized: the treated and untreated groups differ in ways that also drive the outcome, so comparing them directly confounds the treatment's effect with who happened to receive it. The propensity score is each case's probability of treatment given its covariates; matching or weighting on it builds a comparison where the groups look alike on those covariates — closer to what a randomized design would have produced.
The workflow is three steps in one procedure: estimate the score, adjust (match or weight), and check balance. The adjusted sample is then handed back to you as an ordinary variable, so any analysis in the application can run on it.
The data layout
- Treatment — a numeric variable coded 0/1, with 1 = treated. Any other value stops the analysis with a message (recode first if your groups are labelled differently).
- Covariates — numeric pre-treatment characteristics that may drive both treatment and outcome. Choose them for what they are, not for significance: the score model is a means to balance, not a model to interpret.
Weighting. The Weight Cases setting does not apply here — pairing weighted cases is not well defined, and layering the IPTW weight this procedure produces on top of another weight would compound two case multiplicities. An active weight variable only selects cases, and the output says so.
The dialog
Pick the Treatment and tick the Covariates. Then choose the Method:
- Match nearest controls (ATT) — each treated case takes its nearest
control(s) by propensity score, greedily, without replacement (a control is
used once), hardest-to-match first. The estimand is the average effect
on the treated: the matched sample resembles the treated group by
construction.
- Controls per treated (k) — 1:k matching (default 1). A treated case keeps a partial set if the control pool runs out.
- Caliper — the widest acceptable match distance, in standard deviations of the logit of the score (0.2 is the common recommendation). A treated case with no control inside the caliper is left unmatched and counted in the summary — better an honest smaller sample than a forced bad pair. Blank means no caliper.
- Weight by inverse probability (IPTW) — every case is kept and weighted: under the default ATE estimand, treated cases by 1/e and controls by 1/(1−e), where e is the score; under ATT, treated cases keep weight 1 and controls get e/(1−e). Check the summary's maximum weight: a huge weight means one case with a score near 0 or 1 dominates the weighted sample.
Save options: the matched-sample filter (propensity_matched, a 1/0
variable — on by default for matching), the IPTW weight
(propensity_weight — on by default for weighting), and optionally the
score itself (propensity_score).
Reading the output
- Propensity Score Model — the logistic model behind the score (coefficients, Wald tests, odds ratios). It is diagnostics, not findings: a "significant" covariate here is not a treatment effect.
- Propensity Match Summary / Propensity Weight Summary — how many cases matched (and how many treated found no in-caliper control), or the weight distribution per group.
- Propensity Balance — the point of the exercise: each covariate's standardized mean difference (treated − control, over the unadjusted pooled SD) before and after adjustment, on one shared scale. |SMD| ≤ 0.1 is the common adequate-balance benchmark. A covariate still imbalanced after adjustment is a warning to revisit the score model (interactions, transformations) — not to proceed regardless.
- Balance Plot (the Plot balance checkbox, on by default) — the same numbers as paired points per covariate, with zero (perfect balance) always in view. Before → After collapsing toward the zero line is the picture of a successful adjustment.
Using the adjusted sample
This procedure estimates no treatment effect itself — deliberately. The saved column feeds the analysis you actually want, with the design question and the outcome question kept separate (decide the adjustment before looking at outcomes):
- After matching: Data → Select Cases, condition
propensity_matched = 1, then run the outcome analysis (a t test, a regression, …) on the matched sample. - After weighting: Data → Weight Cases by
propensity_weight, then run the outcome analysis on the weighted sample.
Scope (v1). Greedy nearest-neighbour and IPTW only — no optimal, genetic or full matching, and no doubly-robust estimators. And no causal magic: matching and weighting adjust only for the covariates you supplied. An unmeasured confounder passes straight through.