I am using the HRS for a project and would like to create an 'insurance' variable pulling values from the individual insurance indicators that have overlap with each other. I have medicaid (yes/no) as 'medicaid' combine spouse (yes/no) or personal employe plan (yes/no) or any gov plan (yes/no) as 'other' private insurance is a counted variable of how many plans they have, where I would like to do as >=1 means they have private insurance i've tried doing if medicaid=1 then insurance=1; else if employee=1 or spouse=1 or gov=1 then insurance=2; else if private>=1 then insurance=3; else insurance=.; but since people can have more than one type of insurance, none of the frequencies are correct after medicaid. Is there a way to properly code this?
... View more