Hello, I am dealing with data where I have subject IDs and a variable that tells me the diseases each subject has. Some of the subjects have more than one disease but they are just inputted in the dataset multiple times. For example: data example; input ID condition$ ; datalines; 45 diabetes 46 cancer 46 diabetes 47 cancer ; What I want is a summary of the frequency of conditions. For example, X number of people have only one condition but Y number of people have two conditions and Z number of people have three conditions, etc. I am thinking that I would just like to create a variable that tells me the number of conditions each participant has but I am not sure how to do this. Is there a way I can do this?
... View more