Chapter 14 LOGISTIC REGRESSION, POISSON REGRESSION,AND GENERALIZED...

17
Chapter 14 LOGISTIC REGRESSION, POISSON REGRESSION,AND GENERALIZED LINEAR MODELS 14.3. No 14.4. a. E{Y } = [1 + exp(25 - .2X )] -1 b. 125 c. X = 150 : π = .993307149, π/(1 - π) = 148.41316 X = 151 : π = .994513701, π/(1 - π) = 181.27224 181.27224/148.41316 = 1.2214 = exp(.2) 14.5. a. E{Y } = [1 + exp(-20 + .2X )] -1 b. 100 c. X = 125 : π = .006692851, π/(1 - π)= .006737947 X = 126 : π = .005486299, π/(1 - π)= .005516565 005516565/.006737947 = .81873 = exp(-.2) 14.6. a. E{Y } = Φ(-25 + .2X ) b. 125 14.7. a. b 0 = -4.80751, b 1 = .12508, ˆ π = [1 + exp(4.80751 - .12508X )] -1 c. 1.133 d. .5487 e. 47.22 14.8. a. b 0 = -2.94964, b 1 = .07666, ˆ π = Φ(-2.94964 + .07666X ) b. b 0 = -3.56532, b 1 = .08227, ˆ π =1 - exp(- exp(-3.56532 + .08227X )) 14-1

Transcript of Chapter 14 LOGISTIC REGRESSION, POISSON REGRESSION,AND GENERALIZED...

Page 1: Chapter 14 LOGISTIC REGRESSION, POISSON REGRESSION,AND GENERALIZED …mathstat.carleton.ca/~smills/2008-9/STAT3503/Chpt14... ·  · 2008-12-15chapter 14 logistic regression, poisson

Chapter 14

LOGISTIC REGRESSION,POISSON REGRESSION,ANDGENERALIZED LINEAR MODELS

14.3. No

14.4. a. E{Y } = [1 + exp(25− .2X)]−1

b. 125

c. X = 150 : π = .993307149, π/(1− π) = 148.41316

X = 151 : π = .994513701, π/(1− π) = 181.27224

181.27224/148.41316 = 1.2214 = exp(.2)

14.5. a. E{Y } = [1 + exp(−20 + .2X)]−1

b. 100

c. X = 125 : π = .006692851, π/(1− π) = .006737947

X = 126 : π = .005486299, π/(1− π) = .005516565

005516565/.006737947 = .81873 = exp(−.2)

14.6. a. E{Y } = Φ(−25 + .2X)

b. 125

14.7. a. b0 = −4.80751, b1 = .12508, π̂ = [1 + exp(4.80751− .12508X)]−1

c. 1.133

d. .5487

e. 47.22

14.8. a. b0 = −2.94964, b1 = .07666,

π̂ = Φ(−2.94964 + .07666X)

b. b0 = −3.56532, b1 = .08227,

π̂ = 1− exp(− exp(−3.56532 + .08227X))

14-1

Page 2: Chapter 14 LOGISTIC REGRESSION, POISSON REGRESSION,AND GENERALIZED …mathstat.carleton.ca/~smills/2008-9/STAT3503/Chpt14... ·  · 2008-12-15chapter 14 logistic regression, poisson

14.9. a. b0 = −10.3089, b1 = .01892,

π̂ = [1 + exp(10.3089− .01892X)]−1

c. 1.019

d. .5243

e. 589.65

14.10. a. b0 = −6.37366, b1 = .01169,

π̂ = Φ(−6.37366 + .01169X)

b. b0 = −7.78587, b1 = .01344,

π̂ = 1− exp(− exp(−7.78587 + .01344X))

14.11. a.

j: 1 2 3 4 5 6pj: .144 .206 .340 .592 .812 .898

b. b0 = −2.07656, b1 = .13585

π̂ = [1 + exp(2.07656− .13585X)]−1

d. 1.1455

e. .4903

f. 23.3726

14.12. a&b.

j: 1 2 3 4 5 6pj: .112 .212 .372 .504 .688 .788

b0 = −2.6437, b1 = .67399

π̂ = [1 + exp(2.6437− .67399X)]−1

d. 1.962

e. .4293

f. 3.922

14.13. a. b0 = −4.73931, b1 = .067733, b2 = .598632,

π̂ = [1 + exp(4.73931− .067733X1 − .598632X2)]−1

b. 1.070, 1.820

c. .6090

14.14. a. b0 = −1.17717, b1 = .07279, b2 = −.09899, b3 = .43397

π̂ = [1 + exp(1.17717− .07279X1 + .09899X2 − .43397X3)]−1

b. exp(b1) = 1.0755, exp(b2) = .9058, exp(b3) = 1.5434

c. .0642

14.15. a. z(.95) = 1.645, s{b1} = .06676, exp[.12508± 1.645(.06676)],

14-2

Page 3: Chapter 14 LOGISTIC REGRESSION, POISSON REGRESSION,AND GENERALIZED …mathstat.carleton.ca/~smills/2008-9/STAT3503/Chpt14... ·  · 2008-12-15chapter 14 logistic regression, poisson

1.015 ≤ exp(β1) ≤ 1.265

b. H0 : β1 = 0, Ha : β1 6= 0. b1 = .12508, s{b1} = .06676, z∗ = .12508/.06676 =1.8736. z(.95) = 1.645, |z∗| ≤ 1.645, conclude H0, otherwise conclude Ha. Con-clude Ha. P -value=.0609.

c. H0 : β1 = 0, Ha : β1 6= 0. G2 = 3.99, χ2(.90; 1) = 2.7055. If G2 ≤ 2.7055,conclude H0, otherwise conclude Ha. Conclude Ha. P -value=.046

14.16. a. z(.975) = 1.960, s{b1} = .007877, exp[.01892±1.960(.007877)], 1.0035 ≤ exp(β1) ≤1.0350

b. H0 : β1 = 0, Ha : β1 6= 0. b1 = .01892, s{b1} = .007877, z∗ = .01892/.007877 =2.402. z(.975) = 1.960, |z∗| ≤ 1.960, conclude H0, otherwise conclude Ha. Con-clude Ha. P -value= .0163.

c. H0 : β1 = 0, Ha : β1 6= 0. G2 = 8.151, χ2(.95; 1) = 3.8415. If G2 ≤ 3.8415,conclude H0, otherwise conclude Ha. Conclude Ha. P -value=.004.

14.17. a. z(.975) = 1.960, s{b1} = .004772, .13585± 1.960(.004772),

.1265 ≤ β1 ≤ .1452, 1.1348 ≤ exp(β1) ≤ 1.1563.

b. H0 : β1 = 0, Ha : β1 6= 0. b1 = .13585, s{b1} = .004772, z∗ = .13585/.004772 =28.468. z(.975) = 1.960, |z∗| ≤ 1.960, conclude H0, otherwise conclude Ha.Conclude Ha. P -value= 0+.

c. H0 : β1 = 0, Ha : β1 6= 0. G2 = 1095.99, χ2(.95; 1) = 3.8415. If G2 ≤ 3.8415,conclude H0, otherwise conclude Ha. Conclude Ha. P -value= 0+.

14.18. a. z(.995) = 2.576, s{b1} = .03911, .67399± 2.576(.03911),

.5732 ≤ β1 ≤ .7747, 1.774 ≤ exp(β1) ≤ 2.170.

b. H0 : β1 = 0, Ha : β1 6= 0. b1 = .67399, s{b1} = .03911, z∗ = .67399/.03911 =17.23. z(.995) = 2.576, |z∗| ≤ 2.576, conclude H0, otherwise conclude Ha. Con-clude Ha. P -value= 0+.

c. H0 : β1 = 0, Ha : β1 6= 0. G2 = 381.62, χ2(.99; 1) = 6.6349. If G2 ≤ 6.6349,conclude H0, otherwise conclude Ha. Conclude Ha. P -value= 0+.

14.19. a. z(1−.1/[2(2)]) = z(.975) = 1.960, s{b1} = .02806, s{b2} = .3901, exp{20[.067733±1.960(.02806)]}, 1.29 ≤ exp(20β1) ≤ 11.64, exp{2[.5986 ± 1.960(.3901)]},.72 ≤exp(2β2) ≤ 15.28.

b. H0 : β2 = 0, Ha : β2 6= 0. b2 = .5986, s{b2} = .3901, z∗ = .5986/.3901 = 1.53.z(.975) = 1.96, |z∗| ≤ 1.96, conclude H0, otherwise conclude Ha. Conclude H0.P -value= .125.

c. H0 : β2 = 0, Ha : β2 6= 0. G2 = 2.614, χ2(.95; 1) = 3.8415. If G2 ≤ 3.8415,conclude H0, otherwise conclude Ha. Conclude H0. P -value= .1059.

d. H0 : β3 = β4 = β5 = 0, Ha : not all βk = 0, for k = 3, 4, 5. G2 = 2.438,χ2(.95; 3) = 7.81. If G2 ≤ 7.81, conclude H0, otherwise conclude Ha. ConcludeH0. P -value= .4866.

14-3

Page 4: Chapter 14 LOGISTIC REGRESSION, POISSON REGRESSION,AND GENERALIZED …mathstat.carleton.ca/~smills/2008-9/STAT3503/Chpt14... ·  · 2008-12-15chapter 14 logistic regression, poisson

14.20. a. z(1−.1/[2(2)]) = z(.975) = 1.960, s{b1} = .03036, s{b2} = .03343, exp{30[.07279±1.960(.03036)]}, 1.49 ≤ exp(30β1) ≤ 52.92, exp{25[−.09899±1.960(.03343)]},.016 ≤exp(2β2) ≤ .433.

b. H0 : β3 = 0, Ha : β3 6= 0. b3 = .43397, s{b3} = .52132, z∗ = .43397/.52132 =.8324. z(.975) = 1.96, |z∗| ≤ 1.96, conclude H0, otherwise conclude Ha. ConcludeH0. P -value= .405.

c. H0 : β3 = 0, Ha : β3 6= 0. G2 = .702, χ2(.95; 1) = 3.8415. If G2 ≤ 3.8415,conclude H0, otherwise conclude Ha. Conclude H0.

d. H0 : β3 = β4 = β5 = 0, Ha : not all βk = 0, for k = 3, 4, 5. G2 = 1.534,χ2(.95; 3) = 7.81. If G2 ≤ 7.81, conclude H0, otherwise conclude Ha. ConcludeH0.

14.21. a. X1 enters in step 1;

no variables satisfy criterion for entry in step 2.

b. X22 is deleted in step 1; X11 is deleted in step 2; X12 is deleted in step 3; X2 isdeleted in step 4; X1 is retained in the model.

c. The best model according to the AICp criterion is based on X1 and X2. AIC3 =42.6896.

d. The best model according to the SBCp criterion is based on X1. SBC2 = 46.2976.

14.22. a. X1 enters in step 1; X2 enters in step 2;

no variables satisfy criterion for entry in step 3.

b. X11 is deleted in step 1; X12 is deleted in step 2; X3 is deleted in step 3; X22 isdeleted in step 4; X1 and X2 are retained in the model.

c. The best model according to the AICp criterion is based on X1 and X2. AIC3 =111.795.

d. The best model according to the SBCp criterion is based on X1 and X2. SBC3 =121.002.

14.23.

j: 1 2 3 4 5 6Oj1: 72 103 170 296 406 449Ej1: 71.0 99.5 164.1 327.2 394.2 440.0Oj0: 428 397 330 204 94 51Ej0: 429.0 400.5 335.9 172.9 105.8 60.0

H0 : E{Y } = [1 + exp(−β0 − β1X)]−1,

Ha : E{Y } 6= [1 + exp(−β0 − β1X)]−1.

X2 = 12.284, χ2(.99; 4) = 13.28. If X2 ≤ 13.28 conclude H0, otherwise Ha. ConcludeH0.

14.24.

14-4

Page 5: Chapter 14 LOGISTIC REGRESSION, POISSON REGRESSION,AND GENERALIZED …mathstat.carleton.ca/~smills/2008-9/STAT3503/Chpt14... ·  · 2008-12-15chapter 14 logistic regression, poisson

j: 1 2 3 4 5 6Oj1: 28 53 93 126 172 197Ej1: 30.7 53.8 87.4 128.3 168.5 200.5Oj0: 222 197 157 124 78 53Ej0: 219.3 196.2 162.6 121.7 81.6 49.5

H0 : E{Y } = [1 + exp(−β0 − β1X)]−1,

Ha : E{Y } 6= [1 + exp(−β0 − β1X)]−1.

X2 = 1.452, χ2(.99; 4) = 13.28. If X2 ≤ 13.28 conclude H0, otherwise Ha. ConcludeH0.

14.25. a.

Class j π̂′Interval Midpoint nj pj

1 −1.1 - under −.4 −.75 10 .32 −.4 - under .6 .10 10 .63 .6 - under 1.5 1.05 10 .7

b.

i: 1 2 3 · · · 28 29 30rSPi

: −.6233 1.7905 −.6233 · · · .6099 .5754 −2.0347

14.26. a.

Class j π̂′Interval Midpoint nj pj

1 −2.80 - under −.70 −1.75 9 .2222 −.70 - under .80 .05 9 .5563 .80 - under 2.00 1.40 9 .778

b.

i: 1 2 3 · · · 25 26 27devi: −.6817 −.4727 −.5692 · · · 1.0433 −.8849 .7770

14.27. a.

Class j π̂′Interval Midpoint nj pj

1 −3.00 - under −1.10 −2.050 11 .2732 −1.10 - under .35 −.375 11 .1823 .35 - under 3.00 1.675 11 .818

b.

i: 1 2 3 · · · 31 32 33rSPi

: −.7584 −1.0080 .7622 · · · −.6014 1.3700 −.5532

14.28. a.

j: 1 2 3 4 5 6 7 8Oj1: 0 1 0 2 1 8 2 10Ej1: .2 .5 1.0 1.5 2.4 3.4 4.7 10.3Oj0: 19 19 20 18 19 12 18 10Ej0: 18.8 19.5 19.0 18.5 17.6 16.6 15.3 9.7

14-5

Page 6: Chapter 14 LOGISTIC REGRESSION, POISSON REGRESSION,AND GENERALIZED …mathstat.carleton.ca/~smills/2008-9/STAT3503/Chpt14... ·  · 2008-12-15chapter 14 logistic regression, poisson

b. H0 : E{Y } = [1 + exp(−β0 − β1X1 − β2X2 − β3X3)]−1,

Ha : E{Y } 6= [1 + exp(−β0 − β1X1 − β2X2 − β3X3)]−1.

X2 = 12.116, χ2(.95; 6) = 12.59. If X2 ≤ 12.59, conclude H0, otherwise concludeHa. Conclude H0. P -value = .0594.

c.

i: 1 2 3 · · · 157 158 159devi: −.5460 −.5137 1.1526 · · · .4248 .8679 1.6745

14.29 a.

i: 1 2 3 · · · 28 29 30hii: .1040 .1040 .1040 · · · .0946 .1017 .1017

