Presentation is loading. Please wait.

Presentation is loading. Please wait.

Adjusting for extraneous factors Topics for today More on logistic regression analysis for binary data and how it relates to the Wolf and Mantel- Haenszel.

Similar presentations


Presentation on theme: "Adjusting for extraneous factors Topics for today More on logistic regression analysis for binary data and how it relates to the Wolf and Mantel- Haenszel."— Presentation transcript:

1 Adjusting for extraneous factors Topics for today More on logistic regression analysis for binary data and how it relates to the Wolf and Mantel- Haenszel estimates of a common odds ratios Interpreting logistic regression analysis Estimating a common risk ratio in the presence of a stratification factor. Connection to Poisson regression. Readings Jewell Chapter 9

2 Stratified analysis for binary data Data from the ith stratum: DNot D Eaiai bibi Not Ecici didi Variance formulae in Jewell Chapter 9

3 Regression-based stratified analysis for Berkeley data data berkeley; input stratum male a b ; cards; 11 512 313 1 0 89 19 21 353 207 20 17 8 31 120 205 30 202 391 41 138 279 40 131 244 51 53 138 50 94 299 61 22 351 60 24 317 run; data berkeley; set berkeley; n=a+b; proc genmod; class stratum; model a/n=male stratum/dist=binomial; run;

4 Stratified analysis Standard 95% Conf Chi- Parameter DF Estimate Error Limits Square Pr > ChiSq Intercept 1 -2.6246 0.1577 -2.9337 -2.3154 276.88 <.0001 male 1 -0.0999 0.0808 -0.2583 0.0586 1.53 0.2167 stratum 1 1 3.3065 0.1700 2.9733 3.6396 378.38 <.0001 stratum 2 1 3.2631 0.1788 2.9127 3.6135 333.12 <.0001 stratum 3 1 2.0439 0.1679 1.7149 2.3729 148.24 <.0001 stratum 4 1 2.0119 0.1699 1.6788 2.3449 140.18 <.0001 stratum 5 1 1.5672 0.1804 1.2135 1.9208 75.44 <.0001 stratum 6 0 0.0000 0.0000 0.0000 0.0000.. Scale 0 1.0000 0.0000 1.0000 1.0000 Wolf estimate: -0.0746 SE= 0.0822 CI: (-0.2357, 0.0866) Mantel-Haenszel (have to take logs of this estimate): -0.1002 CI: (-0.2931, 0.0615) Lets talk about the rest of these regression results … what do they mean?

5 Interpreting the logistic regression model for the Berkeley data We are fitting the following model: Based on the fitted model, we can predict the admission probabilities in each cell

6 Observed and predicted values for Berkeley Data GenderDeptLogit of admit probability Predicted prob Observed prob N Female 1-2.6246+3.3065=.6819.6682%108 Male 1-2.6246 -0.0999 +3.3065=.5820.6462%825 Female 2-2.6246+3.2631=.6385.6568%25 Male 2-2.6246 -0.0999 +3.2631=63%560 Female 3-2.6246+ 2.043934%593 Male 3-2.6246 -0.0999 + 2.0439=37%325 Female 4-2.6246 +2.011935%375 Male 4-2.6246 -0.0999 +2.0119=33%417 Female 5-2.6246+ 1.567224%393 Male 5-2.6246 -0.0999 + 1.5672=28%191 Female 6-2.6246.077%341 Male 6-2.6246 -0.0999 =.066%373

7 More on the Berkeley logistic regression analysis In addition to providing an estimate of the overall gender effect, the logistic regression analysis allows us to compare admission rates between the departments. Based on the observed data, what is the log odds ratio for admission to department 5 versus department 6 for females? What about for males? What about department 1 versus department 6 for males? Females?

8 Another example We can add additional factors into the logistic regression model so as to obtain an estimate of the log-odds ratio, adjusting for these additional factors. Example, smoking in the Epilepsy study. Lets look in SAS: proc freq ; table one3*cig2 /chisq; run;

9 Epilepsy data in SAS

