Step 7: Producing PS histograms
Next we’re going to plot the distributions of the propensity scores of the exposed and unexposed groups in the same graph (separated by group).
The PSMATCH procedure produces many diagnostics including box plots and cumulative distributions of propensity scores as well as standardized difference before and after the propensity score method. Here is an alternative method to produce the histogram and propensity score descriptives.
proc univariate data=ps_out noprint;
var ps;
class exposure;
histogram / outhist=histogram normal nobars;
output out=ps_dist_scored_cohort min=min max=max p5=p5 p10=p10 Q1=p25 median=p50 Q3=p75 p90=p90 p95=p95;
run;
Step 8: Producing PS standardized differences
Produce standardized differences of the predefined variables between exposed and unexposed groups, before and after applying propensity score matching.
The PSMATCH procedure produces many diagnostics including box plots and cumulative distributions of PS as well as standardized difference before and after the PS method. Here is an alternative method to produce the standardized differences.
Using the "macro stddiff"
*********************Before matching************;
%stddiff(inds = cohort, groupvar = exposure,
numvars = year,
charvars = 4_drug 4_diag htn cholest pvd chf loop,
stdfmt = 8.5,
outds = std_result);
*********************After matching************;
%stddiff(inds = PS_out, groupvar = exposure,
numvars = year,
charvars = 4_drug 4_diag htn cholest pvd chf loop,
stdfmt = 8.5,
outds = std_result);