Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: finding incorrectly entered data


From   Fred Wolfe <[email protected]>
To   [email protected]
Subject   Re: st: finding incorrectly entered data
Date   Wed, 15 Jun 2011 15:13:40 -0500

Try something like this:

gen aflag = real(daysfromtest) == .

Fred Wolfe

On Wed, Jun 15, 2011 at 3:04 PM, Michael Eisenberg
<[email protected]> wrote:
>
> Colleagues,
>
> I have what I hope will be a simple question.
>
> I have a list of several thousand patients with a lab test and days
> from the test recorded.  I'd like to be able to analyze the days from
> test data as a continuous variable.  Unfortunately, some of the data
> in the days from lab test are not numeric and have odd characters
> (e.g. ?, +-5, na, etc).  See below.  Thus, I cannot run any summary
> statistics on it.
>
> I cannot manually look through all the data due to the number of men
> to find the nonnumeric data.  Is there a way I can have stata somehow
> flag the rows with nonnumeric data?
>
> Thank you in advance.
>
> Mike
>
>
>
> id    test   daysfromtest
> 1     41          2
> 2     43          4
> 3     45          6
> 4     44          10
> 5     48          ?
> 6     44          +-5
> 7     24          na
> 8     74          2
> 9     94          3
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/

Fred Wolfe
National Data Bank for Rheumatic Diseases
Wichita, Kansas
NDB Office +1 316 263 2125 Ext 0
Research Office +1 316 686 9195
[email protected]

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index