The PSMATCH Procedure

Example 95.3 Optimal Variable Ratio Matching

(View the complete code for this example.)

This example performs optimal matching of variable numbers of patients in the control group with each patient in the treatment group in a propensity score analysis. The Drugs data set contains the patient information and is described in the section Getting Started: PSMATCH Procedure.

The following statements invoke the PSMATCH procedure and request optimal variable ratio matching to match each observation for patients in the treatment group with a variable number of observations for patients in the control group:

ods graphics on;
proc psmatch data=drugs region=treated(extend(stat=ps mult=one)=0.025);
   class Drug Gender;
   psmodel Drug(Treated='Drug_X')= Gender Age Bmi;
   match stat=ps method=varratio(kmin=1 kmax=3) exact=(Gender) caliper=.;
   assess ps var=(Gender Age Bmi)
          / plots(orient=vertical);
   output out(obs=match)=OutEx3 matchid=_MatchID;
run;

The CLASS statement specifies the classification variables. The PSMODEL statement specifies the logistic regression model that creates the propensity score for each observation, which is the probability that the patient receives Drug_X. The Drug variable is the binary treatment indicator variable, and TREATED='Drug_X' identifies Drug_X as the treated group. The Gender, Age, and Bmi variables are included in the model because they are believed to be related to the assignment.

The REGION= option specifies an interval region of propensity scores (or equivalently, logits of propensity scores) such that only observations that have propensity scores in the region are used in stratification and matching. Because the MATCH statement is also specified, the REGION=TREATED(EXTEND(STAT=PS MULT=ONE)=0.025) option requests that only observations that have propensity scores in the region defined by the treated observations be used for matching. The EXTEND(STAT=PS MULT=ONE)=0.025 option requests that the region be extended by the specified 0.025 in propensity score.

The MATCH statement specifies the criteria for matching. The STAT=PS option requests that the propensity score be used in computing differences between pairs of observations. The METHOD=VARRATIO(KMIN=1 KMAX=3) option requests optimal variable ratio matching of one to three control units to each unit in the treated group in order to minimize the total absolute difference in propensity score across all matches.

The default average number of control units to each treated unit is computed as the mean of the KMIN= and KMAX= values, so an average of two control units are matched to each treated unit. The EXACT=GENDER option forces the treated unit and its matched control unit to have the same value of Gender. The CALIPER=. option ignores the caliper requirement for matching.

The "Data Information" table in Output 95.3.1 displays information about the input and output data sets, the numbers of observations in the treated and control groups, the lower and upper limits for the propensity score support region, and the numbers of observations in the treated and control groups that fall within the support region. Of the 373 observations in the control group, 366 fall within the support region.

Output 95.3.1: Data Information

The PSMATCH Procedure

Data Information
Data SetWORK.DRUGS
Output Data SetWORK.OUTEX3
Treatment VariableDrug
Treatment GroupDrug_X
All Obs (Treatment)113
All Obs (Control)373
Support RegionExtended Treatment Group
Lower PS Support0.035231
Upper PS Support0.666148
Support Region Obs (Treatment)113
Support Region Obs (Control)366


The "Propensity Score Information" table in Output 95.3.2 displays summary statistics by treatment group for all observations, for the support region observations, and for the matched observations.

Output 95.3.2: Propensity Score Information

Propensity Score Information
ObservationsTreated (Drug = Drug_X)Control (Drug = Drug_A)
NMeanStd DevMinimumMaximumNMeanStd DevMinimumMaximum
All1130.3107730.1324670.0602310.6411483730.2088010.1319690.0201570.685757
Region1130.3107730.1324670.0602310.6411483660.2086770.1267390.0371410.635131
Matched1130.3107730.1324670.0602310.6411482260.2667000.1213790.0560860.635131


The "Matching Information" table in Output 95.3.3 displays the matching criteria, the number of matched sets, the numbers of matched observations in the treated and control groups, and the total absolute difference in the propensity score for all matches. Note that with an average of two control units to each treated unit, 226 control units are matched.

Output 95.3.3: Matching Information

Matching Information
Difference StatisticPropensity Score
MethodOptimal Variable Ratio Matching
Min Control/Treated Ratio1
Max Control/Treated Ratio3
Matched Sets113
Matched Obs (Treated)113
Matched Obs (Control)226
Total Absolute Difference1.436979


