Basic epidemiologic analysis with Stata Biostatistics 212 Lecture 5.

Slides:



Advertisements
Similar presentations
M2 Medical Epidemiology
Advertisements

Using Excel Biostatistics 212 Lecture 4. Housekeeping Questions about Lab 3? –replace vs. recode Final Project Dataset! –“Housekeeping” commands vs. data.
EPID Introduction to Analysis and Interpretation of HIV/STD Data Confounding Manya Magnus, Ph.D. Summer 2001 adapted from M. O’Brien and P. Kissinger.
What is Interaction for A Binary Outcome? Chun Li Department of Biostatistics Center for Human Genetics Research September 19, 2007.
1 Confounding and Interaction: Part II  Methods to Reduce Confounding –during study design: »Randomization »Restriction »Matching –during study analysis:
Multinomial Logit Sociology 8811 Lecture 11 Copyright © 2007 by Evan Schofer Do not copy or distribute without permission.
Lecture 17: Regression for Case-control Studies BMTRY 701 Biostatistical Methods II.
Measures of Disease Association Measuring occurrence of new outcome events can be an aim by itself, but usually we want to look at the relationship between.
In previous lecture, we highlighted 3 shortcomings of the LPM. The most serious one is the unboundedness problem, i.e., the LPM may make the nonsense predictions.
Sociology 601 Class 28: December 8, 2009 Homework 10 Review –polynomials –interaction effects Logistic regressions –log odds as outcome –compared to linear.
Introduction to Logistic Regression. Simple linear regression Table 1 Age and systolic blood pressure (SBP) among 33 adult women.
Basic epidemiologic analysis with Stata
BIOST 536 Lecture 3 1 Lecture 3 – Overview of study designs Prospective/retrospective  Prospective cohort study: Subjects followed; data collection in.
BIOST 536 Lecture 9 1 Lecture 9 – Prediction and Association example Low birth weight dataset Consider a prediction model for low birth weight (< 2500.
Categorical Data Analysis: Stratified Analyses, Matching, and Agreement Statistics Biostatistics March 2007 Carla Talarico.
Basic epidemiologic analysis with Stata Biostatistics 212 Lecture 5.
Confounding, Effect Modification, and Stratification.
Biostat Didactic Seminar Series Analyzing Binary Outcomes: Analyzing Binary Outcomes: An Introduction to Logistic Regression Robert Boudreau, PhD Co-Director.
Stratification and Adjustment
Logistic Regression. Outline Review of simple and multiple regressionReview of simple and multiple regression Simple Logistic RegressionSimple Logistic.
Analysis of Categorical Data
Concepts of Interaction Matthew Fox Advanced Epi.
Making a figure, dates, and other advanced topics Biostatistics 212 Lecture 6.
Biostatistics Case Studies 2005 Peter D. Christenson Biostatistician Session 4: Taking Risks and Playing the Odds: OR vs.
Basic epidemiologic analysis with Stata Biostatistics 212 Lecture 5.
Evidence-Based Medicine 3 More Knowledge and Skills for Critical Reading Karen E. Schetzina, MD, MPH.
Making a figure with Stata or Excel Biostatistics 212 Lecture 7.
EPI 811 – Work Group Exercise #2 Team Honey Badgers Alex Montoye Kellie Mayfield Michele Fritz Anton Frattaroli.
Biostatistics Case Studies Peter D. Christenson Biostatistician Session 5: Analysis Issues in Large Observational Studies.
Amsterdam Rehabilitation Research Center | Reade Multiple regression analysis Analysis of confounding and effectmodification Martin van de Esch, PhD.
Organizing a project, making a table Biostatistics 212 Lecture 7.
Organizing a project, making a table Biostatistics 212 Session 5.
Basic epidemiologic analysis with Stata Part II Biostatistics 212 Lecture 6.
Basic epidemiologic analysis with Stata Biostatistics 212 Lecture 5.
Introduction to Logistic Regression Rachid Salmi, Jean-Claude Desenclos, Alain Moren, Thomas Grein.
Basic Biostatistics Prof Paul Rheeder Division of Clinical Epidemiology.
October 15. In Chapter 19: 19.1 Preventing Confounding 19.2 Simpson’s Paradox 19.3 Mantel-Haenszel Methods 19.4 Interaction.
Organizing a project, making a table Biostatistics 212 Lecture 7.
April 4 Logistic Regression –Lee Chapter 9 –Cody and Smith 9:F.
MBP1010 – Lecture 8: March 1, Odds Ratio/Relative Risk Logistic Regression Survival Analysis Reading: papers on OR and survival analysis (Resources)
Analytical epidemiology Disease frequency Study design: cohorts & case control Choice of a reference group Biases Alain Moren, 2006 Impact Causality Effect.
Making Tables and Figures with Stata Biostatistics 212 Lecture 6.
Biostat 200 Lecture 8 1. The test statistics follow a theoretical distribution (t stat follows the t distribution, F statistic follows the F distribution,
Lecture 18 Ordinal and Polytomous Logistic Regression BMTRY 701 Biostatistical Methods II.
BIOST 536 Lecture 1 1 Lecture 1 - Introduction Overview of course  Focus is on binary outcomes  Some ordinal outcomes considered Simple examples Definitions.
Case Control Study : Analysis. Odds and Probability.
11/20091 EPI 5240: Introduction to Epidemiology Confounding: concepts and general approaches November 9, 2009 Dr. N. Birkett, Department of Epidemiology.
1 Multivariable Modeling. 2 nAdjustment by statistical model for the relationships of predictors to the outcome. nRepresents the frequency or magnitude.
Confounding and effect modification Epidemiology 511 W. A. Kukull November
POPLHLTH 304 Regression (modelling) in Epidemiology Simon Thornley (Slides adapted from Assoc. Prof. Roger Marshall)
1 Introduction to Modeling Beyond the Basics (Chapter 7)
Conditional Logistic Regression Epidemiology/Biostats VHM812/802 Winter 2016, Atlantic Veterinary College, PEI Raju Gautam.
Exact Logistic Regression
1 Ordinal Models. 2 Estimating gender-specific LLCA with repeated ordinal data Examining the effect of time invariant covariates on class membership The.
Introduction to Biostatistics, Harvard Extension School, Fall, 2005 © Scott Evans, Ph.D.1 Contingency Tables.
Birthweight (gms) BPDNProp Total BPD (Bronchopulmonary Dysplasia) by birth weight Proportion.
Bandit Thinkhamrop, PhD. (Statistics) Department of Biostatistics and Demography Faculty of Public Health Khon Kaen University, THAILAND.
Measures of disease frequency Simon Thornley. Measures of Effect and Disease Frequency Aims – To define and describe the uses of common epidemiological.
Logistic Regression APKC – STATS AFAC (2016).
Discussion: Week 4 Phillip Keung.
Lecture 18 Matched Case Control Studies
Introduction to Logistic Regression
Jeffrey E. Korte, PhD BMTRY 747: Foundations of Epidemiology II
Effective Feedback, Rubrics, and Grading
Problems with infinite solutions in logistic regression
Evaluating Effect Measure Modification
Discussion Week 1 (4/1/13 – 4/5/13)
Common Statistical Analyses Theory behind them
Effect Modifiers.
Presentation transcript:

Basic epidemiologic analysis with Stata Biostatistics 212 Lecture 5

Housekeeping Pickup your Lab 1’s… Questions about Lab 3 or Lab 4? –Boolean statements and missing values –Protect/unprotect demo No answer keys to be posted Forum – useful? Who has “viewed” a response and gotten an answer? Extra credit puzzle Final Project – by the last session you should: –Have dataset imported into Stata –Clean up the variables you will use –Sketch out (paper and pencil) a table and a figure –Be ready to write analysis do files

Today... Stata as a tool for learning concepts Interaction and confounding with 2 x 2’s Stata’s “Epitab” commands Adjusting for many things at once Logistic regression Testing for trends

Stata: A tool for understanding theory Hands on vs. theoretical teaching –Use Stata to get your hands on the data See the dataset Write the command See the output Lab 1: Exposure to basic stats Today: Exposure to basic epi concepts –Confounding and interaction

Confounding and Interaction Practical questions –What is confounding? –What does it mean to “adjust” for something? –When to adjust and what to adjust for? –When to stratify? –What do the adjusted estimates mean?

An Example Does binge drinking cause atherosclerosis? RQ: Is there an association between self- reported binge drinking and presence of coronary calcium among young adults? –CARDIA Year 15 examination

An Example Yes! –RR = 1.9 (1.6 – 2.4), p<.001

An Example Yes! –RR = 1.9 (1.6 – 2.4), p<.001 Coronary calcium is present 1.9 times more commonly in persons who report binge drinking –But does binge drinking CAUSE atherosclerosis?

An Example Possible explanations* –Chance –Bias –Effect-cause –Confounding –Cause-effect * Hulley et al. Designing Clinical Research

An Example Possible explanations –Chancevery unlikely –Biaspossible – not focus here! –Effect-causeunlikely? –ConfoundingYES! –Cause-effect?

An Example Definition of a confounder

An Example Definition of a confounder –Associated with the predictor and a cause of the outcome (and NOT a mediator)

An Example Male gender Binge drinking Coronary calcium Male ?

An Example Male gender Now what do we do?? Binge drinking Coronary calcium Male ?

2 x 2 Tables Practical tools –“Contingency tables” are a 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 Example Coronary calcium Binge drinking OR = 2.1 (1.6 – 2.7) RR = 1.9 (1.6 – 2.4) Can we say that binge drinking CAUSES atherosclerosis?

2 x 2 Tables Is male gender a confounder? Binge drinking Coronary calcium Male ?

2 x 2 Tables Men more likely to binge –34% of men, 14% of women Men have more coronary calcium –15% of men, 7% of women

2 x 2 Tables Is it a mediator? –(intermediate step along the causal pathway) Binge drinking Coronary calcium Male ?

2 x 2 Tables Is it a mediator? –(intermediate step along the causal pathway) No Binge drinking Coronary calcium Male ?

2 x 2 Tables But what does confounding look like in contingency tables? And how do you adjust for it?

2 x 2 Tables But what does confounding look like in contingency tables? And how do you adjust for it? –Stratify –Examine strata-specific estimates (for interaction) –Combine estimates if appropriate (if no interaction) Weighted average of strata-specific estimates

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 …and then “combine” the estimates 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 How do we do this with Stata? –Tabulate – output not exactly what we want. –The “epitab” commands Stata’s answer to stratified analyses cs, cc csi, cci 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) cc cac binge

2 x 2 Tables Example of a crude association (unadjusted). cs cac binge | Binge pattern [>5 drinks| | on occasion] | | Exposed Unexposed | Total Cases | | 292 Noncases | | Total | | 3042 | | Risk | | | | | Point estimate | [95% Conf. Interval] | Risk difference | | Risk ratio | | Attr. frac. ex. | | Attr. frac. pop | | chi2(1) = Pr>chi2 =

2 x 2 Tables Example of Confounding. cs cac binge, by(male) male | RR [95% Conf. Interval] M-H Weight | | Crude | M-H combined | Test of homogeneity (M-H) chi2(1) = Pr>chi2 =

2 x 2 Tables Example of Effect Modification. cs cac modalc, by(racegender) racegender | RR [95% Conf. Interval] M-H Weight Black women | White women | Black men | White men | Crude | M-H combined | Test of homogeneity (M-H) chi2(3) = Pr>chi2 =

2 x 2 Tables Inmediate commands –csi, cci –No dataset required – just 2x2 cell frequencies csi a b c d csi (for cac binge)

Multivariable adjustment Binge drinking appears to be associated with coronary calcium –Association partially due to confounding by gender What about race? Age? SES? Smoking?

Multivariable adjustment manual stratification # 2x2 tables Crude association1 Adjust for gender2 Adjust for gender, race4 Adjust for gender, race, age68 Adjust for “” + income, education816 Adjust for “” + “” + smoking2448

Multivariable adjustment cs command cs command –Does manual stratification for you Lists results from every strata Tests for overall homogeneity Adjusted and crude results –Demo cs cac binge, by(male black age)

Multivariable adjustment cs command cs command –Does manual stratification for you Lists results from every strata Tests for overall homogeneity Adjusted and crude results –Demo cs cac binge, by(male black age) –Can’t interpret interactions!

Multivariable adjustment mhodds command mhodds allows you to look at specific interactions, adjusted for multiple covariates –Does same stratification for you –Adjusted results for each interaction variable –P-value for specific interaction (homogeneity) –Summary adjusted result Demo mhodds cac binge age, by(racegender)

Multivariable adjustment mhodds command mhodds allows you to look at specific interactions, adjusted for multiple covariates –Does same stratification for you –Adjusted results for each interaction variable –P-value for specific interaction (homogeneity) –Summary adjusted result Demo mhodds cac binge age, by(racegender) But strata get thin!

Multivariable adjustment logistic command Assumes logit model –Await biostats class for details! –Coefficients estimated, no actual stratification –Continuous variables used as they are

Multivariable adjustment logistic command Basic syntax: logistic outcomevar [predictorvar1 predictorvar2 predictorvar3…]

Multivariable adjustment logistic command If using any categorical predictors: logistic outcomevar [i.catvar var2…] Creates “dummy variables” on the fly If you forget, Stata won’t know they are categorical, and you’ll get the wrong answer!

Multivariable adjustment logistic command Demo logistic cac binge logistic cac binge male logistic cac binge male black logistic cac binge male black age logistic cac binge male black age i.smoke logistic cac binge##i.racegender age i.smoke logistic cac modalc##racegender

Multivariable adjustment logistic command Demo. logistic cac binge male black age i.smoke Logistic regression Number of obs = 3036 LR chi2(6) = Prob > chi2 = Log likelihood = Pseudo R2 = cac | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval] binge | male | black | age | | smoke | 1 | |

