I wonder if there is a simple solution to this:
I want to know if the cause of death is any cancer. The ICD diagnos starting with C, regardless of 2 or 3 numbers. Is this possible? Below didnt work.
gen deathanycancer
recode deathanycancer (0=1) if (causeofdeath=="C*" | causeofdeath=="C**" | causeofdeath=="C***")
I want to know if the cause of death is any cancer. The ICD diagnos starting with C, regardless of 2 or 3 numbers. Is this possible? Below didnt work.
gen deathanycancer
recode deathanycancer (0=1) if (causeofdeath=="C*" | causeofdeath=="C**" | causeofdeath=="C***")

Comment