Hi dear Statalist:
I have a question. My dataset has 6764 subjects, from them 4142 have any disease; I have around 124 variables, and 42 variables that are each disease as dummy, for example cancer (0= no, 1=yes), arthritis (0= no, 1=yes) . The diseases are not exclusive. I would like to have a count of frequency of diseases by person. Example:
1 disease: 500 persons
2 diseases: 475 persons
3 diseases: 234 persons
Is there any way to count of the 42 diseases variables that are within the 142 variables? And to count the freqcuency of number of diseases in the dummy variables?
Best regards,
Related Posts with Counting diseases
Twoway graph constant scalesDear all, I am trying to figure out how to ensure that a 45-degree line is also visually a 45-degre…
Deleting some observations within a variable when conditions are metHi everyone, I have a datasets which looks like this: Code: * Example generated by -dataex-. For …
How to convert a string variable to numeric and customize the label encoding?I have a dataset for transportation research. I have imported the data into STATA 17. The dataset co…
Marginal effect after system GMM continuous variables penal dataHi experts and researchers, I am using interactive terms in my research and I need to understand ho…
How do I create a new variable for all levels of a variable when a certain condition is satisfied?Hi there, I am new to STATA and I am currently struggling to find a solution for what I would say i…
Subscribe to:
Post Comments (Atom)
0 Response to Counting diseases
Post a Comment