Code:
gen s1 = x1+x2+x3+x4
replace s1 = 0 if s1 == .
egen s2 = rowtotal(x*)
assert s1==s2
Why it's false?