b.

i: 1 2 3 · · · 28 29 30∆X2

i : .3885 3.2058 .3885 · · · 4.1399 .2621 .2621∆devi: .6379 3.0411 .6379 · · · 3.5071 .4495 .4495

Di: .0225 .1860 .0225 · · · .2162 .0148 .0148

14.30 a.

i: 1 2 3 · · · 25 26 27hii: .0968 .1048 .1044 · · · .0511 .0744 .0662

b.

i: 1 2 3 · · · 25 26 27∆X2

i : .2896 .1320 .1963 · · · .7622 .5178 .3774∆devi: .4928 .2372 .3445 · · · 1.1274 .8216 .6287

Di: .0155 .0077 .0114 · · · .0205 .0208 .0134

14.31 a.

i: 1 2 3 · · · 31 32 33hii: .0375 .0420 .0780 · · · .0507 .0375 .0570

b.

i: 1 2 3 · · · 31 32 33∆Xi: .5751 1.0161 .5809 · · · .3617 1.8769 .3061

∆dev2i : .9027 1.4022 .9031 · · · .6087 2.1343 .5246

Di: .0112 .0223 .0246 · · · .0097 .0366 .0093

14.32 a.

i: 1 2 3 · · · 157 158 159hii: .0197 .0186 .0992 · · · .0760 .1364 .0273

b.

i: 1 2 3 · · · 157 158 159∆X2

i : .1340 .1775 1.4352 · · · .0795 .6324 2.7200∆devi: .2495 .3245 1.8020 · · · .1478 .9578 2.6614

Di: .0007 .0008 .0395 · · · .0016 .0250 .0191

14.33. a. z(.95) = 1.645, π̂′h = .19561, s2{b0} = 7.05306, s2{b1} = .004457, s{b0, b1} =−.175353, s{π̂′h} = .39428, .389 ≤ πh ≤ .699

14-6

Page 7: Chapter 14 LOGISTIC REGRESSION, POISSON REGRESSION,AND GENERALIZED …mathstat.carleton.ca/~smills/2008-9/STAT3503/Chpt14... ·  · 2008-12-15chapter 14 logistic regression, poisson

b.

Cutoff Renewers Nonrenewers Total.40 18.8 50.0 33.3.45 25.0 50.0 36.7.50 25.0 35.7 30.0.55 43.8 28.6 36.7.60 43.8 21.4 33.3

c. Cutoff = .50. Area = .70089.

14.34. a. z(.975) = 1.960, s2{b0} = 19.1581, s2{b1} = .00006205, s{b0, b1} = −.034293

Xh π̂′h s{π̂′h}

550 .0971 .4538 .312 ≤ πh ≤ .728625 1.5161 .7281 .522 ≤ πh ≤ .950

b.

Cutoff Able Unable Total.325 14.3 46.2 29.6.425 14.3 38.5 25.9.525 21.4 30.8 25.9.625 42.9 30.8 37.0

c. Cutoff = .525. Area = .79670.

14.35. a. z(.975) = 1.960, π̂′h = −.04281, s2{b0} = .021824, s2{b1} = .000072174, s{b0, b1} =−.0010644, s{π̂′h} = .0783, .451 ≤ πh ≤ .528

b.

Cutoff Purchasers Nonpurchasers Total.15 4.81 71.54 76.36.30 11.70 45.15 56.84.45 23.06 23.30 46.27.60 23.06 23.30 46.27.75 48.85 9.64 52.49

c. Cutoff = .45 (or .60). Area = .82445.

14.36. a. π̂′h = −1.3953, s2{π̂′h} = .1613, s{̂π′h} = .4016, z(.95) = 1.645. L = −1.3953 −1.645(.4016) = −2.05597, U = −1.3953 + 1.645(.4016) = −.73463.L∗ = [1 + exp(2.05597)]−1 = .11345, U∗ = [1 + exp(.73463)]−1 = .32418.

b.

Cutoff Received Not receive Total.05 4.35 62.20 66.55.10 13.04 39.37 52.41.15 17.39 26.77 44.16.20 39.13 15.75 54.88

c. Cutoff = .15. Area = .82222.

14.38. a. b0 = 2.3529, b1 = .2638, s{b0} = .1317, s{b1} = .0792, µ̂ = exp(2.3529+ .2638X).

14-7

Page 8: Chapter 14 LOGISTIC REGRESSION, POISSON REGRESSION,AND GENERALIZED …mathstat.carleton.ca/~smills/2008-9/STAT3503/Chpt14... ·  · 2008-12-15chapter 14 logistic regression, poisson

b.

i: 1 2 3 · · · 8 9 10devi: .6074 −.4796 −.1971 · · · .3482 .2752 .1480

c.

Xh: 0 1 2 3Poisson: 10.5 13.7 17.8 23.2Linear: 10.2 14.2 18.2 22.2

e. µ̂h = exp(2.3529) = 10.516

P (Y ≤ 10 | Xh = 0) =10∑

Y =0

(10.516)Y exp(−10.516)

Y !

= 2.7× 10−5 + · · ·+ .1235 = .5187

