1 / 19

Basic epidemiologic analysis with Stata Part II

Basic epidemiologic analysis with Stata Part II. Biostatistics 212 Lecture 6. 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. Today.

Download Presentation

Basic epidemiologic analysis with Stata Part II

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Basic epidemiologic analysis with StataPart II Biostatistics 212 Lecture 6

  2. Housekeeping • Questions on Lab 3, Excel • Extra credit puzzler • Lab 4 – last Lab before Final Project • Due November 8th • 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 adjustmentmanual stratification # 2x2 tables Crude association 1 Adjust for gender 2 Adjust for gender, race 4 Adjust for gender, race, age 68 Adjust for “” + income, education 816 Adjust for “” + “” + smoking 2448

  6. Multivariable adjustmentcs 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 adjustmentcs 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 adjustmentmhodds 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 adjustmentmhodds 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 adjustmentlogistic command • Assumes logit model • Await biostats class for details! • Coefficients estimated, no actual stratification • Continuous variables used as they are

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

  12. Multivariable adjustmentlogistic 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 adjustmentlogistic 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 adjustmentlogistic 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 trendstabodds 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!

More Related