[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: adding across variables
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”
Is there no other way than converting missing values to zero, which I really would rather not do?
Dept. of Agricultural and Applied Economics
University of Wisconsin - Madison
427 Lorch St. #317, Taylor Hall
Madison, WI 53706
* For searches and help try: