Skip to content

Instantly share code, notes, and snippets.

@lukestein
Last active February 17, 2019 19:38
Stata code for creating Table 6 from Lindsey and Stein (2019 WP)
/*
* Code for Table 6 of
* http://lukestein.com/research/lindsey-stein-angelsentrepreneurship.pdf
* per https://twitter.com/lukestein/status/1050819002790887424
*/
eststo clear
eststo: areg empend_normsqi after##c.frac lnpop lnpercap lnvc chHPI i.yq i.industry [weight=pa] if ${SAMPLEIF} & age_buckets == 1, absorb(state) cluster(state)
eststo: areg empend_normsqi lowsectorvc##after##c.frac lnpop lnpercap lnvc chHPI i.yq i.industry [weight=pa] if ${SAMPLEIF} & age_buckets == 1, absorb(state) cluster(state)
test 1.after#c.frac + 1.lowsectorvc#1.after#c.frac = 0
estadd scalar sum_afterfrac_p = r(p)
eststo: areg empend_normsqi empconc50##after##c.frac lnpop lnpercap lnvc chHPI i.yq i.industry [weight=pa] if ${SAMPLEIF} & age_buckets == 1, absorb(state) cluster(state)
test 1.after#c.frac + 1.empconc50#1.after#c.frac = 0
estadd scalar sum_afterfrac_p = r(p)
eststo: areg empend_normsqi highcap##after##c.frac lnpop lnpercap lnvc chHPI i.yq i.industry [weight=pa] if ${SAMPLEIF} & age_buckets == 1, absorb(state) cluster(state)
test 1.after#c.frac + 1.highcap#1.after#c.frac = 0
estadd scalar sum_afterfrac_p = r(p)
esttab using "${OUTPATH}emp_entrants_industry", ///
nomtitles booktabs replace ///
order(1.after#c.frac ///
1.lowsectorvc#1.after 1.lowsectorvc#c.frac 1.lowsectorvc#1.after#c.frac ///
1.empconc50#1.after 1.empconc50#c.frac 1.empconc50#1.after#c.frac ///
1.highcap#1.after 1.highcap#c.frac 1.highcap#1.after#c.frac ///
lnpop lnpercap lnvc chHPI) ///
drop(frac 1.after 1.empconc50 1.lowsectorvc 1.highcap) ///
indicate("Annual state-level controls = lnpop lnpercap lnvc chHPI" "State FE = _cons" "Quarterly FE = *.yq" "Industry FE = *.industry", labels("\checkmark" "")) ///
stats(N sum_afterfrac_p, labels("Observations" "\$p\$-val: \$\beta_{\text{Aft}\times\text{Frac}} + \beta_{\text{\ldots industry}\times\text{Aft}\times\text{Frac}} = 0 \$")) ///
label nobaselevels interaction("\$\times\$") substitute("=1" "") nonotes se star(* 0.10 ** 0.05 *** 0.01)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment