Hi,
I need to create various dummy variables that would put households into groups based on characteristics of individuals in the household.
One of the groups is a household which has at least one eligible son and one eligible daughter (I have already created dummy variables for individuals who are eligible where it equals one if the individual is eligible). I've tried using the egen function with the max option however have had no luck (for instance, I've tried by hhid: egen hld_typ4 = max(eligible_son & eligible_daughter) ) Have I simply got the syntax wrong? or is there any way?
I've used the following FAQ as guidance (http://www.stata.com/support/faqs/da...ble-recording/), however it's not clear here how I would go about using the max option on two variables.
Any help would be much appreciated!
Thanks
I need to create various dummy variables that would put households into groups based on characteristics of individuals in the household.
One of the groups is a household which has at least one eligible son and one eligible daughter (I have already created dummy variables for individuals who are eligible where it equals one if the individual is eligible). I've tried using the egen function with the max option however have had no luck (for instance, I've tried by hhid: egen hld_typ4 = max(eligible_son & eligible_daughter) ) Have I simply got the syntax wrong? or is there any way?
I've used the following FAQ as guidance (http://www.stata.com/support/faqs/da...ble-recording/), however it's not clear here how I would go about using the max option on two variables.
Any help would be much appreciated!
Thanks
Comment