Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: egen rowsum, and missing values


From   Nirali Shah <nmshah@jhsph.edu>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: egen rowsum, and missing values
Date   Thu, 2 Oct 2008 15:21:04 -0400

Hi,

I find the egen commands to be very useful, especially the rowsum operation, which treats missing values as 0. However, I accidentally discovered an aspect of this operation which has me baffled.

In my data set, I have two types of missing values - missing due to non-response, and missing due to a skip pattern. I'd like to keep them separate, for tabulations and other purposes. The missing due to a skip pattern I have coded as ".a", and the regular missing values as "." (As numbers, not text).

Egen rowsum appears to treat my ".a" missing values as the number 56. Does anyone know why it does this? Do you have any suggestions for getting around this and still allowing me to keep the two different types of missing data codes?

Much appreciated,
Nirali
____________________________________________________
Nirali Shah
PhD Candidate, International Health, Health Systems Division
Bloomberg School of Public Health
Johns Hopkins University

*
* 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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index