# Confidence interval on a standardized risk difference

For an assignment (M.Sc. Epidemiology), I need to calculate a C.I. on a standardized risk difference (RD). To be more precise, I have 2 dichotomous variables, age (younger/older) and gender (m/f), thus yielding 4 stratum-specific RD estimates as regards to a certain exposure and outcome.

Any hints on how to do this would be appreciated (either mathematically or through an existing function in R -- I haven't found any in R's common epi packages).

• For epidemiological stuff, I would also recommend Frank Harrell's Hmisc R package. – chl Feb 10 '12 at 12:49

## 1 Answer

For the calculation of basic epidemiologic estimates in a pretty neat, intuitive way that's considerably easier than R but surprisingly powerful, you cannot beat EpiSheet (link is an Excel file) by Ken Rothman. It's a simple Excel file and yet does an amazing amount.

It will, for example, in the "Risk Data" tab, give you the 90, 95 and 99% Confidence Intervals of the pooled mantel-haenszel Risk Difference, along with the P-value testing RD = 0 and the homogeneity p-value for as many as 12 strata.

There's also a tab for standardization that will do both relative risk and risk difference.

The magic is, if you don't care about the formulas, you don't need to. But if you do, they're all there, and you can back construct them from the Excel sheet.

• That's indeed a neat spreadsheet, thanks for the resource. The one thing missing is that I can't specify weights for the strata, unless using rate data (which I don't). We're asked to calculate a RD for a hypothetical population which would have an equal number of people in each of the 4 strata. – Dominic Comtois Feb 10 '12 at 6:16
• @dominic999 And what data do you have now? – Fomite Feb 10 '12 at 6:25
• Risk data (event counts, denominators being people at risk) – Dominic Comtois Feb 10 '12 at 6:31
• @dominic999 Equal strata? Unequal strata? Do you have the actual numbers, so you could up and down weight the strata yourself by hand? – Fomite Feb 10 '12 at 6:35