logistic command interaction demo. logistic cac modalc##racegender age i.smoke Logistic regression Number of obs = 2795 LR chi2(10) = Prob > chi2 = Log likelihood = Pseudo R2 = cac | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval] modalc | | racegender | 2 | | | | modalc#| racegender | 1 2 | | | | age | | smoke | 1 | |

Multivariable adjustment logistic command Pro’s –Provides all OR’s in the model –Accepted approach ( mhodds rarely used by statisticians) –Can deal with continuous variables (like age) –Better estimation for large models? Con’s –Interaction testing more cumbersome, less automatic –More assumptions –Harder to test for trends

Multivariable adjustment Format for linear regression, and other types of regression is the same as for logistic regression, except for the initial command: regress outcomevar [predictorvar1 predictorvar2 predictorvar3…] ologit outcomevar [predictorvar1 predictorvar2 predictorvar3…] etc

For trends in a dichotomous variable with “higher” categories of an ordinal categorical variable. tabodds cac alccat alccat | cases controls odds [95% Conf. Interval] | <1 | | | Test of homogeneity (equal odds): chi2(3) = Pr>chi2 = Score test for trend of odds: chi2(1) = Pr>chi2 = Testing for trends tabodds command

Adjustment for multiple variables possible. tabodds cac alccat, adjust(age male black) Mantel-Haenszel odds ratios adjusted for age, male and black alccat | Odds Ratio chi2 P>chi2 [95% Conf. Interval] | <1 | | | Score test for trend of odds: chi2(1) = Pr>chi2 = Testing for trends tabodds command

Approaching your analysis Number of potential models/analyses is daunting –Where do you start? How do you finish? My suggestion –Explore –Plan definitive analysis, make dummy tables/figures –Do analysis (do/log files), fill in tables/figures –Show to collaborators, reiterate prn –Write paper

Summary Make sure you understand confounding and interaction with 2x2 tables in Stata 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 and trends is more difficult

In lab today… Lab 5 –Epi analysis of coronary calcium dataset –Walks you through evaluation of confounding and interaction Judgment calls – often no right answer. Focus on reasoning! Reminder – put your answers as comments in the do file * 15c – 15%, p<.001

Next week Tables and Figures