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]

Re: st: sum up many variables with missing values across columns


From   James Sams <[email protected]>
To   [email protected]
Subject   Re: st: sum up many variables with missing values across columns
Date   Mon, 19 Sep 2011 22:12:05 -0500

On Monday, September 19, 2011, you wrote:
> Hi there,
> 
> I am trying to sum up say 100 variables across columns, but many of
> the 100 variables have missing values. And I want the sum to be
> missing if any of the 100 variables is missing.   -rowtotal- does not
> work because it treats missing values as 0; even with the option -,
> missing-, it generates a missing value only when all the 100 variables
> are missing.

The user written program egenmore has a function rowsum2 which has the option 
anymiss which I believe does what you want.


-- 
James Sams
[email protected]

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index