I would like to calculate the average age-adjusted death rate by race (separately for whites and blacks), and test if the rates for countries are statistically different. As an example, I have modified Stata's mortality data file as follows:
Code:
clear input str6 nation byte age_category float(population deaths) input str6 nation byte age_category race_category float(population deaths) "Sweden" 1 1 3100000 3000 "Sweden" 1 2 45000 523 "Sweden" 2 1 3000000 10000 "Sweden" 2 2 57000 928 "Panama" 1 1 700000 300 "Panama" 1 2 41000 904 "Panama" 2 1 270000 1000 "Panama" 2 2 75000 421 end label values age_category age_lbl label def age_lbl 1 "0 - 29", modify label def age_lbl 2 "30 - 59", modify label values race_category race_lbl label def race_lbl 1 "White", modify label def race_lbl 2 "Black", modify
Code:
dstdize deaths population age_category, by(nation race_category)
1. In my study, I have about 300 countries. Hence, I would like to present an age-adjusted rate for blacks and whites (averaged across all countries). I just want to make sure that the following code will help me achieve this?
Code:
dstdize deaths population age_category, by(race_category)
I am using Stata MP 14.2 for Windows.
Many thanks in advance,
Caroline
0 Response to -dstdize- to calculate average age-adjusted death rate by race
Post a Comment