Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
mixtape/Do/nsw_pscore.do
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
28 lines (24 sloc)
945 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Reload experimental group data | |
use https://github.com/scunning1975/mixtape/raw/master/nsw_mixtape.dta, clear | |
drop if treat==0 | |
* Now merge in the CPS controls from footnote 2 of Table 2 (Dehejia and Wahba 2002) | |
append using https://github.com/scunning1975/mixtape/raw/master/cps_mixtape.dta | |
gen agesq=age*age | |
gen agecube=age*age*age | |
gen edusq=educ*edu | |
gen u74 = 0 if re74!=. | |
replace u74 = 1 if re74==0 | |
gen u75 = 0 if re75!=. | |
replace u75 = 1 if re75==0 | |
gen interaction1 = educ*re74 | |
gen re74sq=re74^2 | |
gen re75sq=re75^2 | |
gen interaction2 = u74*hisp | |
* Now estimate the propensity score | |
logit treat age agesq agecube educ edusq marr nodegree black hisp re74 re75 u74 u75 interaction1 | |
predict pscore | |
* Checking mean propensity scores for treatment and control groups | |
su pscore if treat==1, detail | |
su pscore if treat==0, detail | |
* Now look at the propensity score distribution for treatment and control groups | |
histogram pscore, by(treat) binrescale |