Presentation is loading. Please wait.

Presentation is loading. Please wait.

Basic epidemiologic analysis with Stata Part II Biostatistics 212 Lecture 6.

Similar presentations


Presentation on theme: "Basic epidemiologic analysis with Stata Part II Biostatistics 212 Lecture 6."— Presentation transcript:

1 Basic epidemiologic analysis with Stata Part II Biostatistics 212 Lecture 6

2 Housekeeping Questions on Lab 3, Excel Extra credit puzzler Lab 4 – last Lab before Final Project –Due November 8 th –Email DO file to Scott at bio212ucsf@yahoo.com Final project –Due December 6th

3 Today... Adjusting for many things at once Logistic regression Testing for trends Extra time for Lab 4?

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

5 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

6 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)

7 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!

8 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)

9 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 so thin!

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

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

12 Multivariable adjustment logistic command If using any categorical predictors: xi: 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!

13 Multivariable adjustment logistic command Demo logistic cac binge logistic cac binge male logistic cac binge male black logistic cac binge male black age xi: logistic cac binge male black age i.smoke

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

15 Testing for trend Alcohol consumption can be a lot or a little –Does association increase with larger amounts of consumption? –(no j-shaped curve) Test of trend? –Look through epitab suite

16 Testing for trends tabodds command chi2 test of trend –tabodds cac alccat –Look at output Adjustment for multiple variables possible –tabodds cac alccat, adjust(age male black)

17 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

18 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 and trends is more difficult…

19 Reminder Bring your dataset (cleaned) in two weeks!


Download ppt "Basic epidemiologic analysis with Stata Part II Biostatistics 212 Lecture 6."

Similar presentations


Ads by Google