Dear Stata Users,
I have two categorical variables, V1 and V2, and they are both yesno questions (coded as 1, 0, respectively). I want to create a third variable (V3 with labels yesno) from V1 and V2. For V3, If the response in either V1 or V2, is yes, then V3 earns the code yes (1). If, on the other hand, the response is No for both V1 and V2, then V3 automatically is coded as 0 (no). I thought this was supposed to be a really simple code, but all my attempts have failed, and I didn't come across a similar problem from previous problems encountered in this forum. Thank you, and I look forward to your suggestion.
#Edit
There is a possibility respondent who said yes in V2 also said yes in V1. As an alternative to the code above, I will also appreciate any command that can compare the responses or tabulate IDs that said yes in v1 and in V2. Should that be the case, then v3=v1, and I can proceed from there.
I have two categorical variables, V1 and V2, and they are both yesno questions (coded as 1, 0, respectively). I want to create a third variable (V3 with labels yesno) from V1 and V2. For V3, If the response in either V1 or V2, is yes, then V3 earns the code yes (1). If, on the other hand, the response is No for both V1 and V2, then V3 automatically is coded as 0 (no). I thought this was supposed to be a really simple code, but all my attempts have failed, and I didn't come across a similar problem from previous problems encountered in this forum. Thank you, and I look forward to your suggestion.
#Edit
There is a possibility respondent who said yes in V2 also said yes in V1. As an alternative to the code above, I will also appreciate any command that can compare the responses or tabulate IDs that said yes in v1 and in V2. Should that be the case, then v3=v1, and I can proceed from there.
Comment