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]

st: total() returns zero if all missing in long-format data


From   Shehzad Ali <[email protected]>
To   Stata List <[email protected]>
Subject   st: total() returns zero if all missing in long-format data
Date   Mon, 29 Oct 2012 13:19:52 +0000 (GMT)

Hi listers,

In long-format data structure (multiple obs per id), the total() function returns zero if all values of the variable for a particular id are missing. Can anyone suggest the best way to ensure that the total returns missing when all values are missing for a particular id?

bysort id: egen total = total(var1)

Many thanks
Shehzad

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


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