Hello All.
I'm working with a number of binary categorical variables and I want to identify all cases that meet the "1" condition on every one of the constituent variables. I've noticed other great advice here for related concatenation questions, but I've not noticed information related to my question. So, to be clear, my constituent variables are something like:
tall: 1 or 0
happy: 1 or 0
lucky 1 or 0
married 1 or 0
What I'm hoping to produce from these existing variables is a single variable that in the 1 condition includes all respondents who are tall AND happy AND lucky AND married- who have met all conditions. Those cases for whom all are true would be coded 1 and those cases that did not meet ANY ONE of the constituent conditions would be a 0. To be clear, in this case, someone who is tall AND happy AND lucky BUT NOT married would be a 0.
I gather that this is a relatively easy problem to solve, but it has as yet eluded me. Many thanks in advance to anyone who can offer some help!
I'm working with a number of binary categorical variables and I want to identify all cases that meet the "1" condition on every one of the constituent variables. I've noticed other great advice here for related concatenation questions, but I've not noticed information related to my question. So, to be clear, my constituent variables are something like:
tall: 1 or 0
happy: 1 or 0
lucky 1 or 0
married 1 or 0
What I'm hoping to produce from these existing variables is a single variable that in the 1 condition includes all respondents who are tall AND happy AND lucky AND married- who have met all conditions. Those cases for whom all are true would be coded 1 and those cases that did not meet ANY ONE of the constituent conditions would be a 0. To be clear, in this case, someone who is tall AND happy AND lucky BUT NOT married would be a 0.
I gather that this is a relatively easy problem to solve, but it has as yet eluded me. Many thanks in advance to anyone who can offer some help!
Comment