****************************************************************************
* DataColada[27] Stata Code to run poisson regression with two slopes on *
* data by Aghion et al. *
* Written by Uri Simonsohn (uws@wharton.upenn.edu) *
* August, 2014 *
****************************************************************************
* PAPER:
* Aghion, Philippe, Nick Bloom, Richard Blundell, Rachel Griffith and Peter Howitt
* "Competition and innovation: an inverted U relationship"
* Quarterly Journal of Economics May 2005, Vol. 120, No. 2, pp. 701-728
* I obtained the raw data from Nicholas Bloom's website
* http://web.stanford.edu/~nbloom/index_files/Page315.htm
*Made backup on our server, load it directly into STATA
use "http://opim.wharton.upenn.edu/~uws/BlogAppendix/Colada27/abbgh_data.dta",clear
*Find maximum point using Quadratic
**** Run quadratic poisson regression with year and industry fixed effects
**I am here borrowing from their posted STATA code, see link above to get it
* (Col (2) Table I, and Figure II)
*Regression
poisson patcw Lc Lc_2 yr* iii*
*NOTE:
*yr* are year fixed effects
*iii* are industry fixed effects
*The results are
*b1=387.46
*b2=-204.549
*xmax=-b1/2b2=.949
*Generate variables to allow two slopes
gen x=Lc
gen xlow=x-.949
replace xlow=0 if x>.949
gen xhigh=x-.949
replace xhigh=0 if x<.949
gen high=0
replace high=1 if x>.949
*Run regression (poisson) with two slopes and covariates
poisson patcw xlow xhigh high yr* iii*