The ASSESS statement produces the tables and plots that summarize differences in the specified variables between treated and control groups for all observations, for the support region observations, and for the matched observations. As requested by the PS and VAR= options, the variables listed in the table are the logit of propensity score and the variables Gender, Age, and Bmi. By default (or if WEIGHT=MATCHWGT is specified), each treated unit receives a weight of 1 and each control unit receives a weight that is computed as the number of treated units divided by the number of control units in the matched set. That is, if three control units are matched to a treated unit in a matched set, then each control unit receives a weight of 1/3.

The "Standardized Variable Differences" table, as shown in Output 95.3.4. displays standardized differences between the treated and control groups for all observations, for the support region observations, and for the matched observations. For a binary classification variable (Gender), the difference is in the proportion of the first ordered level (Female).

Output 95.3.4: Standardized Differences

The PSMATCH Procedure

Standardized Variable Differences (Treated - Control)
Variable Standardized Mean Difference 
Mean DifferenceDivisorMean DifferencePercent ReductionVariance Ratio
All ObsRegion ObsMatched ObsWeighted Matched
Obs
All ObsRegion ObsMatched ObsWeighted Matched
Obs
Region ObsMatched ObsWeighted Matched
Obs
All ObsRegion ObsMatched ObsWeighted Matched
Obs
PS0.1019720.1020960.0440730.0051410.1322180.7712420.7721810.3333330.0388860.0056.7894.961.00761.09241.19101.0773
Age-4.095091-3.982615-1.504425-0.1312686.079104-0.673634-0.655132-0.247475-0.0215932.7563.2696.790.70760.73930.88120.9654
Bmi0.7392960.7287140.2355310.0295721.9231780.3844140.3789110.1224700.0153771.4368.1496.000.88540.92271.02491.1025
Gender-0.024817-0.022656-0.00442500.496925-0.049941-0.045592-0.00890408.7182.17100.000.98920.98990.99771.0000


The standardized mean differences are significantly reduced in the matched observations, the standardized differences are less than the recommended upper limit of 0.25, and the variance ratios between the two groups are within the recommended range of 0.5 to 2.

When ODS Graphics is enabled, the PSMATCH procedure displays a standardized differences plot for the variables that are specified in the ASSESS statement, as shown in Output 95.3.5.

Output 95.3.5: Standardized Differences Plot

Standardized Differences Plot


When you specify the ORIENT=VERTICAL option, the standardized differences are placed on the vertical axis. The "Standardized Variable Differences Plot" displays the standardized differences in the "Variable Differences" table in Output 95.3.4. All differences for the matched observations are within the recommended limits of –0.25 and 0.25, which are indicated by reference lines.

If you are not satisfied with the variable balance, you can do one or more of the following until you are satisfied: you can select another set of variables to fit the propensity score model, you can modify the matching criteria, or you can choose another matching method.

The OUT(OBS=MATCH)=OutEx3 option in the OUTPUT statement creates an output data set, OutEx3, that contains the matched observations. The following statements list the 10 observations that have lowest propensity scores, as shown in Output 95.3.6:

proc sort data=OutEx3 out=OutEx3a;
   by _PS_;
run;

proc print data=OutEx3a(obs=10);
   var PatientID Drug Gender Age Bmi _PS_ _MATCHWGT_ _MatchID;
run;

Output 95.3.6: Output Data Set with Optimal Variable Ratio Matches

ObsPatientIDDrugGenderAgeBmi_PS__MATCHWGT__MatchID
1311Drug_AFemale4922.800.0560860.333331
289Drug_XFemale4420.750.0602311.000001
3213Drug_AFemale4923.240.0618660.333331
4141Drug_AFemale4320.550.0640100.333331
5323Drug_XFemale4622.220.0676251.000002
6245Drug_AFemale5225.320.0715590.333332
7137Drug_AFemale4522.040.0721500.333332
840Drug_AFemale4220.650.0726550.333332
9341Drug_AMale5526.760.0868950.333333
10269Drug_AFemale4824.350.0875660.333334


By default, the output data set includes the variable _PS_ (which provides the propensity score) and the variable _MATCHWGT_ (which provides matched observation weights). The weight for each treated unit is 1. Because METHOD=VARRATIO(KMIN=1 KMAX=3) is specified in the MATCH statement, one, two, or three control units are matched to each treated unit; so the weight for each matched control unit is 1, 1/2, or 1/3. The MATCHID=_MatchID option creates a variable named _MatchID that identifies the matched sets of observations.

If you assume that no other confounding variables are associated with both the response variable and the treatment group indicator Drug, then after the responses for the trial are observed and added to the data set OutEx3, you can use the same outcome analysis on this output data set as you would have used on the original data set Drugs (augmented with responses) to estimate the treatment effect.