[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: collapse missing values into zeroes when using (sum)
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,
* For searches and help try:
- st: ivreg
- From: "is300gp" <email@example.com>