Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Survey Data


From   Friedrich Huebler <huebler@rocketmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Re: Survey Data
Date   Wed, 10 Sep 2003 17:30:03 -0700 (PDT)

--- gmkeskin@ucalgary.ca 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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index