Propensity Score Matching Using SAS Enterprise Guide

12
Propensity Score Matching Using SAS Enterprise Guide. Ian Morton Newtyne SAS User Gathering (N- SUG1) Wednesday 19 th May 2010.

Transcript of Propensity Score Matching Using SAS Enterprise Guide

Page 1: Propensity Score Matching Using SAS Enterprise Guide

Propensity Score Matching Using SAS Enterprise Guide.

Ian Morton

Newtyne SAS User Gathering (N-SUG1)

Wednesday 19th May 2010.

Page 2: Propensity Score Matching Using SAS Enterprise Guide

What is the problem ? I have a fictitious dataset containing:

a set of background characteristics (about customers who bought a product);

an indicator of the year they bought the product (e.g. year 1 or year 2); and

an outcome (e.g. they bought the product). I want an estimate of the difference between whether

they bought it or not from one year to the next But I want the same or very similar customers; I don’t want complications of the “case mix” biasing the

answer. I will provide real examples later.

Page 3: Propensity Score Matching Using SAS Enterprise Guide

How do you do it ?

Featured in Allison, P. D. (1999) Logistic Regression Using the SAS System SAS Institute and Wiley, North Carolina.

Propensity Score Matching - two steps: scoring and then matching.

Terminology – year 1 (controls), year 2 (treatments)

Page 4: Propensity Score Matching Using SAS Enterprise Guide

Process flow – part 1

Page 5: Propensity Score Matching Using SAS Enterprise Guide

Parameterised code

Page 6: Propensity Score Matching Using SAS Enterprise Guide

SAS dataset Excel, import data, list data and create format

980 bought in year 1 and 1,020 bought in year 2

Obs var1 var2 var3 var4 var5 var6 var7 var8 var9 var10 var11 Product result 1 F 3 1 2 1 7 1 1 1 1 1 product

2 Bought

2 M 2 3 2 2 3 1 1 1 5 1 product 2

Not bought

3 M 2 3 2 1 6 1 1 1 1 1 product 2

Bought

4 F 3 1 2 1 7 1 1 1 2 1 product 2

Bought

5 M 2 3 2 1 5 1 1 1 1 1 product 2

Bought

.

.

.

. . .

.

.

. 2000 M 2 3 2 1 5 1 1 1 1 1 product

1 Not bought

Page 7: Propensity Score Matching Using SAS Enterprise Guide

Propensity score Use logistic regression to estimate probability

(propensity score) of the treatment In SAS (Analyse, regression, logistic) Provides a probability (propensity score) for all

students; treatment and control. The logistic equation is below, where Ti is the

treatment status, Xi are the observations and h(Xi) is made up of the covariates (age, gender, etc).

i

i

Xh

Xh

iie

eXT

11Pr

Page 8: Propensity Score Matching Using SAS Enterprise Guide

Matching Coca-Perraillon, M. (2007) Local and

Global Optimal Propensity Score Matching SAS Global Forum 2007, Orlando, Florida, April16th - 19th 2007.

Need to match treatments to controls by propensity score.

There are different matching methods Once a match has been found for the

treatments in the controls, use information on the latter's outcome for inference.

Page 9: Propensity Score Matching Using SAS Enterprise Guide

Process flow – part 2

Page 10: Propensity Score Matching Using SAS Enterprise Guide

Results 980 treatments reduced to 303 treatments The controls that match these treatments

are: Obs var1 var2 var3 var4 var5 var6 var7 var8 var9 var10 var11 result

1 F 3 1 1 2 6 1 1 2 2 1 Bought

2 M 3 3 1 1 3 1 1 1 2 1 Bought

3 F 1 1 1 1 7 1 1 1 2 1 Bought

4 F 1 1 1 1 6 1 1 1 2 1 Bought

.

.

.

.

.

.

.

.

.

303 F 1 1 1 1 7 1 1 1 2 1 Not Bought

The 303 treatments and matched controls have similar characteristics and allow further assessment

Page 11: Propensity Score Matching Using SAS Enterprise Guide

Uses of the method Justice

Want to know if programmes and interventions are successful in reducing reconvictions of offenders over time;

don’t want complications getting in the way, so need the same offender characteristics between cohorts.

Example: Ministry of Justice (2010) Evaluating the use of judicial mediation in Employment Tribunals Ministry of Justice Research Series 7/10.

Medical In a case control study need to match cases to controls by say gender, age, smoking

status. Example: Foster, E. M. (2003) Propensity Score Matching: An Illustrative Analysis of

Dose Response. Medical Care 41 10 1183-1192. Propensity score matching and then counter-factual inference

The Scottish Funding Council wanted an estimate of the drop-out rate of students who studied outside Scotland, if they had actually studied in Scotland.

An estimate of what would have been the outcome if customers who bought product 2 had actually bought product 1.

Example: Rosenbaum, P. R. and Rubin, D. B. (1983) The central role of the propensity score in observational studies for causal effects Biometrika 70 1 41-56.

Page 12: Propensity Score Matching Using SAS Enterprise Guide

Reference

Morton, I.D., Penny, K., Ashraf, M.Z. and Duffy, J.C. (In Press) The Use of Propensity Score Matching in Comparing Student Outcomes Sent to Journal of the Operational Research Society