Hi, say I want to create a summed var like so:
This will tell Stata that if an observation has all missing values for var1 - var4, then the index var will = . as well. But is there an option for telling Stata I want index to =. if any of var1 - var4 == . ? That is, I only want a non-missing value for index for complete cases. Thanks.
Code:
egen index = rowtotal(var1 var2 var3 var4), miss

Comment