Appendix. Stata Codes I. Stata Codes for Analysis of Raw-Scale Income Data: d0.dta is a stata system file prepared for the analysis. Step 1. Goodness of fit * q0.do * a full model * raw scale regression * OLS * 19 quantiles tempfile t use d0 global X age age2 blk hsp asn scl hsg nhs mh fh sg ot rural * centering sum $X tokenize $X while "`1'"~="" { egen m=mean(`1') replace `1'=`1'-m drop m macro shift } sum $X forvalues k=1/2 { reg cinc $X if year==`k' } forvalues i=1/19 { local j=`i'/20 qreg cinc $X if year==1, q(`j') nolog } forvalues i=1/19 { local j=`i'/20 qreg cinc $X if year==2, q(`j') nolog } Step 2. Simultaneous quantile regressions with 500 replicates * s0.do * full model * sreq 19 quaniles * raw scale $1000 * 2001 only tempfile t set matsize 400 global X age age2 blk hsp asn scl hsg nhs mh fh sg ot rural forvalues j=2/2 { use cinc $X year if year==`j' using d0, clear drop year replace cinc=cinc/1000 * centering sum $X tokenize $X while "`1'"~="" { egen m=mean(`1') replace `1'=`1'-m drop m macro shift } sum $X sqreg cinc $X, reps(500) q(.05 .10 .15 .20 .25 .30 .35 .40 .45 .50 .55 .60 .65 .70 .75 .80 .85 .90 .95) outreg using s0`j', nolabel bdec(3) coefast se replace mstore b`j', from(e(b)) mstore v`j', from(e(V)) keep age keep if _n<11 save s0`j', replace } Step 3. Use results from s0.do to create tables and graphs * s_m0.do 1/06 * matrix operation * 13 covariates + cons * graphs for beta's (19 QR) * 500 bootstrap se * 2001 only set matsize 400 * 13 covariate + cons local k=14 * 19 quantiles times k local k1=`k'*19 forvalues m=2/2 { use s0`m', clear qui mstore b`m' qui mstore v`m' mat ren b`m' b mat ren v`m' v * 95%ci * dimension `k' x 1 mat vv=vecdiag(v) mat vv=vv' svmat vv mat drop vv qui replace vv1=sqrt(vv1) mkmat vv1 if _n<=`k1', mat(v) drop vv1 mat b=b' mat l=b-1.96*v mat u=b+1.96*v * 19 quantiles mat q=(.05\.10\.15\.20\.25\.30\.35\.40\.45\.50\.55\.60\.65\.70\.75\.80\.85\.90\.95) * reorganize matrix by variable forvalues j=1/`k' { forvalues i=1/19 { local l=`k'*(`i'-1)+`j' mat x`j'q`i'=q[`i',1],b[`l',1],l[`l',1],u[`l',1],v[`l',1] } } forvalues j=1/`k' { mat x`j'=x`j'q1 forvalues i=2/19 { mat x`j'=x`j'\x`j'q`i' } * q b l u v mat list x`j', format(%8.3f) svmat x`j' mat a1=x`j'[1...,2] mat a2=x`j'[1...,5] mat xx`j'=q,a1,a2 * q b v mat list xx`j', format(%8.3f) mat drop a1 a2 xx`j' } * graphs using the same scale for a concept * age forvalues j=1/1 { line x`j'2 x`j'1 || line x`j'3 x`j'1 || line x`j'4 x`j'1, ylabel(0(1)3) ytitle(income $1000) xlabel(0(.1)1) xtitle(p) legend(off) graph export x`m'`j'.ps, as(ps) logo(off) tmargin(0) lmargin(0) replace } * age2 forvalues j=2/2 { line x`j'2 x`j'1 || line x`j'3 x`j'1 || line x`j'4 x`j'1, ylabel(-.03(.01)0) ytitle(income $1000) xlabel(0(.1)1) xtitle(p) legend(off) graph export x`m'`j'.ps, as(ps) logo(off) tmargin(0) lmargin(0) replace } * eth forvalues j=3/5 { line x`j'2 x`j'1 || line x`j'3 x`j'1 || line x`j'4 x`j'1, ylabel(-20(5)25) ytitle(income $1000) xlabel(0(.1)1) xtitle(p) legend(off) graph export x`m'`j'.ps, as(ps) logo(off) tmargin(0) lmargin(0) replace } * ced forvalues j=6/8 { line x`j'2 x`j'1 || line x`j'3 x`j'1 || line x`j'4 x`j'1, ylabel(-100(20)0) ytitle(income $1000) xlabel(0(.1)1) xtitle(p) legend(off) graph export x`m'`j'.ps, as(ps) logo(off) tmargin(0) lmargin(0) replace } * htype forvalues j=9/12 { line x`j'2 x`j'1 || line x`j'3 x`j'1 || line x`j'4 x`j'1, ylabel(-80(10)0) ytitle(income $1000) xlabel(0(.1)1) xtitle(p) legend(off) graph export x`m'`j'.ps, as(ps) logo(off) tmargin(0) lmargin(0) replace } * rural forvalues j=13/13 { line x`j'2 x`j'1 || line x`j'3 x`j'1 || line x`j'4 x`j'1, ylabel(-18(3)0) ytitle(income $1000) xlabel(0(.1)1) xtitle(p) legend(off) graph export x`m'`j'.ps, as(ps) logo(off) tmargin(0) lmargin(0) replace } * constant (mean of all covariates) forvalues j=14/14 { line x`j'2 x`j'1 || line x`j'3 x`j'1 || line x`j'4 x`j'1, ylabel(10(20)110) ytitle(income $1000) xlabel(0(.1)1) xtitle(p) legend(off) graph export x`m'`j'.ps, as(ps) logo(off) tmargin(0) lmargin(0) replace } drop x* matrix drop _all } II. Stata Codes for Analysis of Log Income Step 1. Goodness of fit * q1.do 1/06 * a full model * raw scale regression * OLS * 19 quantiles tempfile t use d0 global X age age2 blk hsp asn scl hsg nhs mh fh sg ot rural * centering sum $X tokenize $X while "`1'"~="" { egen m=mean(`1') replace `1'=`1'-m drop m macro shift } sum $X forvalues k=1/2 { reg lcinc $X if year==`k' } forvalues i=1/19 { local j=`i'/20 qreg lcinc $X if year==1, q(`j') nolog } forvalues i=1/19 { local j=`i'/20 qreg lcinc $X if year==2, q(`j') nolog } Step 2. Simultaneous quantile regressions with 500 replicates * s1.do 1/06 * full model * sreq 19 quaniles * log scale tempfile t set matsize 400 global X age age2 blk hsp asn scl hsg nhs mh fh sg ot rural forvalues j=1/2 { use lcinc $X year if year==`j' using d0, clear drop year * centering sum $X tokenize $X while "`1'"~="" { egen m=mean(`1') replace `1'=`1'-m drop m macro shift } sum $X sqreg lcinc $X, reps(500) q(.05 .10 .15 .20 .25 .30 .35 .40 .45 .50 .55 .60 .65 .70 .75 .80 .85 .90 .95) outreg using s1`j', nolabel bdec(3) coefast se replace mstore b`j', from(e(b)) mstore v`j', from(e(V)) keep age keep if _n<11 save s1`j', replace } Step 3. Use results from s0.do to create tables and graphs * s_m1.do 1/06 * matrix operation * 13 covariates + cons * graphs for log beta's (19 QR) based on s1.log * 500 bootstrap se * 2001 only set matsize 400 * 13 covariate + cons local k=14 * 19 quantiles times k local k1=`k'*19 forvalues m=2/2 { use s1`m', clear qui mstore b`m' qui mstore v`m' mat ren b`m' b mat ren v`m' v * 95%ci * dimension `k' x 1 mat vv=vecdiag(v) mat vv=vv' svmat vv mat drop vv qui replace vv1=sqrt(vv1) mkmat vv1 if _n<=`k1', mat(v) drop vv1 mat b=b' mat l=b-1.96*v mat u=b+1.96*v * 19 quantiles mat q=(.05\.10\.15\.20\.25\.30\.35\.40\.45\.50\.55\.60\.65\.70\.75\.80\.85\.90\.95) * reorganize matrix by variable forvalues j=1/`k' { forvalues i=1/19 { local l=`k'*(`i'-1)+`j' mat x`j'q`i'=q[`i',1],b[`l',1],l[`l',1],u[`l',1],v[`l',1] } } forvalues j=1/`k' { mat x`j'=x`j'q1 forvalues i=2/19 { mat x`j'=x`j'\x`j'q`i' } * q b l u v mat list x`j', format(%8.4f) svmat x`j' mat a1=x`j'[1...,2] mat a2=x`j'[1...,5] mat xx`j'=q,a1,a2 * q b v mat list xx`j', format(%8.4f) mat drop a1 a2 xx`j' } * graphs using the same scale for a concept * age forvalues j=1/1 { line x`j'2 x`j'1 || line x`j'3 x`j'1 || line x`j'4 x`j'1, ylabel(0(.01).06) ytitle(log income) xlabel(0(.1)1) xtitle(p) legend(off) graph export lx`m'`j'.ps, as(ps) logo(off) tmargin(0) lmargin(0) replace } * age2 forvalues j=2/2 { line x`j'2 x`j'1 || line x`j'3 x`j'1 || line x`j'4 x`j'1, ylabel(-.001(.0002)0) ytitle(log income) xlabel(0(.1)1) xtitle(p) legend(off) graph export lx`m'`j'.ps, as(ps) logo(off) tmargin(0) lmargin(0) replace } * eth forvalues j=3/5 { line x`j'2 x`j'1 || line x`j'3 x`j'1 || line x`j'4 x`j'1, ylabel(-.6(.2).2) ytitle(log income) xlabel(0(.1)1) xtitle(p) legend(off) graph export lx`m'`j'.ps, as(ps) logo(off) tmargin(0) lmargin(0) replace } * ced forvalues j=6/8 { line x`j'2 x`j'1 || line x`j'3 x`j'1 || line x`j'4 x`j'1, ylabel(-1.0(.2)0) ytitle(log income) xlabel(0(.1)1) xtitle(p) legend(off) graph export lx`m'`j'.ps, as(ps) logo(off) tmargin(0) lmargin(0) replace } * htype forvalues j=9/12 { line x`j'2 x`j'1 || line x`j'3 x`j'1 || line x`j'4 x`j'1, ylabel(-1.4(.2)0) ytitle(log income) xlabel(0(.1)1) xtitle(p) legend(off) graph export lx`m'`j'.ps, as(ps) logo(off) tmargin(0) lmargin(0) replace } * rural forvalues j=13/13 { line x`j'2 x`j'1 || line x`j'3 x`j'1 || line x`j'4 x`j'1, ylabel(-.3(.05)0) ytitle(log income) xlabel(0(.1)1) xtitle(p) legend(off) graph export lx`m'`j'.ps, as(ps) logo(off) tmargin(0) lmargin(0) replace } * constant (mean of all covariates) forvalues j=14/14 { line x`j'2 x`j'1 || line x`j'3 x`j'1 || line x`j'4 x`j'1, ylabel(9(1)12) ytitle(log income) xlabel(0(.1)1) xtitle(p) legend(off) graph export lx`m'`j'.ps, as(ps) logo(off) tmargin(0) lmargin(0) replace } drop x* matrix drop _all }