-viewsource _growtotal.ado- shows that treating missings as 0 is exactly
what -egen, rowtotal()- does.
Nick
[email protected]
David Bell
You have surmised that -egen newvar = rowtotal(var1 var2)- treats
missing values as zero. I do not believe this is strictly correct.
The command just sums the values that it has (thus not using a
variable in a sum is the same as treating it as zero). This is why I
always use -rowmean- instead of -rowtotal-. Thus when there is a
missing value, you get the mean of the remaining values (they are not
treated as zeros).
On May 15, 2008, at 12:31 AM, Yamamoto, Satomi wrote:
> I think egen newvar = rowtotal(var1 var2) is equivalent to
> replacing missing values with 0(zero).
*
* 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/
_____________________________________________________________________
Mensaje analizado y protegido por Telefonica Empresas
*
* 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/
Privileged, confidential or patient identifiable information may be contained in this message. This information is meant only for the use of the intended recipients. If you are not the intended recipient, or if the message has been addressed to you in error, do not read, disclose, reproduce, distribute, disseminate or otherwise use this transmission. Instead, please notify the sender by reply e-mail, and then destroy all copies of the message and any attachments.
*
* 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/