Hi,
This is probably simple but I’ve spent too much time trying to figure it out: If I have a dataset like this:
Id inc1 inc2
1 12 .
2 3 5
3 . 9
and I want to create a new var that adds up inc1 and inc2 by typing “gen total_inc = inc1+inc2”
I get
Total_inc
.
8
.
instead of
Total_inc
12
8
9
Is there no other way than converting missing values to zero, which I really would rather not do?
Thanks,
Tewodaj
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~
Tewodaj Mogues
Dept. of Agricultural and Applied Economics
University of Wisconsin - Madison
427 Lorch St. #317, Taylor Hall
Madison, WI 53706
*
* 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/