* STATA 7.0 * 30 April 2005 /* THIS PROGRAM PRODUCES THE TABLES FOR THE PAPER: EDUCATION, GROWTH AND INCOME INEQUALITY */ * Code continues in coen_thijs_tables4a.do clear capture log close pause on log using coen_thijs_tables4, replace text set matsize 800 set mem 10m set more off set rmsg on use coen_thijs_data_10 sort ctyid decade tsset ctyid decade *** Generate additional variables *** *** Definition variables, as suggested by Thijs (FOR VERSION 2A!!) *** tab incdefn tab incdefn, nolabel recode incdefn 2=1 5=3 6=4 tab incdefn, ge(incd) tab incsharu tab incsharu, nolabel recode incsharu 1=2 tab incsharu, ge(incs) tab uofanala, ge(unit) tab equivsc tab equivsc, nolabel recode equivsc 1/5=6 8=6 tab equivsc, ge(equiv) *** Old definition dummies: gen expend = incdefn==1 gen gross = incdefn==4 gen hh = uofanala==1 *** Other variables *** gen edu2=edu25^2 gen gdp=lrgdpw gen Vinc=vinc gen Vedu=vedu25 gen edu=edu25 gen Lpwt56=L.pwt56 foreach v of varlist edu edu2 Vedu Vinc gdp lkw incd? incs? unit? equiv? expend gross hh { gen L`v'=l.`v' } foreach v of varlist incd? incs? unit? equiv? { gen d`v'= d.`v' gen dL`v' = d.L`v' } gen edu_t = (year - 2000) * edu /* edu interacted with time trend */ gen Ledu_t = l.edu_t gen dLedu_t = d.Ledu_t *** DUMMIES FOR CHANGE IN THE DEFINITION OF GINI WITHIN A COUNTRY *** quiet tab ctyid, ge(cty) local ctys=r(r) disp `ctys' quiet tab year, ge(y) local ys=r(r) disp `ys' foreach v of varlist incdefn incsharu uofanala equivsc expend gross hh { sort ctyid decade quiet gen d`v'=0 quiet by ctyid: replace d`v'=1 if `v'~=`v'[_n-1] & `v' ~= . & `v'[_n-1] ~= . forvalues c=1(1)`ctys' { forvalues y=1(1)`ys' { quiet gen d`c'`y'`v' = d`v'*cty`c'*y`y' quiet sum d`c'`y'`v' if r(Var)==0 & (`c'~=1|`y'~=1) { drop d`c'`y'`v' } } } } *** DUMMIES FOR EACH CHANGE OF DATASET WITHIN A COUNTRY *** quiet tab ctyid local ctys=r(r) quiet tab year local ys=r(r) sort ctyid decade quiet gen dpwt56=0 quiet by ctyid: replace dpwt56=1 if pwt56~=pwt56[_n-1] & pwt56 ~= . & pwt56[_n-1] ~= . forvalues c=1(1)`ctys' { forvalues y=1(1)`ys' { quiet gen d`c'`y'pwt56 = dpwt56*cty`c'*y`y' quiet sum d`c'`y'pwt56 if r(Var)==0 { drop d`c'`y'pwt56 } } } drop dpwt56 cty1-cty`ctys' *** REGRESSIONS INCOME INEQUALITY: columns (1) to (7) *** reg Vinc edu edu2 Vedu D.edu D.edu2 D.Vedu Ledu Ledu2 LVedu LVinc D.Ledu D.Ledu2 D.LVedu D.LVinc yr70-yr90 outreg using tabIVrte, cti(junk) bdec(5) tdec(2) noast nolabel replace addstat(F edu,1,pval edu,2,SR RtE, 3, zstat, 4, LR RtE,5, zstat LR,6,F LR=SR,7,p LR=SR,8,NrCntrs,9) adec(2,2,5,2,5,2,2,2,0) reg Vinc edu Ledu LVinc incd? incs? unit? equiv? Lincd? Lincs? Lunit? Lequiv? yr70 yr80 yr90, robust test edu Ledu local F_edu = r(F) local p_edu = r(p) qui tab country if e(sample) local Nc = r(r) outreg using tabIVrte, cti(OLS(1)) bdec(5) tdec(2) noast nolabel append addstat(F edu,`F_edu',pval edu,`p_edu',NrCntries,`Nc') adec(2,2,0) reg Vinc edu Vedu Ledu LVedu LVinc incd? incs? unit? equiv? Lincd? Lincs? Lunit? Lequiv? yr70 yr80 yr90, robust test edu Ledu local F_edu = r(F) local p_edu = r(p) qui tab country if e(sample) local Nc = r(r) outreg using tabIVrte, append cti(OLS(2)) bdec(5) tdec(2) noast nolabel addstat(F edu,`F_edu',pval edu,`p_edu',NrCntries,`Nc') adec(2,2,0) /* * Test for autocorrelation residuals, controlling for fixed effects: xtregar Vinc edu edu2 Vedu Ledu Ledu2 LVedu LVinc incd? incs? unit? equiv? Lincd? Lincs? Lunit? Lequiv? yr70 yr80 yr90, re rhotype(reg) xtregar Vinc edu edu2 Vedu Ledu Ledu2 LVedu LVinc incd? incs? unit? equiv? Lincd? Lincs? Lunit? Lequiv? yr70 yr80 yr90, fe pause */ reg Vinc edu edu2 Vedu Ledu Ledu2 LVedu LVinc incd? incs? unit? equiv? Lincd? Lincs? Lunit? Lequiv? yr70 yr80 yr90, robust * Calculate `S' and `V' at sample averages gen byte IneqSample = e(sample) sum edu if IneqSample local S = r(mean) sum Vedu if IneqSample local V = r(mean) * calculate SR return to schooling (with t-stat): local SRrte = ( -_b[edu]/(2*sqrt(_b[edu2]*`V')) ) - ( sqrt(_b[edu2]/`V') ) *`S' di `SRrte' cap testnl ( (( -_b[edu]/(2*sqrt(_b[edu2]*`V')) ) - ( sqrt(_b[edu2]/`V') ) *`S') = 0 ) local SRz = sqrt( r(F) ) disp "Inequality sample: S = `S', V = `V'" pause * calculate LR return to schooling (with t-stat): local LRrte = (-((_b[edu]+_b[Ledu])/(1-_b[LVinc]))/(2*sqrt(((_b[edu2]+_b[Ledu2])/(1-_b[LVinc]))*`V')) ) - ( sqrt(_b[edu2]/`V') ) * `S' di `LRrte' cap testnl ( ((-((_b[edu]+_b[Ledu])/(1-_b[LVinc]))/(2*sqrt(((_b[edu2]+_b[Ledu2])/(1-_b[LVinc]))*`V')) ) - ( sqrt(_b[edu2]/`V') ) * `S') = 0 ) local LRz = sqrt( r(F) ) * test LR=SR and report F-stat and p-value: testnl ( (( -_b[edu]/(2*sqrt(_b[edu2]*`V')) ) - ( sqrt(_b[edu2]/`V') ) *`S') = ((-((_b[edu]+_b[Ledu])/(1-_b[LVinc]))/(2*sqrt(((_b[edu2]+_b[Ledu2])/(1-_b[LVinc]))*`V')) ) - ( sqrt(_b[edu2]/`V') ) * `S') ) local F_lrsr = r(F) local p_lrsr = 1-F(r(df),r(df_r),r(F)) if `SRrte'==. { local SRrte=99999 } if `SRz'==. { local SRz=99999 } if `LRrte'==. { local LRrte=99999 } if `LRz'==. { local LRz=99999 } disp "`SRrte' `SRz' `LRrte' `LRz'" test edu edu2 Ledu Ledu2 local F_edu = r(F) local p_edu = r(p) qui tab country if e(sample) local Nc = r(r) outreg using tabIVrte, append cti(OLS(3)) bdec(5) tdec(2) noast nolabel /* */ addstat(F edu,`F_edu',pval edu,`p_edu',SR RtE, `SRrte', zstat, `SRz', LR RtE,`LRrte', zstat LR, `LRz',F LR=SR,`F_lrsr',p LR=SR,`p_lrsr',NrCntries,`Nc') adec(2,2,5,2,5,2,2,2,0) reg Vinc edu edu2 Vedu Ledu Ledu2 LVedu LVinc incd? incs? unit? equiv? Lincd? Lincs? Lunit? Lequiv? yr70 yr80 yr90 [aweight = gdp], robust * calculate SR return to schooling (with t-stat): local SRrte = ( -_b[edu]/(2*sqrt(_b[edu2]*`V')) ) - ( sqrt(_b[edu2]/`V') ) *`S' di `SRrte' cap testnl ( (( -_b[edu]/(2*sqrt(_b[edu2]*`V')) ) - ( sqrt(_b[edu2]/`V') ) *`S') = 0 ) local SRz = sqrt( r(F) ) * calculate LR return to schooling (with t-stat): local LRrte = (-((_b[edu]+_b[Ledu])/(1-_b[LVinc]))/(2*sqrt(((_b[edu2]+_b[Ledu2])/(1-_b[LVinc]))*`V')) ) - ( sqrt(_b[edu2]/`V') ) * `S' di `LRrte' cap testnl ( ((-((_b[edu]+_b[Ledu])/(1-_b[LVinc]))/(2*sqrt(((_b[edu2]+_b[Ledu2])/(1-_b[LVinc]))*`V')) ) - ( sqrt(_b[edu2]/`V') ) * `S') = 0 ) local LRz = sqrt( r(F) ) * test LR=SR and report F-stat and p-value: testnl ( (( -_b[edu]/(2*sqrt(_b[edu2]*`V')) ) - ( sqrt(_b[edu2]/`V') ) *`S') = ((-((_b[edu]+_b[Ledu])/(1-_b[LVinc]))/(2*sqrt(((_b[edu2]+_b[Ledu2])/(1-_b[LVinc]))*`V')) ) - ( sqrt(_b[edu2]/`V') ) * `S') ) local F_lrsr = r(F) local p_lrsr = 1-F(r(df),r(df_r),r(F)) if `SRrte'==. { local SRrte=99999 } if `SRz'==. { local SRz=99999 } if `LRrte'==. { local LRrte=99999 } if `LRz'==. { local LRz=99999 } disp "`SRrte' `SRz' `LRrte' `LRz'" test edu edu2 Ledu Ledu2 local F_edu = r(F) local p_edu = r(p) qui tab country if e(sample) local Nc = r(r) outreg using tabIVrte, append cti(WLS(4)) bdec(5) tdec(2) noast nolabel /* */ addstat(F edu,`F_edu',pval edu,`p_edu',SR RtE, `SRrte', zstat, `SRz', LR RtE,`LRrte', zstat LR, `LRz',F LR=SR,`F_lrsr',p LR=SR,`p_lrsr',NrCntries,`Nc') adec(2,2,5,2,5,2,2,2,0) xtreg Vinc edu edu2 Vedu Ledu Ledu2 LVedu LVinc incd? incs? unit? equiv? Lincd? Lincs? Lunit? Lequiv? yr70 yr80 yr90, fe * calculate SR return to schooling (with t-stat): local SRrte = ( -_b[edu]/(2*sqrt(_b[edu2]*`V')) ) - ( sqrt(_b[edu2]/`V') ) *`S' di `SRrte' cap testnl ( (( -_b[edu]/(2*sqrt(_b[edu2]*`V')) ) - ( sqrt(_b[edu2]/`V') ) *`S') = 0 ) local SRz = sqrt( r(F) ) * calculate LR return to schooling (with t-stat): local LRrte = (-((_b[edu]+_b[Ledu])/(1-_b[LVinc]))/(2*sqrt(((_b[edu2]+_b[Ledu2])/(1-_b[LVinc]))*`V')) ) - ( sqrt(_b[edu2]/`V') ) * `S' di `LRrte' cap testnl ( ((-((_b[edu]+_b[Ledu])/(1-_b[LVinc]))/(2*sqrt(((_b[edu2]+_b[Ledu2])/(1-_b[LVinc]))*`V')) ) - ( sqrt(_b[edu2]/`V') ) * `S') = 0 ) local LRz = sqrt( r(F) ) * test LR=SR and report F-stat and p-value: testnl ( (( -_b[edu]/(2*sqrt(_b[edu2]*`V')) ) - ( sqrt(_b[edu2]/`V') ) *`S') = ((-((_b[edu]+_b[Ledu])/(1-_b[LVinc]))/(2*sqrt(((_b[edu2]+_b[Ledu2])/(1-_b[LVinc]))*`V')) ) - ( sqrt(_b[edu2]/`V') ) * `S') ) local F_lrsr = r(F) local p_lrsr = 1-F(r(df),r(df_r),r(F)) if `SRrte'==. { local SRrte=99999 } if `SRz'==. { local SRz=99999 } if `LRrte'==. { local LRrte=99999 } if `LRz'==. { local LRz=99999 } disp "`SRrte' `SRz' `LRrte' `LRz'" test edu edu2 Ledu Ledu2 local F_edu = r(F) local p_edu = r(p) qui tab country if e(sample) local Nc = r(r) outreg using tabIVrte, append cti(FE(3x)) bdec(5) tdec(2) noast nolabel /* */ addstat(F edu,`F_edu',pval edu,`p_edu',SR RtE, `SRrte', zstat, `SRz', LR RtE,`LRrte', zstat LR, `LRz',F LR=SR,`F_lrsr',p LR=SR,`p_lrsr',NrCntries,`Nc') adec(2,2,5,2,5,2,2,2,0) reg d.Vinc d.edu d.edu2 d.Vedu d.Ledu d.Ledu2 d.LVedu d.LVinc dincd? dincs? dunit? dequiv? dLincd? dLincs? dLunit? dLequiv? yr80 yr90, robust * calculate SR return to schooling (with t-stat): local SRrte = ( -_b[D1.edu]/(2*sqrt(_b[D1.edu2]*`V')) ) - ( sqrt(_b[D1.edu2]/`V') ) *`S' di `SRrte' cap testnl ( (( -_b[D1.edu]/(2*sqrt(_b[D1.edu2]*`V')) ) - ( sqrt(_b[D1.edu2]/`V') ) *`S') = 0 ) local SRz = sqrt( r(F) ) * calculate LR return to schooling (with t-stat): local LRrte = (-((_b[D1.edu]+_b[D1.Ledu])/(1-_b[D1.LVinc]))/(2*sqrt(((_b[D1.edu2]+_b[D1.Ledu2])/(1-_b[D1.LVinc]))*`V')) ) - ( sqrt(_b[D1.edu2]/`V') ) * `S' di `LRrte' cap testnl ( ((-((_b[D1.edu]+_b[D1.Ledu])/(1-_b[D1.LVinc]))/(2*sqrt(((_b[D1.edu2]+_b[D1.Ledu2])/(1-_b[D1.LVinc]))*`V')) ) - ( sqrt(_b[D1.edu2]/`V') ) * `S') = 0 ) local LRz = sqrt( r(F) ) * test LR=SR and report F-stat and p-value: cap testnl ( (( -_b[D1.edu]/(2*sqrt(_b[D1.edu2]*`V')) ) - ( sqrt(_b[D1.edu2]/`V') ) *`S') = ((-((_b[D1.edu]+_b[D1.Ledu])/(1-_b[D1.LVinc]))/(2*sqrt(((_b[D1.edu2]+_b[D1.Ledu2])/(1-_b[D1.LVinc]))*`V')) ) - ( sqrt(_b[D1.edu2]/`V') ) * `S') ) local F_lrsr = r(F) local p_lrsr = 1-F(r(df),r(df_r),r(F)) if `SRrte'==. { local SRrte=99999 } if `SRz'==. { local SRz=99999 } if `LRrte'==. { local LRrte=99999 } if `LRz'==. { local LRz=99999 } disp "`SRrte' `SRz' `LRrte' `LRz'" test d.edu d.edu2 d.Ledu d.Ledu2 local F_edu = r(F) local p_edu = r(p) qui tab country if e(sample) local Nc = r(r) outreg using tabIVrte, append cti(OLS-FD(5)) bdec(5) tdec(2) noast nolabel /* */ addstat(F edu,`F_edu',pval edu,`p_edu',SR RtE, `SRrte', zstat, `SRz', LR RtE,`LRrte', zstat LR, `LRz',F LR=SR,`F_lrsr',p LR=SR,`p_lrsr',NrCntries,`Nc') adec(2,2,5,2,5,2,2,2,0) /* Windmeijer finite sample bias correction (twostep robust) does not work. Two-step estimator gives weird results (positive coeff on edu) as well a warning message: Uncorrected two-step standard errors are unreliable. The robust se's of the 1 step estimates seem incredibly tight. So: letīs present the 1 step estimates with non-robust se's. */ xtabond2 Vinc edu edu2 Vedu Ledu Ledu2 LVedu LVinc incd? incs? unit? equiv? Lincd? Lincs? Lunit? Lequiv? yr70 yr80 yr90, robust small /* */ gmm(Vinc, lag(2 5)) iv(yr70 yr80 yr90) artests(2) h(2) gmm(edu edu2 Vedu incd? incs? unit? equiv?, lag(1 5)) pause /* COPY SARGAN & AR TESTS */ * calculate SR return to schooling (with t-stat): local SRrte = ( -_b[edu]/(2*sqrt(_b[edu2]*`V')) ) - ( sqrt(_b[edu2]/`V') ) *`S' di `SRrte' cap testnl ( (( -_b[edu]/(2*sqrt(_b[edu2]*`V')) ) - ( sqrt(_b[edu2]/`V') ) *`S') = 0 ) local SRz = sqrt( r(F) ) * calculate LR return to schooling (with t-stat): local LRrte = (-((_b[edu]+_b[Ledu])/(1-_b[LVinc]))/(2*sqrt(((_b[edu2]+_b[Ledu2])/(1-_b[LVinc]))*`V')) ) - ( sqrt(_b[edu2]/`V') ) * `S' di `LRrte' cap testnl ( ((-((_b[edu]+_b[Ledu])/(1-_b[LVinc]))/(2*sqrt(((_b[edu2]+_b[Ledu2])/(1-_b[LVinc]))*`V')) ) - ( sqrt(_b[edu2]/`V') ) * `S') = 0 ) local LRz = sqrt( r(F) ) testnl ( ( -_b[edu]/(2*sqrt(_b[edu2]*`V')) ) - ( sqrt(_b[edu2]/`V') ) *`S' = (-((_b[edu]+_b[Ledu])/(1-_b[LVinc]))/(2*sqrt(((_b[edu2]+_b[Ledu2])/(1-_b[LVinc]))*`V')) ) - ( sqrt(_b[edu2]/`V') ) * `S' ) local F_lrsr = r(F) local p_lrsr = 1-F(r(df),r(df_r),r(F)) if `SRrte'==. { local SRrte=99999 } if `SRz'==. { local SRz=99999 } if `LRrte'==. { local LRrte=99999 } if `LRz'==. { local LRz=99999 } disp "`SRrte' `SRz' `LRrte' `LRz'" test edu edu2 Ledu Ledu2 local F_edu = r(F) local p_edu = r(p) qui tab country if e(sample) local Nc = r(r) outreg using tabIVrte, append cti(BB) bdec(5) tdec(2) noast nolabel /* */ addstat(F edu,`F_edu',pval edu,`p_edu',SR RtE, `SRrte', zstat, `SRz', LR RtE,`LRrte', zstat LR, `LRz',F LR=SR,`F_lrsr',p LR=SR,`p_lrsr',NrCntries,`Nc') adec(2,2,5,2,5,2,2,2,0) *** Using the constructed dummy variables for changes in definitions (Atkinson-Brandolini critique): drop dincdefn dincsharu duofanala dequivsc xtabond2 Vinc edu edu2 Vedu Ledu Ledu2 LVedu LVinc d*incdefn d*incsharu d*uofanala d*equivsc yr70 yr80 yr90, robust small /* */ gmm(Vinc, lag(2 5)) iv(yr70 yr80 yr90) artests(2) h(2) gmm(edu edu2 Vedu incd? incs? unit? equiv?, lag(1 5)) pause /* COPY SARGAN & AR TESTS */ * calculate SR return to schooling (with t-stat): local SRrte = ( -_b[edu]/(2*sqrt(_b[edu2]*`V')) ) - ( sqrt(_b[edu2]/`V') ) *`S' di `SRrte' cap testnl ( (( -_b[edu]/(2*sqrt(_b[edu2]*`V')) ) - ( sqrt(_b[edu2]/`V') ) *`S') = 0 ) local SRz = sqrt( r(F) ) * calculate LR return to schooling (with t-stat): local LRrte = (-((_b[edu]+_b[Ledu])/(1-_b[LVinc]))/(2*sqrt(((_b[edu2]+_b[Ledu2])/(1-_b[LVinc]))*`V')) ) - ( sqrt(_b[edu2]/`V') ) * `S' di `LRrte' cap testnl ( ((-((_b[edu]+_b[Ledu])/(1-_b[LVinc]))/(2*sqrt(((_b[edu2]+_b[Ledu2])/(1-_b[LVinc]))*`V')) ) - ( sqrt(_b[edu2]/`V') ) * `S') = 0 ) local LRz = sqrt( r(F) ) testnl ( ( -_b[edu]/(2*sqrt(_b[edu2]*`V')) ) - ( sqrt(_b[edu2]/`V') ) *`S' = (-((_b[edu]+_b[Ledu])/(1-_b[LVinc]))/(2*sqrt(((_b[edu2]+_b[Ledu2])/(1-_b[LVinc]))*`V')) ) - ( sqrt(_b[edu2]/`V') ) * `S' ) local F_lrsr = r(F) local p_lrsr = 1-F(r(df),r(df_r),r(F)) if `SRrte'==. { local SRrte=99999 } if `SRz'==. { local SRz=99999 } if `LRrte'==. { local LRrte=99999 } if `LRz'==. { local LRz=99999 } disp "`SRrte' `SRz' `LRrte' `LRz'" test edu edu2 Ledu Ledu2 local F_edu = r(F) local p_edu = r(p) qui tab country if e(sample) local Nc = r(r) outreg using tabIVrte, append cti(Atk-Bra) bdec(5) tdec(2) noast nolabel /* */ addstat(F edu,`F_edu',pval edu,`p_edu',SR RtE, `SRrte', zstat, `SRz', LR RtE,`LRrte', zstat LR, `LRz',F LR=SR,`F_lrsr',p LR=SR,`p_lrsr',NrCntries,`Nc') adec(2,2,5,2,5,2,2,2,0) xtabond2 Vinc edu edu2 edu70 edu80 edu90 Vedu Ledu Ledu2 Ledu70 Ledu80 Ledu90 LVedu LVinc incd? incs? unit? equiv? Lincd? Lincs? Lunit? Lequiv? yr70 yr80 yr90, robust small /* */ gmm(Vinc, lag(2 5)) iv(yr70 yr80 yr90) artests(2) h(2) gmm(edu edu2 Vedu incd? incs? unit? equiv?, lag(1 5)) test edu70 edu80 edu90 Ledu70 Ledu80 Ledu90 pause /* COPY SARGAN & AR TESTS AND TEST INTERACTIONS */ * calculate SR return to schooling (with t-stat): local SRrte = ( -_b[edu]/(2*sqrt(_b[edu2]*`V')) ) - ( sqrt(_b[edu2]/`V') ) *`S' di `SRrte' cap testnl ( (( -_b[edu]/(2*sqrt(_b[edu2]*`V')) ) - ( sqrt(_b[edu2]/`V') ) *`S') = 0 ) local SRz = sqrt( r(F) ) * calculate LR return to schooling (with t-stat): local LRrte = (-((_b[edu]+_b[Ledu])/(1-_b[LVinc]))/(2*sqrt(((_b[edu2]+_b[Ledu2])/(1-_b[LVinc]))*`V')) ) - ( sqrt(_b[edu2]/`V') ) * `S' di `LRrte' cap testnl ( ((-((_b[edu]+_b[Ledu])/(1-_b[LVinc]))/(2*sqrt(((_b[edu2]+_b[Ledu2])/(1-_b[LVinc]))*`V')) ) - ( sqrt(_b[edu2]/`V') ) * `S') = 0 ) local LRz = sqrt( r(F) ) testnl ( ( -_b[edu]/(2*sqrt(_b[edu2]*`V')) ) - ( sqrt(_b[edu2]/`V') ) *`S' = (-((_b[edu]+_b[Ledu])/(1-_b[LVinc]))/(2*sqrt(((_b[edu2]+_b[Ledu2])/(1-_b[LVinc]))*`V')) ) - ( sqrt(_b[edu2]/`V') ) * `S' ) local F_lrsr = r(F) local p_lrsr = 1-F(r(df),r(df_r),r(F)) if `SRrte'==. { local SRrte=99999 } if `SRz'==. { local SRz=99999 } if `LRrte'==. { local LRrte=99999 } if `LRz'==. { local LRz=99999 } disp "`SRrte' `SRz' `LRrte' `LRz'" qui tab country if e(sample) local Nc = r(r) test edu edu2 edu70 edu80 edu90 Ledu Ledu2 Ledu70 Ledu80 Ledu90 local F_edu = r(F) local p_edu = r(p) test edu70 edu80 edu90 Ledu70 Ledu80 Ledu90 outreg using tabIVrte, append cti(BB w/int) bdec(5) tdec(2) noast nolabel /* */ addstat(F edu,`F_edu',pval edu,`p_edu',SR RtE, `SRrte', zstat, `SRz', LR RtE,`LRrte', zstat LR, `LRz',F LR=SR,`F_lrsr',p LR=SR,`p_lrsr',NrCntries,`Nc') adec(2,2,5,2,5,2,2,2,0) * do tables_ineq_static *** REGRESSIONS GDP Equation: columns (1) to (7) *** *** Without interaction terms for exog skill biased technological progress (final version): *** Also tried with trend or dummies interacted with education (exog SBTP) reg gdp edu edu2 lkw D.edu D.edu2 pwt56 Lpwt56 d*pwt56 Ledu Ledu2 Llkw Lgdp D.Ledu D.Ledu2 D.Lgdp yr70-yr90 outreg using tabGDP, cti(junk) bdec(5) tdec(2) noast nolabel replace addstat(F edu, 1, pval edu, 2, SR RtE, 3, zstat, 4, LR RtE, 5, zstat LR, 6,F LR=SR,7,p LR=SR,8,NrCntries,9) adec(2,2,5,2,5,2,2,2,0) reg gdp edu pwt56 Lpwt56 d*pwt56 Ledu Lgdp yr70 yr80 yr90, robust * Calculate `S' and `V' at sample average gen byte GDPSample = e(sample) sum edu if GDPSample local S = r(mean) sum Vedu if GDPSample local V = r(mean) disp "GDP sample: S = `S', V = `V'" pause * calculate SR return to schooling (with t-stat): local SRrte = _b[edu] testnl ( _b[edu] = 0 ) local SRz = sqrt( r(F) ) * calculate LR return to schooling (with t-stat): local LRrte = (_b[edu]+_b[Ledu])/(1-_b[Lgdp]) testnl ( (_b[edu]+_b[Ledu])/(1-_b[Lgdp]) = 0) local LRz = sqrt( r(F) ) testnl ( (_b[edu]+_b[Ledu])/(1-_b[Lgdp]) = _b[edu] ) local F_lrsr = r(F) local p_lrsr = 1-F(r(df),r(df_r),r(F)) if `SRrte'==. { local SRrte=99999 } if `SRz'==. { local SRz=99999 } if `LRrte'==. { local LRrte=99999 } if `LRz'==. { local LRz=99999 } disp "`SRrte' `SRz' `LRrte' `LRz'" qui tab country if e(sample) local Nc = r(r) outreg using tabGDP, cti(OLS(1)) bdec(5) tdec(2) noast nolabel append /* */ addstat(SR RtE, `SRrte', zstat, `SRz', LR RtE, `LRrte', zstat LR, `LRz',F LR=SR,`F_lrsr',p LR=SR,`p_lrsr',NrCntries,`Nc') adec(5,2,5,2,2,2,0) reg gdp edu edu2 pwt56 Lpwt56 d*pwt56 Ledu Ledu2 Lgdp yr70 yr80 yr90, robust * calculate SR return to schooling (with t-stat): local SRrte = _b[edu] + 2 * _b[edu2] * `S' testnl ( _b[edu] + 2 * _b[edu2] * `S' = 0 ) local SRz = sqrt( r(F) ) * calculate LR return to schooling (with t-stat): local LRrte = (_b[edu]+_b[Ledu])/(1-_b[Lgdp]) + ( 2* (_b[edu2]+_b[Ledu2]) * `S')/(1-_b[Lgdp]) testnl ( (_b[edu]+_b[Ledu])/(1-_b[Lgdp]) + ( 2 * (_b[edu2]+_b[Ledu2]) * `S' )/(1-_b[Lgdp]) = 0) local LRz = sqrt( r(F) ) testnl ( (_b[edu]+_b[Ledu])/(1-_b[Lgdp]) + ( 2* (_b[edu2]+_b[Ledu2]) * `S')/(1-_b[Lgdp]) = _b[edu] + 2 * _b[edu2] * `S' ) local F_lrsr = r(F) local p_lrsr = 1-F(r(df),r(df_r),r(F)) if `SRrte'==. { local SRrte=99999 } if `SRz'==. { local SRz=99999 } if `LRrte'==. { local LRrte=99999 } if `LRz'==. { local LRz=99999 } disp "`SRrte' `SRz' `LRrte' `LRz'" test edu2 Ledu2 local F_edu = r(F) local p_edu = r(p) qui tab country if e(sample) local Nc = r(r) outreg using tabGDP, append cti(OLS(2)) bdec(5) tdec(2) noast nolabel /* */ addstat(F edu,`F_edu',pval edu,`p_edu',SR RtE, `SRrte', zstat, `SRz', LR RtE, `LRrte', zstat LR, `LRz',F LR=SR,`F_lrsr',p LR=SR,`p_lrsr',NrCntries,`Nc') adec(2,2,5,2,5,2,2,2,0) reg gdp edu edu2 pwt56 Lpwt56 d*pwt56 Ledu Ledu2 Lgdp yr70 yr80 yr90 [aweight = gdp], robust * calculate SR return to schooling (with t-stat): local SRrte = _b[edu] + 2 * _b[edu2] * `S' testnl ( _b[edu] + 2 * _b[edu2] * `S' = 0 ) local SRz = sqrt( r(F) ) * calculate LR return to schooling (with t-stat): local LRrte = (_b[edu]+_b[Ledu])/(1-_b[Lgdp]) + ( 2* (_b[edu2]+_b[Ledu2]) * `S')/(1-_b[Lgdp]) testnl ( (_b[edu]+_b[Ledu])/(1-_b[Lgdp]) + ( 2 * (_b[edu2]+_b[Ledu2]) * `S' )/(1-_b[Lgdp]) = 0) local LRz = sqrt( r(F) ) testnl ( (_b[edu]+_b[Ledu])/(1-_b[Lgdp]) + ( 2* (_b[edu2]+_b[Ledu2]) * `S')/(1-_b[Lgdp]) = _b[edu] + 2 * _b[edu2] * `S' ) local F_lrsr = r(F) local p_lrsr = 1-F(r(df),r(df_r),r(F)) if `SRrte'==. { local SRrte=99999 } if `SRz'==. { local SRz=99999 } if `LRrte'==. { local LRrte=99999 } if `LRz'==. { local LRz=99999 } disp "`SRrte' `SRz' `LRrte' `LRz'" test edu2 Ledu2 local F_edu = r(F) local p_edu = r(p) qui tab country if e(sample) local Nc = r(r) outreg using tabGDP, append cti(WLS(3)) bdec(5) tdec(2) noast nolabel /* */ addstat(F edu,`F_edu',pval edu,`p_edu',SR RtE, `SRrte', zstat, `SRz', LR RtE, `LRrte', zstat LR, `LRz',F LR=SR,`F_lrsr',p LR=SR,`p_lrsr',NrCntries,`Nc') adec(2,2,5,2,5,2,2,2,0) reg gdp edu edu2 lkw pwt56 Lpwt56 d*pwt56 Ledu Ledu2 Llkw Lgdp yr70 yr80 yr90, robust * calculate SR return to schooling (with t-stat): local SRrte = _b[edu] + 2 * _b[edu2] * `S' testnl ( _b[edu] + 2 * _b[edu2] * `S' = 0 ) local SRz = sqrt( r(F) ) * calculate LR return to schooling (with t-stat): local LRrte = (_b[edu]+_b[Ledu])/(1-_b[Lgdp]) + ( 2* (_b[edu2]+_b[Ledu2]) * `S')/(1-_b[Lgdp]) testnl ( (_b[edu]+_b[Ledu])/(1-_b[Lgdp]) + ( 2 * (_b[edu2]+_b[Ledu2]) * `S' )/(1-_b[Lgdp]) = 0) local LRz = sqrt( r(F) ) testnl ( (_b[edu]+_b[Ledu])/(1-_b[Lgdp]) + ( 2* (_b[edu2]+_b[Ledu2]) * `S')/(1-_b[Lgdp]) = _b[edu] + 2 * _b[edu2] * `S' ) local F_lrsr = r(F) local p_lrsr = 1-F(r(df),r(df_r),r(F)) if `SRrte'==. { local SRrte=99999 } if `SRz'==. { local SRz=99999 } if `LRrte'==. { local LRrte=99999 } if `LRz'==. { local LRz=99999 } disp "`SRrte' `SRz' `LRrte' `LRz'" test edu2 Ledu2 local F_edu = r(F) local p_edu = r(p) qui tab country if e(sample) local Nc = r(r) outreg using tabGDP, append cti(OLS+K(4)) bdec(5) tdec(2) noast nolabel /* */ addstat(F edu,`F_edu',pval edu,`p_edu',SR RtE, `SRrte', zstat, `SRz', LR RtE, `LRrte', zstat LR, `LRz',F LR=SR,`F_lrsr',p LR=SR,`p_lrsr',NrCntries,`Nc') adec(2,2,5,2,5,2,2,2,0) reg d.gdp d.edu d.edu2 pwt56 Lpwt56 d*pwt56 d.Ledu d.Ledu2 d.Lgdp yr80 yr90, robust * calculate SR return to schooling (with t-stat): local SRrte = _b[D1.edu] + 2 * _b[D1.edu2] * `S' testnl ( _b[D1.edu] + 2 * _b[D1.edu2] * `S' = 0 ) local SRz = sqrt( r(F) ) * calculate LR return to schooling (with t-stat): local LRrte = (_b[D1.edu]+_b[D1.Ledu])/(1-_b[D1.Lgdp]) + ( 2* (_b[D1.edu2]+_b[D1.Ledu2]) * `S')/(1-_b[D1.Lgdp]) testnl ( (_b[D1.edu]+_b[D1.Ledu])/(1-_b[D1.Lgdp]) + ( 2 * (_b[D1.edu2]+_b[D1.Ledu2]) * `S' )/(1-_b[D1.Lgdp]) = 0) local LRz = sqrt( r(F) ) testnl ( (_b[D1.edu]+_b[D1.Ledu])/(1-_b[D1.Lgdp]) + ( 2* (_b[D1.edu2]+_b[D1.Ledu2]) * `S')/(1-_b[D1.Lgdp]) = _b[D1.edu] + 2 * _b[D1.edu2] * `S' ) local F_lrsr = r(F) local p_lrsr = 1-F(r(df),r(df_r),r(F)) if `SRrte'==. { local SRrte=99999 } if `SRz'==. { local SRz=99999 } if `LRrte'==. { local LRrte=99999 } if `LRz'==. { local LRz=99999 } disp "`SRrte' `SRz' `LRrte' `LRz'" test d.edu2 d.Ledu2 local F_edu = r(F) local p_edu = r(p) qui tab country if e(sample) local Nc = r(r) outreg using tabGDP, append cti(OLS-FD(5)) bdec(5) tdec(2) noast nolabel /* */ addstat(F edu,`F_edu',pval edu,`p_edu',SR RtE, `SRrte', zstat, `SRz', LR RtE, `LRrte', zstat LR, `LRz',F LR=SR,`F_lrsr',p LR=SR,`p_lrsr',NrCntries,`Nc') adec(2,2,5,2,5,2,2,2,0) xtabond2 gdp edu edu2 pwt56 Lpwt56 d*pwt56 Ledu Ledu2 Lgdp yr70 yr80 yr90, robust small /* */ gmm(gdp, lag(2 5)) iv(yr70 yr80 yr90) artests(2) h(2) gmm(edu edu2, lag(1 5)) stop pause /* COPY SARGAN & AR TESTS */ * calculate SR return to schooling (with t-stat): local SRrte = _b[edu] + 2 * _b[edu2] * `S' testnl ( _b[edu] + 2 * _b[edu2] * `S' = 0 ) local SRz = sqrt( r(F) ) * calculate LR return to schooling (with t-stat): local LRrte = (_b[edu]+_b[Ledu])/(1-_b[Lgdp]) + ( 2* (_b[edu2]+_b[Ledu2]) * `S')/(1-_b[Lgdp]) testnl ( (_b[edu]+_b[Ledu])/(1-_b[Lgdp]) + ( 2 * (_b[edu2]+_b[Ledu2]) * `S' )/(1-_b[Lgdp]) = 0) local LRz = sqrt( r(F) ) testnl ( (_b[edu]+_b[Ledu])/(1-_b[Lgdp]) + ( 2 * (_b[edu2]+_b[Ledu2]) * `S' )/(1-_b[Lgdp]) = _b[edu] + 2 * _b[edu2] * `S' ) local F_lrsr = r(F) local p_lrsr = 1-F(r(df),r(df_r),r(F)) if `SRrte'==. { local SRrte=99999 } if `SRz'==. { local SRz=99999 } if `LRrte'==. { local LRrte=99999 } if `LRz'==. { local LRz=99999 } disp "`SRrte' `SRz' `LRrte' `LRz'" test edu2 Ledu2 local F_edu = r(F) local p_edu = r(p) qui tab country if e(sample) local Nc = r(r) outreg using tabGDP, append cti(BB(6)) bdec(5) tdec(2) noast nolabel /* */ addstat(F edu,`F_edu',pval edu,`p_edu',SR RtE, `SRrte', zstat, `SRz', LR RtE, `LRrte', zstat LR, `LRz',F LR=SR,`F_lrsr',p LR=SR,`p_lrsr',NrCntries,`Nc') adec(2,2,5,2,5,2,2,2,0) xtabond2 gdp edu edu2 pwt56 Lpwt56 d*pwt56 Ledu Ledu2 Lgdp yr70 yr80 yr90, robust small /* */ gmm(gdp, lag(2 5)) iv(yr70 yr80 yr90) artests(2) h(2) gmm(edu edu2, lag(1 5)), /* */ if IneqSample pause /* COPY SARGAN & AR TESTS */ * calculate SR return to schooling (with t-stat): local SRrte = _b[edu] + 2 * _b[edu2] * `S' testnl ( _b[edu] + 2 * _b[edu2] * `S' = 0 ) local SRz = sqrt( r(F) ) * calculate LR return to schooling (with t-stat): local LRrte = (_b[edu]+_b[Ledu])/(1-_b[Lgdp]) + ( 2* (_b[edu2]+_b[Ledu2]) * `S')/(1-_b[Lgdp]) testnl ( (_b[edu]+_b[Ledu])/(1-_b[Lgdp]) + ( 2 * (_b[edu2]+_b[Ledu2]) * `S' )/(1-_b[Lgdp]) = 0) local LRz = sqrt( r(F) ) testnl ( (_b[edu]+_b[Ledu])/(1-_b[Lgdp]) + ( 2 * (_b[edu2]+_b[Ledu2]) * `S' )/(1-_b[Lgdp]) = _b[edu] + 2 * _b[edu2] * `S' ) local F_lrsr = r(F) local p_lrsr = 1-F(r(df),r(df_r),r(F)) if `SRrte'==. { local SRrte=99999 } if `SRz'==. { local SRz=99999 } if `LRrte'==. { local LRrte=99999 } if `LRz'==. { local LRz=99999 } disp "`SRrte' `SRz' `LRrte' `LRz'" test edu2 Ledu2 local F_edu = r(F) local p_edu = r(p) qui tab country if e(sample) local Nc = r(r) outreg using tabGDP, append cti(BB(6x)) bdec(5) tdec(2) noast nolabel /* */ addstat(F edu,`F_edu',pval edu,`p_edu',SR RtE, `SRrte', zstat, `SRz', LR RtE, `LRrte', zstat LR, `LRz',F LR=SR,`F_lrsr',p LR=SR,`p_lrsr',NrCntries,`Nc') adec(2,2,5,2,5,2,2,2,0) xtabond2 gdp edu edu2 edu70 edu80 edu90 pwt56 Lpwt56 d*pwt56 Ledu Ledu2 Ledu70 Ledu80 Ledu90 Lgdp yr70 yr80 yr90, robust small /* */ gmm(gdp, lag(2 5)) iv(yr70 yr80 yr90) artests(2) h(2) gmm(edu edu2, lag(1 5)) test edu70 edu80 edu90 Ledu70 Ledu80 Ledu90 test edu70 edu80 edu90 test Ledu70 Ledu80 Ledu90 pause /* COPY SARGAN & AR TESTS AND JOINT SIGNIF INTERACTION TERMS */ * calculate SR return to schooling (with t-stat): local SRrte = _b[edu] + 2 * _b[edu2] * `S' testnl ( _b[edu] + 2 * _b[edu2] * `S' = 0 ) local SRz = sqrt( r(F) ) * calculate LR return to schooling (with t-stat): local LRrte = (_b[edu]+_b[Ledu])/(1-_b[Lgdp]) + ( 2* (_b[edu2]+_b[Ledu2]) * `S')/(1-_b[Lgdp]) testnl ( (_b[edu]+_b[Ledu])/(1-_b[Lgdp]) + ( 2 * (_b[edu2]+_b[Ledu2]) * `S' )/(1-_b[Lgdp]) = 0) local LRz = sqrt( r(F) ) testnl ( (_b[edu]+_b[Ledu])/(1-_b[Lgdp]) + ( 2 * (_b[edu2]+_b[Ledu2]) * `S' )/(1-_b[Lgdp]) = _b[edu] + 2 * _b[edu2] * `S' ) local F_lrsr = r(F) local p_lrsr = 1-F(r(df),r(df_r),r(F)) if `SRrte'==. { local SRrte=99999 } if `SRz'==. { local SRz=99999 } if `LRrte'==. { local LRrte=99999 } if `LRz'==. { local LRz=99999 } disp "`SRrte' `SRz' `LRrte' `LRz'" test edu2 edu70 edu80 edu90 Ledu2 Ledu70 Ledu80 Ledu90 local F_edu = r(F) local p_edu = r(p) qui tab country if e(sample) local Nc = r(r) outreg using tabGDP, append cti(BB(w/interact)) bdec(5) tdec(2) noast nolabel /* */ addstat(F edu,`F_edu',pval edu,`p_edu',SR RtE, `SRrte', zstat, `SRz', LR RtE, `LRrte', zstat LR, `LRz',F LR=SR,`F_lrsr',p LR=SR,`p_lrsr',NrCntries,`Nc') adec(2,2,5,2,5,2,2,2,0) xtabond2 gdp edu edu2 edu70 edu80 edu90 pwt56 Lpwt56 d*pwt56 Ledu Ledu2 Ledu70 Ledu80 Ledu90 Lgdp yr70 yr80 yr90, robust small /* */ gmm(gdp, lag(2 5)) iv(yr70 yr80 yr90) artests(2) h(2) gmm(edu edu2, lag(1 5)), /* */ if IneqSample test edu70 edu80 edu90 Ledu70 Ledu80 Ledu90 test edu70 edu80 edu90 test Ledu70 Ledu80 Ledu90 pause /* COPY SARGAN & AR TESTS AND JOINT SIGNIF INTERACTION TERMS */ * calculate SR return to schooling (with t-stat): local SRrte = _b[edu] + 2 * _b[edu2] * `S' testnl ( _b[edu] + 2 * _b[edu2] * `S' = 0 ) local SRz = sqrt( r(F) ) * calculate LR return to schooling (with t-stat): local LRrte = (_b[edu]+_b[Ledu])/(1-_b[Lgdp]) + ( 2* (_b[edu2]+_b[Ledu2]) * `S')/(1-_b[Lgdp]) testnl ( (_b[edu]+_b[Ledu])/(1-_b[Lgdp]) + ( 2 * (_b[edu2]+_b[Ledu2]) * `S' )/(1-_b[Lgdp]) = 0) local LRz = sqrt( r(F) ) testnl ( (_b[edu]+_b[Ledu])/(1-_b[Lgdp]) + ( 2 * (_b[edu2]+_b[Ledu2]) * `S' )/(1-_b[Lgdp]) = _b[edu] + 2 * _b[edu2] * `S' ) local F_lrsr = r(F) local p_lrsr = 1-F(r(df),r(df_r),r(F)) if `SRrte'==. { local SRrte=99999 } if `SRz'==. { local SRz=99999 } if `LRrte'==. { local LRrte=99999 } if `LRz'==. { local LRz=99999 } disp "`SRrte' `SRz' `LRrte' `LRz'" test edu2 edu70 edu80 edu90 Ledu2 Ledu70 Ledu80 Ledu90 local F_edu = r(F) local p_edu = r(p) qui tab country if e(sample) local Nc = r(r) outreg using tabGDP, append cti(BB(w/interact)) bdec(5) tdec(2) noast nolabel /* */ addstat(F edu,`F_edu',pval edu,`p_edu',SR RtE, `SRrte', zstat, `SRz', LR RtE, `LRrte', zstat LR, `LRz',F LR=SR,`F_lrsr',p LR=SR,`p_lrsr',NrCntries,`Nc') adec(2,2,5,2,5,2,2,2,0) log close *** SUMMARY STATISTICS *** log using summstats, text replace tabstat lrgdpw dlrgdpw vinc dvinc edu25 dedu25 vedu25 dvedu25, s(mean sd count) by(year) longstub save tabstat lrgdpw dlrgdpw vinc dvinc edu25 dedu25 vedu25 dvedu25, s(mean sd count) by(year) longstub save, if GDPSample tabstat lrgdpw dlrgdpw vinc dvinc edu25 dedu25 vedu25 dvedu25, s(mean sd count) by(year) longstub save, if IneqSample log close *do coen_thijs_tables4ia *do coen_thijs_tables4a