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
Checks for Tobit regressionHi i have done a tobit regression to estimate the price elasticities of demand for alcohols and have…
Regression with or without dummy variable? + visualizationHi all, 1. I need to perform a regression with the log of house price (loglprice) as a dependent va…
Interpretation of interaction variableDear all, I am analyzing whether a CEO turnover (c. 600 events) has a long-term (5 years) impact on…
how to add a grouping by variable to the scatter plot to create a panel New user to STATA pls helpHi all, Im very new user to STATA. I have the code below and am wanting to create a panel of scatter…
outreg2 for ivreghdfeDear Statalists, I am quite new to reghdfe and ivreghdfe. I hope someone can help me with my code. …
Subscribe to:
Post Comments (Atom)
0 Response to Counting diseases
Post a Comment