f. z(.975) = 1.96, .2638± 1.96(.0792), .1086 ≤ β1 ≤ .4190

14.39. a. b0 = .4895, b1 = −1.0694, b2 = −.0466, b3 = .0095, b4 = .0086, s{b0} = .3369,s{b1} = .1332, s{b2} = .1200, s{b3} = .0030, s{b4} = .0043,

µ̂ = exp(.4895− 1.0694X1 − .0466X2 + .0095X3 + .0086X4)

b.

i: 1 2 3 · · · 98 99 100devi: −.4816 −.6328 .4857 · · · −.3452 .0488 −.9889

c. H0 : β2 = 0, Ha : β2 6= 0. G2 = .151, χ2(.95; 1) = 3.84. If G2 ≤ 3.84 concludeH0, otherwise Ha. Conclude H0.

d. b1 = −1.0778, s{b1} = .1314, z(.975) = 1.96, −1.0778 ± 1.96(.1314), −1.335 ≤β1 ≤ −.820.

14.40. E{Y } =exp(β0 + β1X)

1 + exp(β0 + β1X)

[exp(−β0 − β1X)

exp(−β0 − β1X)

]=

1

1 + exp(−β0 − β1X)

= [1 + exp(−β0 − β1X)]−1

14.41. Formula (14.26) holds for given observations Y1, Y2,... Yn. Assembling all terms witha given X value, Xj, we obtain:

y.j(β0 + β1Xj)− nj loge[1 + exp(β0 + β1Xj)]

since there are nj cases with X value Xj, of which y.j have value Yi = 1. There are(njy.j

)ways of obtaining these y.j 1s out of nj, all of which are equally likely. Hence,

in the log-likelihood function of the y.j, we must add loge

(njy.j

)to the above term for

given Xj :

loge

(njy.j

)+ y.j(β0 + β1Xj)− nj loge [1 + exp(β0 + β1Xj)]

Assembling the terms for all Xj, we obtain (14.34).

14.42. From (14.16) and (14.18), we have:

14-8

Page 9: Chapter 14 LOGISTIC REGRESSION, POISSON REGRESSION,AND GENERALIZED …mathstat.carleton.ca/~smills/2008-9/STAT3503/Chpt14... ·  · 2008-12-15chapter 14 logistic regression, poisson

πi =exp(π′)

1 + exp(π′)

Then:

1− π =1 + exp(π′)− exp(π′)

1 + exp(π′)= [1 + exp(π′)]−1

π

1− π=

exp(π′)1 + exp(π′)

× [1 + exp(π′)] = exp(π′)

Solving for π′ = F−1L (π) by taking logarithms of both sides yields the result.

14.43. From (14.26), we obtain:

∂2 loge L

∂β20

= −n∑

i=1

exp(β0 + β1Xi)

