I have an aggregate X that consists of components A + B + C + ...
Suppose now that C is missing. If all others are available, I can use X - A - B - ... to obtain C.
I can do the same thing now with every (missing) component (as long as there is only one). However, is there a faster way in Stata than using:
replace A = X - B - C - ... if A == .
replace B = X - A - C - ... if B == .
and so on?
Suppose now that C is missing. If all others are available, I can use X - A - B - ... to obtain C.
I can do the same thing now with every (missing) component (as long as there is only one). However, is there a faster way in Stata than using:
replace A = X - B - C - ... if A == .
replace B = X - A - C - ... if B == .
and so on?
Comment