10 Standard Wald 95% Confidence Chi- Parameter DF Estimate Error Limits Square Pr > ChiSq Intercept 1 -3.1396 0.2229 -3.5765 -2.7028 198.41 <.0001 DRUG 1 1 1.0384 0.2876 0.4748 1.6020 13.04 0.0003 DRUG 2 1 -0.2944 0.6275 -1.5243 0.9355 0.22 0.6390 DRUG 3 0 0.0000 0.0000 0.0000 0.0000.. Scale 0 1.0000 0.0000 1.0000 1.0000 Standard Wald 95% Confidence Chi- Parameter DF Estimate Error Limits Square Pr > ChiSq Intercept 1 -3.3872 0.2435 -3.8644 -2.9100 193.55 <.0001 DRUG 1 1 1.0712 0.2939 0.4952 1.6472 13.29 0.0003 DRUG 2 1 -0.3596 0.6337 -1.6016 0.8824 0.32 0.5704 DRUG 3 0 0.0000 0.0000 0.0000 0.0000.. CIG2 1 1.0721 0.3131 0.4585 1.6857 11.73 0.0006 Scale 0 1.0000 0.0000 1.0000 1.0000

11 Why don’t drug estimates change much?? Hint – look at association between drug and smoking proc freq ; table one3*cig2 /chisq; run;

12 Relative Risks We’ve talked about estimating odds ratios while adjusting for another factor. Several approaches: 1.Cochran-Mantel-Haenszel test 2.Wolf estimate of the adjusted logodds ratio 3.Mantel-Haenszel estimate of adjusted odds ratio 4.Logistic regression Lets turn now to analogous consideration for risk ratios or relative risks

13 Example from Jewell Table 9.2 Weight in pounds Behavior type CHDNo CHDRR (log RR) <=150A222532.520 B10305(.924) 150-160A212352.297 B10270(.832) 160-170A292971.347 B21297(.298) 170-180A472482.281 B19253(.825) 180+A593782.700 B19361(.993) Relationship between behavior (type A vs type B personality) and coronary heart disease events (see p82 in Jewell for description). Unadjusted RR was 2.2 with 95% CI of (1.72, 2.87). Since weight is important, we need to adjust for it too

14 Wolf’s adjusted relative risk

15 Mantel-Haenszel adjusted relative risk

16 CHD example Jewell table 9.7 provides the weights for the Wolf and Mantel- Haenszel methods Lets look at using Poisson regression to do the adjustment.

17 Fitting the CHD model in SAS data chd; input weight behavior a b; cards; 1 122253 1010305 2121235 2010270 3129297 3021297 4147248 4019253 5159378 5019361 Run; data cdh; set chd; lnn=log(a+b); proc genmod; model a=behavior/dist=poisson offset=lnn; proc genmod; class weight; model a=behavior weight/dist=poisson offset=lnn; run; Notice the inclusion of the offset term corresponding to log of the sample size in each cell

18 SAS results Unadjusted Adjusted How do we interpret the weight coefficients?

19 Lets analyze the arsenic data in SAS data mlung; input village conc age atrisk events; cards; 1 0 22.5 2956638 14 1 0 27.5 2175046 26 ……………………… 35 544 57.5 208 0 35 544 62.5 179 1 35 544 67.5 152 0 35 544 72.5 139 0 35 544 77.5 61 0 35 544 82.5 59 0 ………………….. 43 934 67.5 154 2 43 934 72.5 87 0 43 934 77.5 30 0 43 934 82.5 41 0 run; data mlung; set mlung; latrisk=log(atrisk); proc genmod; class conc; model events= conc /dist=poisson offset=latrisk; where conc=0 | conc>900; run; proc genmod; class age conc; model events= conc age /dist=poisson offset=latrisk; where conc=0 | conc>900; run;

20 Results Unadjusted analysis Adjusted analysis Why does the concentration effect change? How do we interpret the age effects? How to add in all the concentrations?


Download ppt "Adjusting for extraneous factors Topics for today More on logistic regression analysis for binary data and how it relates to the Wolf and Mantel- Haenszel."

Similar presentations


Ads by Google