options crt; ? 5e5 in cps78; set n=550; smpl 1,n; msd lnwage fe nonwh hisp ed ex exsq union; unmake @mean all1-all8; ? name the means olsq lnwage c fe union nonwh hisp ed ex exsq; set expun = exp(@coef(3)); set %diff = 100*(expun-1); print expun,%diff; ? (a) ? supres smpl; select union; msd lnwage fe nonwh hisp ed ex exsq; unmake @mean un1-un7; ? for (b) olsq(silent) lnwage c fe nonwh hisp ed ex exsq; unmake @coef bun1-bun7; ? for (c) rename @ssr ssrun; ? for (d) rename @coef bun; rename @vcov vun; ? for (c, g) select .not.union; msd lnwage fe nonwh hisp ed ex exsq; unmake @mean nonun1-nonun7; olsq(silent) lnwage c fe nonwh hisp ed ex exsq; unmake @coef bnonun1-bnonun7; rename @ssr ssrnonun; dot 1-7; set diffm. = un. - nonun.; ? difference in union-nonunion means set diffb. = bun. - bnonun.; ? difference in union-nonunion coefs enddot; print diffm1-diffm7; ? (b) print diffb2-diffb7; ? (c) mat bdiff = bun-@coef; mat vdiff = vun+@vcov; title 'union - nonunion coefs - 1978'; tstats(names=@rnms) bdiff vdiff; ? (c) done statistically list n78 @rnms; rename bdiff bdiff78; rename vdiff vdiff78; ? save results for (g) ? slope of earnings function depends on b6-2*b7*ex, not on means of fe, etc. ? select 1; olsq(silent) lnwage c fe nonwh hisp ed ex exsq; set ssru = ssrun+ssrnonun; set df1 = 7; set df2 = n-2*7; set chow = ((@ssr-ssru)/df1)/(ssru/df2); cdf(F,df1=df1,df2=df2) chow; ? (d) ? set dlw = diffm1; dot 2-7; set dlw = dlw - diffm.*bun.; enddot; set wagediff = exp(dlw); set %diff = 100*(wagediff-1); set propex = (diffm1-dlw)/diffm1; print wagediff,%diff,propex; ? (e) ? set dlw = diffm1; dot 2-7; set dlw = dlw - diffm.*bnonun.; enddot; set wagediff = exp(dlw); set %diff = 100*(wagediff-1); set propex = (diffm1-dlw)/diffm1; print wagediff,%diff,propex; ? (f) ? ? (g): same for cps85 ? delete lnwage fe nonwh hisp ed ex exsq union; in cps85; set n=534; smpl 1,n; msd lnwage fe nonwh hisp ed ex exsq union; unmake @mean all1-all8; ? name the means olsq lnwage c fe union nonwh hisp ed ex exsq; set expun = exp(@coef(3)); set %diff = 100*(expun-1); print expun,%diff; ? (a) ? supres smpl; select union; msd lnwage fe nonwh hisp ed ex exsq; unmake @mean un1-un7; ? for (b) olsq(silent) lnwage c fe nonwh hisp ed ex exsq; unmake @coef bun1-bun7; ? for (c) rename @ssr ssrun; ? for (d) rename @coef bun; rename @vcov vun; ? for (c, g) select .not.union; msd lnwage fe nonwh hisp ed ex exsq; unmake @mean nonun1-nonun7; olsq(silent) lnwage c fe nonwh hisp ed ex exsq; unmake @coef bnonun1-bnonun7; rename @ssr ssrnonun; dot 1-7; set diffm. = un. - nonun.; set diffb. = bun. - bnonun.; enddot; print diffm1-diffm7; ? (b) print diffb2-diffb7; ? (c) mat bdiff = bun-@coef; mat vdiff = vun+@vcov; title 'union - nonunion coefs - 1985'; tstats(names=@rnms) bdiff vdiff; ? (c) done statistically ? slope of earnings function depends on b6-2*b7*ex, not on means of fe, etc. ? select 1; olsq(silent) lnwage c fe nonwh hisp ed ex exsq; set ssru = ssrun+ssrnonun; set df1 = 7; set df2 = n-2*7; set chow = ((@ssr-ssru)/df1)/(ssru/df2); cdf(F,df1=df1,df2=df2) chow; ? (d) ? set dlw = diffm1; dot 2-7; set dlw = dlw - diffm.*bun.; enddot; set wagediff = exp(dlw); set %diff = 100*(wagediff-1); set propex = (diffm1-dlw)/diffm1; print wagediff,%diff,propex; ? (e) ? set dlw = diffm1; dot 2-7; set dlw = dlw - diffm.*bnonun.; enddot; set wagediff = exp(dlw); set %diff = 100*(wagediff-1); set propex = (diffm1-dlw)/diffm1; print wagediff,%diff,propex; ? (f) ? ? final optional part of (g) ? Note: this does not directly address the significance of ? the overall wage differential, which is also a function of ? the change in means. To do this, you would need to know ? the covariance of the means and regression coefficients. ? mat bdifft = bdiff-bdiff78; mat vdifft = vdiff+vdiff78; title 'change in (union-nonunion) coefs: 85-78'; tstats(names=n78) bdifft vdifft;