Penn EPID 521 - Applied Logistic Regression Modeling

Unformatted text preview:

EP 521, Spring 2007, Vol II, Part 3 Copyright © 2006 Trustees of the University of Pennsylvania 1 §5 Applied Logistic Regression Modeling In this section, we shall use our knowledge of (a) the methods for writing regression models and solving for estimates, and (b) the theory of logistic regression, to work through a long example, from contingency table analysis through estimation of relevant contrasts. The application (OC use and MI) will also be instructive about identifying confounding and interaction in the framework of regression modeling. A goal is to be able to interpret the output of a logistic regression model and to make any contrast or comparison of interest in the presence of interaction Then, we go on to consider many issues in applied biostatistics: Model “fitting” or “building” (avoiding stepwise methods) Estimating predicted probabilities Regression diagnostics Missing Data Collinearity of Xs and how to deal with the problem Measurement error EP 521 Spring 2007, Vol II, Part 3 Copyright © 2006 Trustees of the University of Pennsylvania 2 §5.1 Extended Logistic Regression Example Using Stata: --Oral Contraceptives and MI Example we use: Oral Contraceptive Use in Relation to Myocardial Infarction (Shapiro S, et al. The Lancet. 1979 Apr 7, pp. 743-7) Always looks at the data first. Consider especially the risk factors cross classified. (1) Do they make clinical sense when looked at separately? (2) Are subjects in sufficient numbers so that they can be cross classified by the different x variables? Zeroes in the data can cause two problems: (1) We get poor (unstable) estimates because there are too few observations (2) It is impossible to obtain the estimate of interest because there are no data for that combination of factors (more about this issue later). Sparse data: (see next page) 0's = 7 1's= 8 2's= 2 Want to look at effects of OC use, age, and smoking simultaneously. Here are the data in moreEP 521, Spring 2007, Vol II, Part 3 Copyright © 2006 Trustees of the University of Pennsylvania 3 detail. Relation of Myocardial Infarction (MI) to Recent Oral Contraceptive (OC) Use1 According to Age and Cigarette Smoking Age groups Cigarette OC 25-29 30-34 35-39 40-44 45-49 smoking use MI Ctl2 MI Ctl MI Ctl MI Ctl MI Ctl Yes 0 25 0 13 0 8 1 4 3 2 No 1 106 0 175 3 153 10 165 20 155 1-24 (per day) Yes 1 25 1 10 1 11 0 4 0 1 No 0 79 5 142 11 119 21 130 42 96 25+ (per day) Yes 3 12 8 10 3 7 5 1 3 2 No 1 39 7 73 19 58 34 67 31 50 1. Last use within the month before admission. 2. Ctl: Control Source: Shapiro et al. 1979. FROM: Case Control Studies: Design, Conduct, and Analysis by James J. Schlesselman, Oxford University Press, New York, 1982 p. 186. EP 521 Spring 2007, Vol II, Part 3 Copyright © 2006 Trustees of the University of Pennsylvania 4 Always consider the 2 by 2 associations (of both y and x and x1 and x2) not to assess the simple association of y and x, but to assess whether there are any zeros in the data. We take an initial look at the outcome and the exposure of interest first. Will adjustment for confounders changes this association? cc mi ocuse ocuse Proportion | Exposed Unexposed | Total Exposed -----------------+------------------------+---------------------- Cases | 29 205 | 234 0.1239 Controls | 135 1607 | 1742 0.0775 -----------------+------------------------+---------------------- Total | 164 1812 | 1976 0.0830 | | | Pt. Est. | [95% Conf. Interval] |------------------------+---------------------- Odds ratio | 1.683939 | 1.102089 2.573581 (Cornfield) Attr. frac. ex. | .4061541 | .0926326 .6114364 (Cornfield) Attr. frac. pop | .0503353 | +----------------------------------------------- chi2(1) = 5.84 Pr>chi2 = 0.0156EP 521, Spring 2007, Vol II, Part 3 Copyright © 2006 Trustees of the University of Pennsylvania 5 Look at associations for potential confounders: Is age associated with outcome? . tab mi agecat, chi2 | agecat mi | 1 2 3 4 5 | Total -----------+-------------------------------------------------------+---------- 0 | 286 423 356 371 306 | 1742 1 | 6 21 37 71 99 | 234 -----------+-------------------------------------------------------+---------- Total | 292 444 393 442 405 | 1976 Pearson chi2(4) = 119.6814 Pr = 0.000 We can reverse the order of the “tab” command to obtain: | mi agecat | 0 1 | Total -----------+----------------------+---------- 25-29 | 286 6 | 292 30-39 | 423 21 | 444 35-39 | 356 37 | 393 40-44 | 371 71 | 442 45-49 | 306 99 | 405 -----------+----------------------+---------- Total | 1742 234 | 1976 Pearson chi2(4) = 119.6814 P<0.001 (Note: df= r-1 = 5-1=4) Example: OR (age 5 vs age 1) = (286*99)/(306*6) = 15.4. EP 521 Spring 2007, Vol II, Part 3 Copyright © 2006 Trustees of the University of Pennsylvania 6 Just showing the test for trend: -- if you suspect a trend. . nptrend mi, by(agecat) agecat score obs sum of ranks 1 1 292 260406 2 2 444 407694 3 3 393 379055.5 4 4 442 455351 5 5 405 450769.5 z = 10.73 (NOTE:10.732 = 115.1, similar to earlier result, This is df=1 test) P>|z| = 0.00 Note: nptrend will not allow weighted data [fw=count]. So, if data are in form of mi agecat count, must use the “expand” command to create binary data in the form mi agecat.EP 521, Spring 2007, Vol II, Part 3 Copyright © 2006 Trustees of the University of Pennsylvania 7 An alternative is “tabodds” which gives the appropriate statistical test for trend, when the factor (exposure) of interest is ordered. . tabodds mi agecat agecat cases controls odds [95% Conf. Interval] 25-29 6 286 0.02098 0.00935 0.04709 30-34 21 423 0.04965 0.03203 0.07695 35-39 37 356 0.10393 0.07408


View Full Document

Penn EPID 521 - Applied Logistic Regression Modeling

Download Applied Logistic Regression Modeling
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Applied Logistic Regression Modeling and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Applied Logistic Regression Modeling 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?