Hello everyone, I would like help to extract the information in the output table of dstdize into a stata file so that I can then plot a graph showing how the age and sex-standardised incidence rate changes for each year. The "saving" option unfortunately does not include the required information. This question has previously been posed in a different thread (https://www.statalist.org/forums/for...stdize-results) but no solution was found.
My dataset includes the absolute counts for a particular condition and the population size for each age-band and sex for each year. I have used dstdize to standardice the incidence rates arbitrarily on one of the years' (e.g. 1998) population structure and obtained the correct output using dstdize, but I can#t figure out a way to plot the graphs I need without manually writing out the output table in excel- this is what I need help with.
The output I get is what I need:
year N Crude rate Adjusted rate [95% conf. interval]
1998 200 0.080000 0.080000 0.044883 0.115117
2005 264 0.071970 0.076422 0.041088 0.111756
2010 230 0.056522 0.032583 0.013230 0.051937
How do I get this output table into a stata dataset?
Many thanks in advance
Markos
My dataset includes the absolute counts for a particular condition and the population size for each age-band and sex for each year. I have used dstdize to standardice the incidence rates arbitrarily on one of the years' (e.g. 1998) population structure and obtained the correct output using dstdize, but I can#t figure out a way to plot the graphs I need without manually writing out the output table in excel- this is what I need help with.
Code:
clear input year age_band sex count pop_size 1998 1 1 4 60 1998 1 2 5 80 1998 2 1 2 50 1998 2 2 5 10 2005 1 1 3 87 2005 1 2 6 67 2005 2 1 7 65 2005 2 2 3 45 2010 1 1 1 100 2010 1 2 0 30 2010 2 1 5 60 2010 2 2 7 40 dstdize count pop_size age_band sex, by(year) base(1998) end
year N Crude rate Adjusted rate [95% conf. interval]
1998 200 0.080000 0.080000 0.044883 0.115117
2005 264 0.071970 0.076422 0.041088 0.111756
2010 230 0.056522 0.032583 0.013230 0.051937
How do I get this output table into a stata dataset?
Many thanks in advance
Markos

Comment