Greetings,
I am new to STATA and I need help with adding categories to a variable. Here is what I have done so far.
I used ICD9 codes and extracted the observations that have the diagnosis that I need. For each of them I generated a new variable (CODE1, CODE 2 etc) that have the number of observations for that specific condition. Now I would like to compare these categories to see if there is a statistical difference by ethnicity across each diagnosis. I am trying to merge these CODE variables into a single variable that has all CODE listed as categories. I dont know how to proceed since using gen DXALL max(CODE 1, CODE 2 etc) just adds them together under 1 category.
My command for the test is this
csgof race, expperc (25 15 15 15 15 15)
Please let me know if there are any other details I should provide
I am new to STATA and I need help with adding categories to a variable. Here is what I have done so far.
I used ICD9 codes and extracted the observations that have the diagnosis that I need. For each of them I generated a new variable (CODE1, CODE 2 etc) that have the number of observations for that specific condition. Now I would like to compare these categories to see if there is a statistical difference by ethnicity across each diagnosis. I am trying to merge these CODE variables into a single variable that has all CODE listed as categories. I dont know how to proceed since using gen DXALL max(CODE 1, CODE 2 etc) just adds them together under 1 category.
My command for the test is this
csgof race, expperc (25 15 15 15 15 15)
Please let me know if there are any other details I should provide
Comment