Hello,
I have grouped data that describes cases and person years stratified by age, sex and population group. Please see the whole data set below. I calculated disease rates for each population group, directly standardized by age and sex, using this code and it worked:
dstdize cases p_yrs age sex, by(pop) using (stan_pop) format(%16.0g)
This data set was used as the standard population for direct standardization:
.
Now I would just like to calculate rate ratios and their CIs, but cannot figure out how to do that. Thanks in advance for any help.
Jennifer
I have grouped data that describes cases and person years stratified by age, sex and population group. Please see the whole data set below. I calculated disease rates for each population group, directly standardized by age and sex, using this code and it worked:
dstdize cases p_yrs age sex, by(pop) using (stan_pop) format(%16.0g)
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input long p_yrs byte cases long(age sex pop) 2415226 26 1 1 2 63481 8 1 1 3 106578 11 1 1 4 2585285 45 1 1 1 2539317 13 1 2 2 67443 8 1 2 3 112972 12 1 2 4 2719732 33 1 2 1 2292152 11 3 1 2 142066 4 3 1 3 135532 9 3 1 4 2569750 24 3 1 1 2417021 7 3 2 2 145811 6 3 2 3 138788 11 3 2 4 2701620 24 3 2 1 2293798 3 2 1 2 186762 23 2 1 3 125305 5 2 1 4 2605865 31 2 1 1 2427720 1 2 2 2 195853 10 2 2 3 131491 8 2 2 4 2755064 19 2 2 1 end label values age age label def age 1 "0to4", modify label def age 2 "10to14", modify label def age 3 "5to9", modify label values sex sex label def sex 1 "female", modify label def sex 2 "male", modify label values pop pop label def pop 1 "al_pop", modify label def pop 2 "cbo", modify label def pop 3 "fb", modify label def pop 4 "si", modify
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input long(p_yrs age sex) 2585285 1 1 2719732 1 2 2569750 3 1 2701620 3 2 2605865 2 1 2755064 2 2 end label values age age label def age 1 "0to4", modify label def age 2 "10to14", modify label def age 3 "5to9", modify label values sex sex label def sex 1 "female", modify label def sex 2 "male", modify
Now I would just like to calculate rate ratios and their CIs, but cannot figure out how to do that. Thanks in advance for any help.
Jennifer
Comment