[(1 + exp(β0 + β1Xi)]2

∂2 loge L

∂β21

= −n∑

i=1

X2i exp(β0 + β1Xi)

[1 + exp(β0 + β1Xi)]2

∂2 loge L

∂β0∂β1

= −n∑

i=1

Xi exp(β0 + β1Xi)

[1 + exp(β0 + β1Xi)]2

Since these partial derivatives only involve the constants Xi, β0, and β1, the expecta-tions of the partial derivatives are the partial derivatives themselves. Hence:

−E

{∂2 loge L

∂β20

}= −g00 − E

{∂2 loge L

∂β0∂β1

}= −g01 = −g10

−E

{∂2 loge L

∂β21

}= −g11

and the stated matrix reduces to (14.51).

14.44.

[4.1762385 74.57465774.574657 1, 568.4817

]−1

=

[1.58597 −.075406−.075406 .0042228

]

14.45. E{Y } =γ0

1 + γ1 exp(γ2X)

Consider γ2 < 0 and γ1 > 0; as X →∞, E{Y } = π → 1 so that

1 = limX→∞

[γ0

1 + γ1 exp(γ2X)

]= γ0

Therefore, letting γ2 = −β1 and γ1 = exp(−β0) we have:

E{Y } =1

1 + exp(−β0 − β1X)=

exp(β0 + β1X)

1 + exp(β0 + β1X)

14.46. E{Y } = [1 + exp(−β0 − β1X1 − β2X2 − β3X1X2)]−1

π′(X1 + 1) = β0 + β1(X1 + 1) + β2X2 + β3(X1 + 1)X2

14-9

Page 10: Chapter 14 LOGISTIC REGRESSION, POISSON REGRESSION,AND GENERALIZED …mathstat.carleton.ca/~smills/2008-9/STAT3503/Chpt14... ·  · 2008-12-15chapter 14 logistic regression, poisson

π′(X1) = β0 + β1X1 + β2X2 + β3X1X2

π′(X1 + 1)− π′(X1) = loge(odds ratio) = β1 + β3X2

Hence the odds ratio for X1 is exp(β1 + β3X2). No.

14.47. 1− πi = exp

[− exp

(Xi − γ0

γ1

)]

−loge(1− πi) = exp

(Xi − γ0

γ1

)

Hence: loge[− loge(1− πi)] =Xi − γ0

γ1

= −γ0

γ1

+1

γ1

Xi = β0 + β1Xi

where β0 = −γ0

γ1

and β1 =1

γ1

.

14.48. a. X1 = ageSocioeconomic

status X2 X3

Upper 0 0Middle 1 0Lower 0 1

Sector X4

1 02 1

b0 = .1932, b1 = .03476, b2 = −1.9092, b3 = −2.0940, b4 = .9508,

b5 = .02633, b6 = .007144, b7 = −.01721, b8 = .004107, b9 = .4145,

where X′ = (1 X1 X2 X3 X4 X1X2 X1X3 X1X4 X2X4 X3X4)

b. H0 : β5 = β6 = β7 = β8 = β9 = 0, Ha : not all equalities hold.

G2 = .858, χ2(.99; 5) = 15.09. If G2 ≤ 15.09 conclude H0, otherwise concludeHa. Conclude H0. P -value = .973.

c. Retain socioeconomic status and age.

14.49. a.

j: 1 2 3 4 5Oj1: 6 4 13 15 16Ej1: 4.6 7.3 11.7 14.8 15.7Oj0: 14 16 7 5 2Ej0: 15.4 12.7 8.3 5.2 2.3nj: 20 20 20 20 18

H0 : E{Y } = [1 + exp(−β0 − β1X1 − β2X2 − β3X3)]−1,

Ha : E{Y } 6= [1 + exp(−β0 − β1X1 − β2X2 − β3X3)]−1.

X2 = 3.28, χ2(.95; 3) = 7.81. If X2 ≤ 7.81 conclude H0, otherwise Ha. ConcludeH0. P -value = .35.

b.

i: 1 2 3 · · · 96 97 98devi: .6107 .5905 −1.4368 · · · −.8493 −.7487 −1.0750

14-10

Page 11: Chapter 14 LOGISTIC REGRESSION, POISSON REGRESSION,AND GENERALIZED …mathstat.carleton.ca/~smills/2008-9/STAT3503/Chpt14... ·  · 2008-12-15chapter 14 logistic regression, poisson

d&e.

i: 1 2 3 · · · 96 97 98hii .0265 .0265 .0509 · · · .0305 .0316 .0410

∆X2i : .2106 .1956 1.9041 · · · .4479 .3341 .8156

∆devi: .3785 .3538 2.1613 · · · .7350 .5712 1.1891Di: .0014 .0013 .0255 · · · .0035 .0027 .0087

f.

Cutoff Savings Account No Savings Account Total.45 18.5 31.8 24.5.50 22.2 31.8 26.5.55 22.2 22.7 22.4.60 29.6 22.7 26.5

Cutoff = .55. Area = .766.

14.50. a.

Cutoff Savings Account No Savings Account Total.55 24.5 28.9 26.5

b.

Model Building CombinedData Set Data Set

b0: .3711 .3896s{b0}: .5174 .3493

b1: .03678 .03575s{b1}: .01393 .00961

b2: −1.2555 −1.1572s{b2}: .5892 .4095

b3: −1.9040 −2.0897s{b3}: .5552 .3967

c. z(.9833) = 2.128, exp[.03575± 2.128(.00961)], 1.015 ≤ exp(β1) ≤ 1.058,exp[−1.1572±2.128(.4095)], .132 ≤ exp(β2) ≤ .751, exp [−2.0897±2.128(.3967)],.053 ≤ exp(β3) ≤ .288

14.51. a. X1 = age, X2 = routine chest X-ray ratio, X3 = average daily census, X4 =number of nurses

b0 = −8.8416, b1 = .02238, b2 = .005645, b3 = .14721, b4 = −.10475, b5 =.0002529, b6 = −.001995, b7 = .0014375, b8 = −.000335, b9 = .0003912, b10 =−.00000519,

where

X′ = (1 X1 X2 X3 X4 X1X2 X1X3 X1X4 X2X3 X2X4 X3X4)

b. H0 : β5 = β6 = β7 = β8 = β9 = β10 = 0,

Ha : not all equalities hold. G2 = 7.45, χ2(.95; 6) = 12.59. If G2 ≤ 12.59 concludeH0, otherwise Ha. Conclude H0. P -value = .28

c. Retain age and average daily census.

14-11

Page 12: Chapter 14 LOGISTIC REGRESSION, POISSON REGRESSION,AND GENERALIZED …mathstat.carleton.ca/~smills/2008-9/STAT3503/Chpt14... ·  · 2008-12-15chapter 14 logistic regression, poisson

d. The best subset: X3, X6, X10, AIC4 = 59.6852;

The best subset: X10, SBC2 = 66.963.

14.52. a.

j: 1 2 3 4 5Oj1: 0 0 1 3 13Ej1: .1 .4 .9 2.3 13.3Oj0: 22 23 21 20 10Ej0: 21.9 22.6 21.1 20.7 9.7nj: 22 23 22 23 23

H0 : E{Y } = [1 + exp(−β0 − β1X1 − β3X3)]−1,

Ha : E{Y } 6= [1 + exp(−β0 − β1X1 − β3X3)]−1,

X2 = .872, χ2(.95; 3) = 7.81. If X2 ≤ 7.81 conclude H0, otherwise Ha. ConcludeH0. P -value = .832

b

i: 1 2 3 · · · 111 112 113devi: −.3166 −.1039 −.1377 · · · −.1402 .1895 −.0784

d & e.

i: 1 2 3 · · · 111 112 113hii .0168 .0056 .0074 · · · .0076 .0279 .0041

∆X2i : .0523 .0054 .0096 · · · .0100 .0186 .0031

∆devi: .1011 .0108 .0190 · · · .0197 .0364 .0062Di: .00030 .00001 .00002 · · · .00003 .00018 .000004

f.

Cutoff Affiliation No Affiliation Total.30 29.4 9.4 12.4.40 29.4 6.3 9.7.50 41.2 4.2 9.7.60 52.9 2.1 9.7

Cutoff = .40. Area = .923.

g. z(.95) = 1.645, π̂′h = .6622, s2{b0} = 17.1276, s2{b1} = .006744, s2{b3} =.000006687, s{b0, b1} = −.33241, s{b0, b3} = .0003495, s{b1, b3} = −.00004731,s{π̂′h} = .6193, −.35655 ≤ π′h ≤ 1.68095, .70 ≤ πh/(1− πh) ≤ 5.37

14.57. a. b1 =

33.249−1.905−.046−.039

.039−4.513−.088

.039−.085

, b2 =

12.387−.838−.016−.028

.016

.590.00008−.009−.097

, b3 =

13.505−.562−.095−.010

.020−.595−.011−.008−.044

14-12

Page 13: Chapter 14 LOGISTIC REGRESSION, POISSON REGRESSION,AND GENERALIZED …mathstat.carleton.ca/~smills/2008-9/STAT3503/Chpt14... ·  · 2008-12-15chapter 14 logistic regression, poisson

b. H0 : b13 = b23 = b33 = 0;

Ha: not all bk3 = 0, for k = 1, 2, 3. G2 = 2.34, conclude H0.

P -value=.5049.

c. G2 = 10.3, conclude H0. P -value=.1126.

d. NE = 1, NC = 0 : b1 =

−12.840.585.108.007

−.017.231.008.009.023

NE = 1, S = 0 : b1 =

−14.087.754.016.026

−.025.567.010.010.113

NE = 1,W = 0 : b1 =

−48.0203.014.060.012

−.0337.415.079

−.038.122

e&f. NE = 1, NC = 0 :

i: 1 2 3 · · · 58 59 60Devi: −1.137 .708 −1.200 · · · −.562 −1.406 .547∆X2

i : 1.061 .306 1.205 · · · .195 2.260 .347∆devi: 1.445 .523 1.591 · · · .339 2.550 .485

Di: .020 .003 .019 · · · .003 .085 .044

NE = 1, S = 0 :

i: 1 2 3 · · · 63 64 65Devi: −.327 .630 −1.153 · · · −.528 .696 −1.080∆X2

i : .058 .237 1.028 · · · .164 1.189 1.030∆devi: .110 .415 1.413 · · · .293 1.400 1.404

Di: .0003 .0021 .0103 · · · .002 .441 .035

NE = 1,W = 0 :

14-13

Page 14: Chapter 14 LOGISTIC REGRESSION, POISSON REGRESSION,AND GENERALIZED …mathstat.carleton.ca/~smills/2008-9/STAT3503/Chpt14... ·  · 2008-12-15chapter 14 logistic regression, poisson

i: 1 2 3 · · · 42 43 44Devi: −.3762 −.3152 .0177 · · · .0000 −.8576 .0000∆X2

i : .0936 .0852 .0002 · · · .0000 1.1225 .0000∆devi: .1618 .1336 .0003 · · · .0000 1.4135 .0000

Di: .0029 .0064 .0000 · · · .0000 .1903 .0000

14.58. a. b1 =

−20.8100−.0016−.5738−.2150

142.1400.3998.2751.4516.2236

−.0005

, b2 =

28.7900−.0013−.3878−.1253147.73−.2426

.3778

.1510−.6755−.0004

, b3 =

−18.4800−.0008−.0354−.189793.3700

.2884−.2055

.2979−.4803.00008

b.

Row Term log L(b) G2 P -value1 X5/X4 −189.129 51.074 .00002 X6 −178.009 28.834 .00003 X7 −166.716 6.248 .10014 X10/X5 −192.499 57.814 .00005 X11 −197.042 66.900 .00006 X12 −186.324 45.464 .00007 X13 −168.769 10.354 .01588 X14 −183.663 40.142 .00009 X15 −172.189 17.194 .0006

c. NE = 1, NC = 0 : b1 =

7.8100.0009.1208.9224

−107.4200−.3536

.4683−.62251.0985−.0002

14-14

Page 15: Chapter 14 LOGISTIC REGRESSION, POISSON REGRESSION,AND GENERALIZED …mathstat.carleton.ca/~smills/2008-9/STAT3503/Chpt14... ·  · 2008-12-15chapter 14 logistic regression, poisson

NE = 1, S = 0 : b1 =

−25.3800.0015.2399

−.0852−172.7000

.2126−.4522−.40861.7355.0006

NE = 1,W = 0 : b1 =

−48.7700.0054

1.95801.3413

−457.9000.0917

−.6156−.7196−.3703

.0005

d&e. NE = 1, NC = 0 :

i: 1 2 3 · · · 101 102 103Devi: −1.1205 .6339 −.0909 · · · −.6718 .0464 −.4253∆X2

i : 1.1715 6.5919 .0042 · · · .3024 .0011 .1067∆devi: 1.5536 6.7712 .0083 · · · .5006 .0022 .1929

Di: .0400 18.8671 .000 · · · .0059 .0000 .0014

NE = 1, S = 0 :

i: 1 2 3 · · · 122 123 124Devi: .6801 −.0030 .0542 · · · −.5644 −.4215 −.4334∆X2

i : 5.5413 .0000 .0015 · · · .2338 .1275 .1091∆devi: 5.7437 .0000 .0029 · · · .3797 .2123 .1985

Di: 11.2465 .0000 .0000 · · · .0083 .0047 .0012

NE = 1,W = 0 :

i: 1 2 3 · · · 87 88 89Devi: −.2713 .0000 −.0011 · · · .0713 −.2523 .0004∆X2

i : .0506 .0000 .0000 · · · .0027 .0795 .0000∆devi: .0867 .0000 .0000 · · · .0052 .1108 .0000

Di: .0018 .0000 .0000 · · · .0000 .0116 .0000

14-15

Page 16: Chapter 14 LOGISTIC REGRESSION, POISSON REGRESSION,AND GENERALIZED …mathstat.carleton.ca/~smills/2008-9/STAT3503/Chpt14... ·  · 2008-12-15chapter 14 logistic regression, poisson

14.59. a. b =

4.69707.5020−.0509−.0359

.0061−.0710−.0051

.3531−.1699

b. X3, orX4, or X6, or X7, or X8 can be dropped.

c. Drop X6, then X7, then X3, and then X4, then stop.

d. The result is as follows:

Variable Value CountY(1) 1 33 (Event)

0 64Total 97

Logistic Regression TablePredictor Coef SE Coef Z PConstant 3.767 2.208 1.71 0.088PSA -0.03499 0.02208 -1.59 0.113age -0.05548 0.03507 -1.58 0.114Capspen -0.2668 0.1498 -1.78 0.075

Response InformationVariable Value CountY(2) 1 76 (Event)

0 21Total 97

Logistic Regression TablePredictor Coef SE Coef Z PConstant 8.704 3.595 2.42 0.015PSA -0.06045 0.01944 -3.11 0.002age -0.08484 0.05253 -1.61 0.106Capspen -0.14496 0.08098 -1.79 0.073

Log-Likelihood = -32.633Test that all slopes are zero: G = 36.086, DF = 3, P-Value = 0.000

e&f. Y (1)

i: 1 2 · · · 95 96 97Devi: .8018 −.3651 · · · −.0233 −.0113 −.0012∆X2

i : .4036 .1476 · · · .0003 .0001 .0000∆devi: .6673 .1431 · · · .0005 .0001 .0000

Di: .0065 .0026 · · · .0000 .0000 .0000

14-16

Page 17: Chapter 14 LOGISTIC REGRESSION, POISSON REGRESSION,AND GENERALIZED …mathstat.carleton.ca/~smills/2008-9/STAT3503/Chpt14... ·  · 2008-12-15chapter 14 logistic regression, poisson

Y (2)

i: 1 2 · · · 95 96 97Devi: .1545 .3077 · · · −.0297 −.0031 −.0005∆X2

i : .0122 .0492 · · · .0004 .0000 .0000∆devi: .0240 .0960 · · · .0009 .0000 .0000

Di: .00004 .00033 · · · .00000 .00000 .00000

14.60. a. b =

−133.0400−123.4400

.00002.0014

−.5250.9014

1.1787.5412

−.3977.0585.0000.4336

b. X13, or X12, or X8, or X7 can be dropped.

c. Drop X12, then X13, then X8, then X7, then stop.

e&f. Y (1)

i: 1 2 · · · 520 521 522Devi: −.4904 −.1791 · · · −.0000 −.0143 −.0000∆X2

i : .1300 .0160 · · · .0000 .0000 .0000∆devi: .2423 .0322 · · · .0000 .0002 .0000

Di: .0003 .0000 · · · .0000 .0000 .0000

Y (2)

i: 1 2 · · · 520 521 522Devi: .0162 .2472 · · · −.2214 −.4205 −.0850∆X2

i : .0000 .0320 · · · .0250 .0940 .0040∆devi: .0003 .0616 · · · .0492 .1782 .0072

Di: .00000 .00007 · · · .00003 .00020 .00000

14.61. a. The estimated regression coefficents and their estimated standard deviations areas follows,

Poisson Regression

Coefficient Estimates

Label Estimate Std. Error

Constant 0.499446 0.176041

Cost 0.0000149508 2.854645E-6

Age 0.00672387 0.00296715

Gender 0.181920 0.0439932

Interventions 0.0100748 0.00380812

Drugs 0.193237 0.0126846

14-17