24
Basic epidemiologic analysis with Stata Biostatistics 212 Session 4

Basic epidemiologic analysis with Stata Biostatistics 212 Session 4

  • View
    232

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Basic epidemiologic analysis with Stata Biostatistics 212 Session 4

Basic epidemiologic analysis with Stata

Biostatistics 212

Session 4

Page 2: Basic epidemiologic analysis with Stata Biostatistics 212 Session 4

Today...

• What’s the difference between epidemiologic and statistical analysis?

• 2 x 2 tables, OR’s and RR’s

• Interaction and confounding with 2 x 2’s

• Stata’s “Epitab” commands

• An introduction to logistic regression

Page 3: Basic epidemiologic analysis with Stata Biostatistics 212 Session 4

Epi vs. Biostats

• Epidemiologic analysis – Interpreting clinical research data in the context of scientific knowledge

• Biostatistical analysis – Evaluating the role of chance

Page 4: Basic epidemiologic analysis with Stata Biostatistics 212 Session 4

Epi vs. Biostats

• Epi –Confounding, interaction, and causal diagrams.– What to adjust for?– What do the adjusted estimates mean?

A B

C

A BC

Page 5: Basic epidemiologic analysis with Stata Biostatistics 212 Session 4

2 x 2 Tables

• “Contingency tables” are the traditional analytic tool of the epidemiologist

Outcome

Exposure

+ -

+

-

a b

c d

OR = (a/b) /(c/d) = ad/bc

RR = a/(a+b) / c/(c+d)

Page 6: Basic epidemiologic analysis with Stata Biostatistics 212 Session 4

2 x 2 Tables

• Example

Coronary calcium

Binge drinking

+ -

+

-

106 585

186 2165

OR = 2.1 (1.6 – 2.7)

RR = 1.9 (1.6 – 2.4)

292 2750

2351

691

3042

Page 7: Basic epidemiologic analysis with Stata Biostatistics 212 Session 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

Page 8: Basic epidemiologic analysis with Stata Biostatistics 212 Session 4

2 x 2 Tables• First, stratify…

106 585

186 2165

CAC

Binge

+ -

+

-

89 374

118 801

CAC

Binge

+ -

+

-

17 211

68 1364

CAC

Binge

+ -

+

-

In men In women

RR = 1.94 (1.55-2.42)

(34%) (14%)

(15%) (7%)

RR = 1.57 (0.94-2.62)RR = 1.50 (1.16-1.93)

Page 9: Basic epidemiologic analysis with Stata Biostatistics 212 Session 4

2 x 2 Tables• …compare strata-specific estimates…

• (they’re about the same)

89 374

118 801

CAC

Binge

+ -

+

-

17 211

68 1364

CAC

Binge

+ -

+

-

In men In women

(34%) (14%)

(15%) (7%)

RR = 1.57 (0.94-2.62)RR = 1.50 (1.16-1.93)

Page 10: Basic epidemiologic analysis with Stata Biostatistics 212 Session 4

2 x 2 Tables• …compare to the crude estimate

106 585

186 2165

CAC

Binge

+ -

+

-

89 374

118 801

CAC

Binge

+ -

+

-

17 211

68 1364

CAC

Binge

+ -

+

-

In men In women

RR = 1.94 (1.55-2.42)

(34%) (14%)

(15%) (7%)

RR = 1.57 (0.94-2.62)RR = 1.50 (1.16-1.93)

Page 11: Basic epidemiologic analysis with Stata Biostatistics 212 Session 4

2 x 2 Tables• …and then adjust the summary estimate.

89 374

118 801

CAC

Binge

+ -

+

-

17 211

68 1364

CAC

Binge

+ -

+

-

In men In women

RR = 1.50 (1.16-1.93) RR = 1.57 (0.94-2.62)

RRadj = 1.51 (1.21-1.89)

Page 12: Basic epidemiologic analysis with Stata Biostatistics 212 Session 4

106 585

186 2165Binge

+ -

+

-

89 374

118 801

CAC

Binge

+ -

+

-

17 211

68 1364

CAC

Binge

+ -

+

-

In men In women

(34%) (14%)

(15%) (7%)

RR = 1.57 (0.94-2.62)RR = 1.50 (1.16-1.93)

RR = 1.94 (1.55-2.42)

RRadj = 1.51 (1.21-1.89)

Page 13: Basic epidemiologic analysis with Stata Biostatistics 212 Session 4

2 x 2 Tables

• Tabulate – output not exactly what we want.

• The “epitab” commands– Stata’s answer to stratified analyses

cs, cc, ircsi, cci, iritabodds, mhodds

Page 14: Basic epidemiologic analysis with Stata Biostatistics 212 Session 4

2 x 2 Tables

• Example – demo using Statacs cac binge

cs cac binge, by(male)

cs cac modalc

cs cac modalc, by(racegender)

Page 15: Basic epidemiologic analysis with Stata Biostatistics 212 Session 4

2 x 2 Tables

• Example – demo using Statacc cac binge

Page 16: Basic epidemiologic analysis with Stata Biostatistics 212 Session 4

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 106 186 585 2165 (for cac binge)

Page 17: Basic epidemiologic analysis with Stata Biostatistics 212 Session 4

2 x 2 Tables

• Adjustment vs. stratification– cs command does both– But can’t adjust for other stuff simultaneously

– Binge drinking and CAC, by male, adjusted for age and race?mhodds cac binge age black, by(male)

Page 18: Basic epidemiologic analysis with Stata Biostatistics 212 Session 4

2 x 2 Tables

• Testing for trend– tabodds

– tabodds cac alccat– tabodds cac alccat, adjust(age male black)

Page 19: Basic epidemiologic analysis with Stata Biostatistics 212 Session 4

2 x 2 Tables

• A modern approach – logistic regressionlogistic cac bingelogistic cac binge male

xi: logistic cac modalc i.racegender(xi: allows you to use create “dummy” variables on the fly…)

• Provides all OR’s in the model, but interactions more cumbersomexi: logistic cac i.racegender*modalcmhodds cac modalc, by(racegender)

Page 20: Basic epidemiologic analysis with Stata Biostatistics 212 Session 4

Summary

• Epitab commands are a great way to explore your data– Emphasis on interaction

• Logistic regression is a more general approach, ubiquitous, but testing for interactions is more difficult…

Page 21: Basic epidemiologic analysis with Stata Biostatistics 212 Session 4

Summary

• Immediate commands (e.g. csi) are very useful – just watch out for the b c switch!

• You’ll get more practice with this is Epi Methods.

Page 22: Basic epidemiologic analysis with Stata Biostatistics 212 Session 4

Lab this week

• Epidemiologic analysis of the coronary calcium – death dataset from Lab 1

• Moderately long

Page 23: Basic epidemiologic analysis with Stata Biostatistics 212 Session 4

To come…

• Lecture 5 – Tables with Excel, Word

• Lecture 6 – Figures with Stata, Excel

And time to work on your final project.

Page 24: Basic epidemiologic analysis with Stata Biostatistics 212 Session 4

See you on Thursday!

• Lab 4 due 11/16

• Bring a floppy disc to all labs!