Skip to content

Commit

Permalink
More tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
scunning1975 committed Jan 12, 2023
1 parent fa6b97c commit db4e44a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
Binary file modified training_approximate.dta
Binary file not shown.
Binary file modified training_approximate.xlsx
Binary file not shown.
26 changes: 24 additions & 2 deletions training_biasadj.do
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,38 @@ capture log close
use https://github.com/scunning1975/mixtape/raw/master/training_biasadj.dta, clear

* First estimate a regression model of earnings onto gpa and age using only the control group

gen id = _n
sort id
bysort treat: gen match=_n
sort id



forvalues i = 1(2)9 {
replace match = 0 if match == `i'
}

forvalues i = 2(2)10 {
replace match = 1 if match == `i'
}




reg earnings gpa age if treat==0, nocons

bysort treat: gen matched=_n
sort id
drop id

* Second predict mu(0) for D=1 and D=0 using the predict command
predict mu

* reshape the data
reshape wide unit age gpa earnings mu, i(matched) j(treat)
gen age= age1-age0
gen gpa = gpa1-gpa0
gen att = (earnings1 - earnings0)
gen atti = (earnings1 - earnings0) - (mu1-mu0)
collapse (mean) atti att
collapse (mean) atti att age gpa
list

0 comments on commit db4e44a

Please sign in to comment.