Basic epidemiologic analysis with Stata Biostatistics 212 Lecture 5
Housekeeping Turning in Lab assignments: –“ PletcherMark_Lab2.do” “Window management” in Stata 9 Questions about Lab 2? Lab 3: do today, due 10/25/05 Lab 4 now available
Housekeeping Time to start thinking about Final Projects! –What data will you use? –Start cleaning, exploring, planning tables and figures
Today... What’s the difference between epidemiologic and statistical analysis? Interaction and confounding with 2 x 2’s Stata’s “Epitab” commands
Epi vs. Biostats Epidemiologic analysis – Interpreting clinical research data in the context of scientific knowledge Biostatistical analysis – Evaluating the role of chance
Epi vs. Biostats Epi –Confounding, interaction, and causal diagrams. –What to adjust for? –What do the adjusted estimates mean? A B C ABC
2 x 2 Tables “Contingency tables” are the traditional analytic tool of the epidemiologist Outcome Exposure ab cd OR = (a/b) /(c/d) = ad/bc RR = a/(a+b) / c/(c+d)
2 x 2 Tables Example Coronary calcium Binge drinking OR = 2.1 (1.6 – 2.7) RR = 1.9 (1.6 – 2.4)
2 x 2 Tables There is a statistically significant association, but is it causal? Does male gender confound the association? Binge drinking Coronary calcium Male
2 x 2 Tables First, stratify… CAC Binge CAC Binge CAC Binge In menIn women RR = 1.94 ( ) (34%)(14%) (15%)(7%) RR = 1.57 ( )RR = 1.50 ( )
2 x 2 Tables …compare strata-specific estimates… (they’re about the same) CAC Binge CAC Binge In menIn women (34%)(14%) (15%)(7%) RR = 1.57 ( )RR = 1.50 ( )
2 x 2 Tables …compare to the crude estimate CAC Binge CAC Binge CAC Binge In menIn women RR = 1.94 ( ) (34%)(14%) (15%)(7%) RR = 1.57 ( )RR = 1.50 ( )
2 x 2 Tables …and then adjust the summary estimate CAC Binge CAC Binge In menIn women RR = 1.50 ( )RR = 1.57 ( ) RRadj = 1.51 ( )
Binge CAC Binge CAC Binge In menIn women (34%)(14%) (15%)(7%) RR = 1.57 ( )RR = 1.50 ( ) RR = 1.94 ( ) RRadj = 1.51 ( )
2 x 2 Tables Tabulate – output not exactly what we want. The “epitab” commands –Stata’s answer to stratified analyses cs, cc, ir csi, cci, iri tabodds, mhodds
2 x 2 Tables Example – demo using Stata cs cac binge cs cac binge, by(male) cs cac modalc cs cac modalc, by(racegender)
2 x 2 Tables Example – demo using Stata cc cac binge
2 x 2 Tables Epitab subtleties –ir command Rate ratios, adjusted etc Related to poisson regression –Intermediate commands – csi, cci, iri No dataset required – just 2x2 cell frequencies csi a b c d csi (for cac binge)
Summary Stare at stratified 2x2 analyses until you get it! Epitab commands are a great way to explore your data –Emphasis on interaction Immediate commands (e.g. csi ) are very useful – just watch out for the b c switch!
Next week Testing for trend Adjusting for many things at once Logistic regression Lab 4 –Epi analysis of coronary calcium dataset –More practice with Do files –Moderately long