Do you want row sums?
If so you can use
egen sumv1_v4 = rsum(var1-var4)
Cheers,
Douglas
On Mar 5, 2004, at 11:35 AM, Rodrigo Brice�o wrote:
Dear friends of the list. I want to know how to deal with missings
when I
need to make a sum. Suppose that I have the following variables:
v1 v2 v3 v4
200 . 30 .
. 350 . 100
280 100 30 .
In my original database each of those variables represents a source of
income and the values are the quantities reported in the survey. I
want to
generate a new variable that sums all the reported values, but when I
do
this directly I get only missings. I guess that is caused by the sum of
missing data, but I don't know a procedure to sum only values reported
and
not missings.
Thanks for helping me!
________________________
Rodrigo Brice�o
Consultor
Sanigest Internacional
Telf. Oficina: (506) 280-5457
Fax: (506) 234-1486
Celular: (506) 357-4535
www.sanigest.com
_______________________
*
* 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/
Douglas Crawford
Ph.D. Candidate, Dept. of Biochemistry UCSF
Executive Director, Innovation Accelerator
600 16th Street, Room S314
San Francisco, CA 94143-2200
Phone: 415-476-9869 xt. 7#
Fax: 415-514-4147
*
* 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/