11.07.2015 Views

[U] User's Guide

[U] User's Guide

[U] User's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

[ U ] 12.2 Numbers 121Technical noteStata stores numeric missing values as the largest 27 numbers allowed by the particular storagetype; see [U] 12.2.2 Numeric storage types. There are two important implications. First, if you sorton a variable that has missing values, the missing values will be placed last, and the sort order ofany missing values will follow the rule regarding the properties of missing values stated above.. sort wincome. list wincomewincome1. 02. 340003. 500004. .5. .bThe second implication concerns relational operators and missing values. Do not forget that amissing value will be larger than any numeric value.. list if wincome > 40000hincome wincome income3. .z 50000 .4. .a . .5. 47000 .b .Observations 4 and 5 are listed because ‘.’ and ‘.b’ are both missing and thus are greater than40,000. Relational operators are discussed in detail in [U] 13.2.3 Relational operators.Example 2In producing statistical output, Stata ignores observations with missing values. Continuing with theexample above, if we request summary statistics on hincome and wincome by using the summarizecommand, we obtain. summarize hincome wincomeVariable Obs Mean Std. Dev. Min Maxhincome 3 38000 7937.254 32000 47000wincome 3 28000 25534.29 0 50000Some commands discard the entire observation (known as casewise deletion) if one of the variablesin the observation is missing. If we use the correlate command to obtain the correlation betweenhincome and wincome, for instance, we obtain. correlate hincome wincome(obs=2)hincomewincomehincome 1.0000wincome 1.0000 1.0000

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!