Hello,

I would like to compare two directly standardized rates by computing a standardized rate ratio and obtaining a p-value for this comparison. I have read through previous posts about -dstdize- and -distrate- but could not identify a way to compute the p-values. I have documented my code below:

Code:
/*Generating the standard population dataset*/
clear
input byte age_category double population
1 3886000
2 3332000
3 1353000
end
sort age_category
label values age_category age_lbl
label def age_lbl 1 "0 - 29", modify
label def age_lbl 2 "30 - 59", modify
label def age_lbl 3 "60+", modify
save "std_pop.dta"

/*Computing the standardized rate ratio*/
webuse mortality, clear
distrate deaths population using std_pop, standstrata(age_category) by(nation) refrate(1) mult(1000)
Thank you,
Caroline