Errata for Microeconometrics Using Stata

The errata for Microeconometrics Using Stata are provided below. Click here for an explanation of how to read an erratum. Click here to learn how to determine the printing number of a book.

 (1) Chapter 4, p. 117, second line from bottom
 . generate xfd = rchi2(10)/5 . generate xfd = rchi2(5)/5
 (1) Chapter 4, p. 130, output at top
 . summarize y1 y2 Variable | Obs Mean Std. Dev. Min Max -------------+------------------------------------------------------ y1 | 1000 10.08618 2.082605 3.108118 16.40892 y2 | 1000 20.20292 2.999583 10.12452 29.79675 . correlate y1 y2 | y1 y2 -------------+------------------ y1 | 1.0000 y2 | 0.5553 1.0000 . summarize y1 y2 Variable | Obs Mean Std. Dev. Min Max -------------+------------------------------------------------------ y1 | 1000 10.0093 1.985447 3.176768 16.38992 y2 | 1000 20.07195 2.941012 9.202241 29.94806 . correlate y1 y2 | y1 y2 -------------+------------------ y1 | 1.0000 y2 | 0.4724 1.0000
 (1) Chapter 4, p. 140, first line of Stata program
 . * Program for finite-sample properties of OLS: fixed regressors . * Program for finite-sample properties of OLS: power
 (1) Chapter 4, p. 142, regress output
 . regress y x, noconstant Source | SS df MS Number of obs = 10000 -----------+------------------------------- F( 1, 9999) =42724.08 Model | 81730.3312 1 81730.3312 Prob > F = 0.0000 Residual | 19127.893 9999 1.9129806 R-squared = 0.8103 -----------+------------------------------- Adj R-squared = 0.8103 Total | 100858.224 10000 10.0858224 Root MSE = 1.3831 -----------+------------------------------------------------------------ y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -----------+------------------------------------------------------------ x | .9001733 .004355 206.70 0.000 .8916366 .90871 -----------+------------------------------------------------------------ . regress y x, noconstant Source | SS df MS Number of obs = 10000 -----------+------------------------------- F( 1, 9999) =41969.38 Model | 80231.7664 1 80231.7664 Prob > F = 0.0000 Residual | 191114.8283 9999 1.91167399 R-squared = 0.8076 -----------+------------------------------- Adj R-squared = 0.8076 Total | 99346-5946 10000 9.93465946 Root MSE = 1.3826 -----------+------------------------------------------------------------ y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -----------+------------------------------------------------------------ x | .8997697 .004392 204.86 0.000 .8911604 .9083789 -----------+------------------------------------------------------------
 (1,2) Chapter 6, p. 190, second paragraph, third line
 residuals from OLS of x1 on x2. residuals from OLS of x2 on x1.
 (1) Chapter 6, p. 204, exercise 9, second sentence
 The data are in mus06ivklingdata.dta. The data are in mus06klingdata.dta.
 (1) Chapter 8, p. 261, unnumbered displayed equation
 (1) Chapter 8, p. 262, Stata program and output
 . * Robust Hausman test using method of Wooldridge (2002) . quietly xtreg lwage $xlist, re . scalar theta = e(theta) . global yandxforhausman lwage exp wexp2 wks . sort id . foreach x of varlist$yandxforhausman{ 2. by id: egen meanx' = mean(x') 3. generate mdx' = x' - meanx' 4. generate redx' = x' - theta*meanx' 5. } . quietly regress redlwage redexp redexp2 redwks mdexp mdexp2 mdwks . test mdexp mdexp2 mdwks ( 1) mdexp = 0 ( 2) mdexp2 = 0 ( 3) mdwks = 0 F( 3, 4158) = 848.39 Prob > F = 0.0000 . * Robust Hausman test using method of Wooldridge (2002) . quietly xtreg lwage $xlist, re . scalar theta = e(theta) . global yandxforhausman lwage exp wexp2 wks ed . sort id . foreach x of varlist$yandxforhausman{ 2. by id: egen meanx' = mean(x') 3. generate mdx' = x' - meanx' 4. generate redx' = x' - theta*meanx' 5. } . quietly regress redlwage redexp redexp2 redwks reded mdexp mdexp2 mdwks, > vce(cluster id) . test mdexp mdexp2 mdwks ( 1) mdexp = 0 ( 2) mdexp2 = 0 ( 3) mdwks = 0 F( 3, 594) = 597.47 Prob > F = 0.0000
 (1) Chapter 11, p. 378, third line of code
 : void poisson(todo, b, y, X, lndensity, g, H) : void poissonmle(todo, b, y, X, lndensity, g, H)
 (1) Chapter 12, p. 397, Stata commands
 . use mus10data.dta, clear . quietly poisson ... . use mus10data.dta, clear . keep if year02==1 . quietly poisson ...
 (1,2) Chapter 13, p. 439, third line from bottom in the code
 generate ystar = xb + u generate ystar = xb + uhat
 (1,2) Chapter 15, p. 508, text below first equation in section 15.8.1
 (1,2) Chapter 15, p. 514, second paragraph of section 15.9.6
 The user-written gologit command The user-written gologit2 command
 (1,2) Chapter 15, p. 519, fourth sentence of exercise 4
 Obtain the MEs for the predicted probability of excellent health for the MNL model ... Obtain the MEs for the predicted probability of excellent health for the ordered probit ...
 (1,2) Chapter 16, p. 548, first and second equations in table 16.2
 (1) Chapter 17, p. 595, Stata program and output
 . * Program and bootstrap for Poisson two-step estimator . program endogtwostep, eclass 1. version 10.1 2. tempname b 3. tempvar lpuhat 4. regress private $xlist2 income ssiratio 5. predict lpuhat', residual 6. poisson docvis private$xlist2 lpuhat 7. matrix b' = e(b) 8. ereturn post b' 9. end . bootstrap _b, reps(400) seed(10101) nodots nowarn: endogtwostep Bootstrap results Number of obs = 3677 Replications = 400 -----------+------------------------------------------------------------ | Observed Bootstrap Normal-based | Coef. Std. Err. z P>|z| [95% Conf. Interval] -----------+------------------------------------------------------------ private | .5505541 .2406273 2.29 0.022 .0789334 1.022175 medicaid | .2628822 .1151473 2.28 0.022 .0371976 .4885669 age | .3350604 .0673445 4.98 0.000 .2030677 .4670532 age2 | -.0021923 .0004444 -4.93 0.000 -.0030634 -.0013213 educyr | .018606 .0078638 2.37 0.018 .0031934 .0340187 actlim | .2053417 .0407465 5.04 0.000 .1254802 .2852033 totchr | .24147 .0131985 18.30 0.000 .2156014 .2673387 lpuhat | -.4166838 .2469318 -1.69 0.092 -.9006614 .0672937 _cons | -11.90647 2.566368 -4.64 0.000 -16.93646 -6.876476 -----------+------------------------------------------------------------ . * Program and bootstrap for Poisson two-step estimator . program endogtwostep, eclass 1. version 10.1 2. tempname b 3. capture drop lpuhat2 4. regress private $xlist2 income ssiratio 5. predict lpuhat2, residual 6. poisson docvis private$xlist2 lpuhat2 7. matrix b' = e(b) 8. ereturn post b' 9. end . bootstrap _b, reps(400) seed(10101) nodots nowarn: endogtwostep Bootstrap results Number of obs = 3677 Replications = 400 -----------+------------------------------------------------------------ | Observed Bootstrap Normal-based | Coef. Std. Err. z P>|z| [95% Conf. Interval] -----------+------------------------------------------------------------ private | .5505541 .2567815 2.14 0.032 .0472716 1.053837 medicaid | .2628822 .1205813 2.18 0.029 .0265473 .4992172 age | .3350604 .0707275 4.74 0.000 .1964371 .4736838 age2 | -.0021923 .0004667 -4.70 0.000 -.0031071 -.0012776 educyr | .018606 .0083042 2.24 0.025 .0023301 .034882 actlim | .2053417 .0412756 4.97 0.000 .124443 .2862405 totchr | .24147 .0134522 17.95 0.000 .2151042 .2678359 lpuhat | -.4166838 .2617964 -1.59 0.111 -.9297953 .0964276 _cons | -11.90647 2.698704 -4.41 0.000 -17.19583 -6.617104 -----------+------------------------------------------------------------
 (1) Appendix B, p. 658, first line of code
 : void poisson(real scalar todo, : void poissonmle(real scalar todo,`