I would like to keep them as missing because I need to be able to
distinguish between actual 0s and missing values.
Thanks,
Monica L.
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Nick Cox
Sent: Tuesday, July 27, 2004 7:51 PM
To: [email protected]
Subject: st: RE: collapse missing values into zeroes when using (sum)
You say that you don't want missings to be
included in the -collapse-, as they are
regarded as summing to 0.
What do you want Stata to do instead?
Nick
[email protected]
Monica L. Parra Torrado
> 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).
*
* 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/
*
* 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/