I am trying to create a dummy that equals one whenever one of two chosen dummies equals one, no matter if one of them is missing. However, I want to avoid stata to generate a zero if both are missing, because in that case I want to return a missing value.
for now, I did it like this:
Code:
generate SME2 = SME2011 == 1 | SME2012 == 1
kind regards,
Timea
0 Response to create dummy with missing values
Post a Comment