Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: teffects, caliper, propensity score matching


From   "Cunningham, Scott" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: teffects, caliper, propensity score matching
Date   Fri, 28 Feb 2014 13:32:54 -0600

I'm using -teffects- for the first time and am having some trouble understanding the error messages. 

The data for this exercise comes from Dehejia and Wahba's (DW) (2002) Review of Economics and Statistics article on propensity score matching.  The data can be downloaded here: (http://users.nber.org/~rdehejia/data/nswdata2.html).  I am using the new_dw.dta sample with 185 treatment observations to which I have appended the CPS controls (15,992 observations).  The code that I use to create the covariates used by DW is pasted at the bottom of this email.

1.  My first question is regarding the comparability of teffects psmatch and psmatch2.  I have been unable to successfully replicate psmatch2 results using teffects. The two seemingly identical commands yield very different treatment effect estimates.  -teffects- gives me an estimate of 730.38, but psmatch2 age me a return of 951.  My understanding is that both used logit to estimate propensity score, both used nearest neighbor(1) to find nearest neighbor.  So I am at a loss to explain why they are different.


* ATET using -teffects-
teffects psmatch (re78) (treat age agesq agecubed edusq edure74 education married nodegree re74 re75 u74 u75 black hispanic, logit) if cps==1, atet gen(pstub)

* ATET using -psmatch2-
psmatch2 treat age agesq agecubed edusq edure74 education married nodegree re74 re75 u74 u75 black hispanic if cps==1, outcome(re78) logit




2.  My second question is regarding caliper matching.  I have been unsuccessful at estimating caliper matching for -teffects- but was able to do so for -psmatch2- for the same given caliper.  I only was successful when I increased the caliper to 0.1.  The code for that is below.


3.  I have a question regarding the interpretation in teffects overlap.  Am I correct that the propensity score is being estimated as the probability of being in the control group (as opposed to the treatment group)?  The caption in the default overlap graph makes it seem that way.  This seems like an innovation -- I have never seen anyone present the propensity score that way and was just curious why -teffects- does it.


sincerely,



Scott Cunningham
Associate Professor
Dept of Economics
Baylor University
http://business.baylor.edu/scott_cunningham



* CODE BEGIN
use ../data/nsw_dw.dta, replace

* CPS sample (15,992 obs) 
append using ../data/cps_controls.dta

encode data_id, gen(id)
gen 	nsw=1 if id==2
replace nsw=. if id!=2
gen 	cps=1 if id==1
replace cps=1 if treat==1
label variable cps "CPS sample"

* Covariates for DW(02) model
gen agesq= age*age
gen agecubed= age*age*age
gen edusq= education*education
gen u74=(re74==0)
gen u75=(re75==0)
gen edure74 = education*re74



* ATE can't be estimated
capture n teffects psmatch (re78) (treat age agesq agecubed edusq edure74 education married nodegree re74 re75 u74 u75 black hispanic, logit) if cps==1

* ATET can be estimated
teffects psmatch (re78) (treat age agesq agecubed edusq edure74 education married nodegree re74 re75 u74 u75 black hispanic, logit) if cps==1, atet gen(pstub)

* psmatch2 results for the Average treatment effect for the treatment group (here, ATT)
psmatch2 treat age agesq agecubed edusq edure74 education married nodegree re74 re75 u74 u75 black hispanic if cps==1, outcome(re78) logit


* Caliper matching (0.00001) with psmatch2
psmatch2 treat age agesq agecubed edusq edure74 education married nodegree re74 re75 u74 u75 black hispanic if cps==1, outcome(re78) caliper(0.00001) logit


* Caliper matching (0.00001) with teffects
capture n teffects psmatch (re78) (treat age agesq agecubed edusq edure74 education married nodegree re74 re75 u74 u75 black hispanic, logit) if cps==1, atet gen(cstub) caliper(0.00001) vce(iid)


* Caliper matching (0.0001) with teffects
capture n teffects psmatch (re78) (treat age agesq agecubed edusq edure74 education married nodegree re74 re75 u74 u75 black hispanic, logit) if cps==1, atet gen(cstub) caliper(0.0001) vce(iid)


* Caliper matching (0.001) with teffects
capture n teffects psmatch (re78) (treat age agesq agecubed edusq edure74 education married nodegree re74 re75 u74 u75 black hispanic, logit) if cps==1, atet gen(cstub) caliper(0.001) vce(iid)


* Caliper matching (0.01) with teffects
capture n teffects psmatch (re78) (treat age agesq agecubed edusq edure74 education married nodegree re74 re75 u74 u75 black hispanic, logit) if cps==1, atet gen(cstub) caliper(0.01) vce(iid)


* Caliper matching (0.1) with teffects
capture n teffects psmatch (re78) (treat age agesq agecubed edusq edure74 education married nodegree re74 re75 u74 u75 black hispanic, logit) if cps==1, atet gen(cstub) caliper(0.1) vce(iid)
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index