Hi all,
I have data with variables called "hosp_date1 hosp_date2 hospdate_3..." and so on. I would like to count how many hosp_date variables are not missing by a person's id. Can you help with the code for this?
I basically want a variable that will=3 if you have a nonmissing hosp_date1, hosp_date2, hosp_date3, and will=2 if one is missing, and so on. Thanks!
I have data with variables called "hosp_date1 hosp_date2 hospdate_3..." and so on. I would like to count how many hosp_date variables are not missing by a person's id. Can you help with the code for this?
I basically want a variable that will=3 if you have a nonmissing hosp_date1, hosp_date2, hosp_date3, and will=2 if one is missing, and so on. Thanks!
Comment