Errata for Data Analysis Using Stata
The errata for Data Analysis 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 6, p. 112, Marker size section |
---|
mysymbol(*1.5) | msize(*1.5) |
(1) | Chapter 7, p. 141, paragraph below output, fourth sentence |
---|
In the “women” column, there are 269 CDU supporters and 217 SPD supporters. | In the “women” column, there are 269 SPD supporters and 217 CDU supporters. |
(1) | Chapter 7, p. 167, paragraph below first equation, line 3 |
---|
... is outside the interval from 6 - h to 6 + h. | ... is inside the interval from 6 - h to 6 + h. |
(1) | Chapter 8, p. 219, second command |
---|
. xi: regress sqfeet i.htyp | . xi: regress sqfeet i.hhtype |
(1) | Chapter 9, p. 247, third command |
---|
. regress survived age | . regress survived age2 |
(1) | Chapter 9, p. 266, paragraph below output |
---|
The classification table shows that we have a total of 513 variables ... | The classification table shows that we have a total of 513 observations ... |
(1) | Chapter 9, p. 290, first paragraph |
---|
Any instance of -1.128 should be changed to -0.516. Also change 0.76 to 0.37. |
(1) | Chapter 10, p. 312, second full paragraph |
---|
As the file ap.dta has been the master data, these are respondents who were interviewed in 1984 but not in 2002. ... This means that for our example, 9,016 respondents were interviewed in 2002 who had not been interviewed in 1984. | As the file rp.dta has been the master data, these are respondents who were interviewed in 2002 but not in 1984. ... This means that for our example, 3,725 respondents were interviewed in 1984 who had not been interviewed in 2002. |
(1) | Chapter 10, p. 321, paragraph below output |
---|
In this case, it is 1,048,568 bytes, or 1 megabyte (MB). | In this case, it is 20,971,512 bytes, or 20 megabytes (MB). |
(1) | Chapter 11, p. 333, The problem of naming section |
---|
Imagine that you wanted the program to be called h instead of hello: . program h 1. display "Hello, world" 2. end . h Surprisingly, this brings up the introduction to Stata’s help system. Th reason is that the letter h is a shortcut for the Stata command help, which is an official Stata command. Stata only searches for programs when it has not found an internal Stata command with the specified name. For this reason, you should never define a program with the same name as an official command. In order to ascertain whether a command with a given name already exists, enter the name or enter which commandname. If Stata replies with “unrecognized command”, you may use the name for your program. |
Imagine that you wanted the program to be called q instead of hello: . program q 1. display "Hello, world" 2. end . q Surprisingly, this displays the settings of various Stata parameters. The reason is that the letter q is a shortcut for the Stata command query, which is a “built-in” Stata command. Stata only searches for programs when it has not found a built-in Stata command with the specified name. For this reason, you should never define a program with the same name as a built-in command. In order to ascertain whether a command with a given name already exists, enter which commandname. If Stata does not reply with “built-in command: commandname”, you may use the name for your program. |
(1) | Chapter 11, p. 350, snippet of denscomp.ado code at the bottom of the page |
---|
22: local ytitle = cond() 23: local xtitle = cond() 24: | 12: foreach k of local K { 13: tempvar fx`k' 14: kdensity `varlist' if `by'==`k' & `touse', gen(`fx`k'') at(`at') nodraw 15: local yvars "`yvars'" `fx`k''" |