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

st: collapse missing values into zeroes when using (sum)


From   "Monica L. Parra Torrado" <[email protected]>
To   <[email protected]>
Subject   st: collapse missing values into zeroes when using (sum)
Date   Tue, 27 Jul 2004 18:50:03 -0400

Dear Statalist,
I have information at cities and state level but want to aggregate it at the
state level using weighted averages (in a very manual way).  For one of the
steps I am using the command �collapse (sum) variables, by (state year)� but
then I am getting zeroes where there were missing values because of the sum
function (it does not happen with the other collapse functions like sd,
mean, etc).  I tried to use the option �cw� but since the missing values are
not for the same observation among the different variables I end up having
no observations at all. 
So I would like to know if there is a way I could tell Stata not to collapse
missing values into zeroes when using (sum).

Thanks for any hint,

Best regards,

M�nica L.


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