--- [email protected] wrote:
> The respondent can answer the age they were during the incident,
> and there is the following code that was entered by the survey
> team:
>
> Not Applicable: 997
> Don't Know: 998
> Not Stated: 999
>
> Of course when I ask STATA to calculate Summary Statistics, it uses
> the code as if they were observations so my mean values are through
> the roof.
>
> How do I get stata to ignore the observations which contain the
> code?
. sum age if age<997
or
. recode age 997/999 = .
. sum age
Or, if you don't want to lose the information from the original
codes, you could change them to the missing values provided by Stata
8 (.a, .b, ..., .z).
Friedrich Huebler
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/