You are on page 1of 23

(Logistic Regression Analysis)

()
()




( , 2546)
2
1. Binary Logistic Y 2 (Dichotomous
Variable)
1
Y
0

1
Y
0

2. Multinomial Logistic Y 2

191
1
2
Y
3

Y Y = 1, 2, 3, 4, 5
Y=1 , ..., Y=5
Y Y = 1, 2, 3, 4, 5 Y=1
, Y=2 , ..., Y=5

( : 2548)
1. Y 2 Y
0 1 Y = a + bX Y
0 1 0 1

0 1
2. Nonnormal Error Terms
Y 2 0 1 e
2 e

192
3. Nonconstant Error Variance
V(e) X) logistic Y 2
Y
V(e)

( , 2546)
1. ()

2.

( , 2546)


1. Xs Dichotomous ( 2 )
(Interval Scale) (Ratio Scale)
2. E(e) = 0
3. eI ej
4. eI Xi
5. Multicolinearity
5
2
1.
2.
n
n 30 p p

193
( , 2548)

0 1 X
e
( 0 1 X )
1 e
1
or Pr ob(event )
( 0 1 X )
1 e
Pr ob(event )

0 1

X
e (natural logarithms) 2.718


ez
Pr ob(event )
1 e z
z
e
1
or Pr ob(event )
1 e z

Z 0 1 X 1 2 X 2 ... p X p

Pr ob(noevent ) 1 Pr ob(event )



Y Y 2
maximum-likelihood (iterative algorithm)

(Brown,
1980 cited in norusis, 1990: , 2541)

194




53 serum acid phosphatase (
) (stage) (grade)
X-ray
53
SPSS
LOGISTIC REGRESSION VARIABLES = dependent WITH independents.

Parameter estimates for the logistic regression model

LOGISTIC REGRESSION VARIABLES = dependent WITH independents.

Variable
AGE
ACID
XRAY
GRADE
STAGE
Constant

Variables in the Equation


B
S.E.
Wald
df
Sig
R
-.0693
.0579
1.4320
1
.2314
0000
.0243
.0132
3.4229
1
.0643
.1423
2.0453
.8072
6.4207
1
.0113
.2509
.7614
.7708
.9758
1
.3232
.0000
1.5641
7740
4.0835
1
.0433
.1722
.0618
3.4599
.0003
1
.9357

Exp(B)
.9331
1.0246
7.7317
2.1413
4.7783

195
( B)
AGE, ACID,
XRAY,STAGE GRADE 3
(indicator variable) 0 1 XRAY 1 X-ray
STAGE 1 GRADE 1

Prob () = 1 / 1 + e z = 0.0618 - 0.0693 (AGE) + 0.0243 (ACID) + 2.0453 (XRAY)


+ 1.5641 (STAGE) + 0.7614 (GRADE)
66 serum acid phosphatase 48
0
z = 0.0618-0.0693(66)+0.0243(48) = -3.346
Prob() = 1 / 1+ e

-(-3.346)

= 0.0340


0.5
(goodness of fit ) ( , 2548)



-2 log
likelihood (-2LL) -2LL
100% likelihood 1 (-2LL) 0
Hosmer-Lemeshow goodness-of fit
case 10

196

case (Expected value : Ei ; i = 1,,10) 15
Ei = 1
10
Oi Ei 2
2

i 1

Ei

Ho :
Hosmer-Lemeshow
Ho

0 Wald statistic
Wald statistic
(categorical varible )
Wald statistic degree of freedom 1
AGE -0.0693 0.0579 ( S.E.) Wald
statistic (-0.0693 / 0.0579) 1.4322 Wald statistic
Sig. XRAY STAGE 0
.05
(partial correlation)


R statistic R -1 +1 R
likelihood R

197




odd (odd
odd
1 0.5/0.5 = 1 ) log odd (
logit)
log (Frob(event) / Prob(no event) = 0 1 X 1 2 X 2 ... p X p

log odd GRADE
0 1 log odd
0.76 odd log odd
odd
Pr ob(event ) 0 1X1 ... p X p 0 1X1 p X p

e
e e
..e
Pr
ob
(
noevent
)

e i odd i 1 i
1 odd i = 0 1
add GRADE 0 1 odd 2.14
Exp ( )
odd 60 seruma acid
phosphatase 62 X-ray 1 STAGE GRADE 0

Estimated prob () = 1 / 1 + e Z = 0.0618-0.0693(60)+0.0243(62)+2.0453(1)+0.7614(0)+1.5641(0)


= -0.54

198
Z 1 / 1 + e-(-0.54) = 0.37
0.37 0.63
odd
odds = Prob(event) / Prob(no event) = 0.37 / 1-0.37 = 0.59
log odd -0.53
(R2)
(R2)
logistic regression model (R2)
SPSS (R2) Cox&Snell Nahelkerke Pesudo
L(O)
Cox & SnellR2 1

L( B)

2/n

L(O) likelihood
L(B) likelihood
Negel ker ke R 2

Cox & SnellR 2


Cox & SnellR 2 max

R 2 max 1 [ L(O)]2 / n

()

1. Enter

Significance

2. forward : conditional Forward stepwise


likelihood ratio statistic
conditional parameter estimates

199
3. Forward : LR Forward stepwise
likelihood ratio statistic
maximum likelihood
4. Forward : Wald Forward stepwise
Wald
5. Backward : Conditional Backward stepwise
likelihood ratio statistic
Conditional parameter estimates
6. Backward : LR Backward
likelihood ratio statistic
maximum likelihood
7. Backward : Wald Backward stepwise
Wald

( , 2541)



dichotomous

(odd ratio)
(discriminant
analysis) (Homse, D.W. lememeshow, S., 1989)

200

1 ()
1
2
3 Logistic Response Function
pseudo R2 Wald Statistics
4
5 case

case
Xs

< 0.5 Y = 0
()

Y = 1
0.5
()
0.5 Cutting Score 0.7 0.4

0.5

201
Binary Logistic


11

POC parents occupation


)

(1 0

PED parents education (0 6, 9


12, 14, 16 18
)
PIN

parents income
(1
60,000 2, 3, 4 60,001-80,000 80,001-100,000
100,000 )

PEX parents expectation (6, 9 12,


14, 16 18
)
ACH achievement (
)
SCE students continuing education expectation
(1 0 )
SCE 2 0 1

202

Analyze Regression Binary Logistic

1

1. SCE box Dependent
2. POC, PED, PEX ACH, PIN box Co
3. method Enter
4.

203

2
2 PIN box Categorical
Covariates PIN

5.

1
3

3
Predicted Value Probabilities Group Membership
Residuals Unstandardized Standardized
Influences Cooks

204

4
Classification plots, Hosmer-Lemeshow goodness of-fit Casewise listing of
residuals
Cl for exp (B): 95%
Display At last step
7.
1-11

205
1
De pendent Variable Encoding
Original Value
no
study

Internal Value
0
1

1
SCE
1
SCE
0
2
Cate gorical Variables Codings

PIN

> 60000
60001-80000
80001-100000
<100000

Frequency
32
46
13
9

Parameter coding
(1)
(2)
1.000
.000
.000
1.000
.000
.000
.000
.000

(3)
.000
.000
1.000
.000

2
(Categorical Variables) 1 PIN

1 0 0 60,000
0 1 0 60,001-80,000
PIN
0 0 1 80,001-100,000
0 0 0 100,000

206
Block 0: Beginning Block

3
Classification Tablea,b
Predicted
SCE
Step 0

Observed
SCE

no
no
study

study
41
59

0
0

Overall Percentage

Percentage
Correct
.0
100.0
59.0

a. Constant is included in the model.


b. The cut value is .500

4
Variable s in the Equation

Step 0

Constant

B
.364

S.E.
.203

Wald
3.204

df
1

Sig.
.073

1
1
1
1
3
1
1
1
7

Sig.
.000
.000
.000
.000
.000
.000
.448
.001
.000

Exp(B)
1.439

5
Variable s not in the Equation
Step
0

Variables

Overall Statistics

POC
PED
PEX
ACH
PIN
PIN(1)
PIN(2)
PIN(3)

Score
14.044
14.183
52.372
43.441
30.891
22.489
.576
10.384
61.117

df

3-5
7-8 Block 0 Beginning Block Step 0
7
7
Step 0

207
Competitive 59
100% Fixed 41
50
0%

59
100 59%
100

Block 1: Method = Enter


Block 1: Method = Enter Block 0 Step 0
Block 1 7 POC,
PED, PEX, ACH, PIN (1), PIN (2) PIN (3)
6
Model Summary
Step
1

-2 Log
Cox & Snell
likelihood
R Square
50.397 a
.572

Nagelkerke
R Square
.772

a. Estimation terminated at iteration number


20 because maximum iterations has been
reached. Final solution cannot be found.

Model (Goodness of fit) 2Log Likelihood (-2LL)


50.397
Cox & Snell R2 = .572
R2 .772
77.2

208
7
Hosmer and Le meshow Te st
Step
1

Chi-square
8.560

df
7

Sig.
.286

8
Contingency Table for Hosmer and Lemeshow Test

Step
1

1
2
3
4
5
6
7
8
9

SCE = no
Observed Expected
11
10.925
11
10.482
9
9.043
4
5.958
6
2.941
0
1.403
0
.242
0
.005
0
.000

SCE = study
Observed Expected
0
.075
0
.518
2
1.957
6
4.042
4
7.059
12
10.597
11
10.758
10
9.995
14
14.000

Total
11
11
11
10
10
12
11
10
14

7-8
Homer and Lemeshow Model
1
1 e W
0 1 POC 2 PEX 3 PEX 4 ACH 5 PIN (1) 6 PIN (2) 7 PIN (3)

P( Fixedcontract )

W=

H0:
H1:
Chi-Square 11 Chi-Square 8.560 Significance =
.286 > .05 Model

209
9
Omnibus Te sts of Model Coe fficients
Step 1

Chi-square
84.974
84.974
84.974

Step
Block
Model

df

Sig.
.000
.000
.000

7
7
7

9
Step 1 3 Chi-Square Model, Block Step

Model: Model Chi-Square


*
H0: 7
H1: 1
* Model Chi-Square =84.974 Sig. = .000 H0
1
10
Classification Tablea
Predicted
SCE
Step 1

Observed
SCE
Overall Percentage

a. The cut value is .500

no
no
study

study
33
8

8
51

Percentage
Correct
80.5
86.4
84.0

210
10

41
33 80.5%
59
51 86.4%
84.0%
\\
11
Variable s in the Equation

Step
a
1

POC
PED
PEX
ACH
PIN
PIN(1)
PIN(2)
PIN(3)
Constant

B
-.841
-.163
.663
2.156

S.E.
1.221
.148
.182
.941

-19.377
-17.381
1.133
5.172

12960.891
12960.891
16400.938
12960.892

Wald
.474
1.211
13.275
5.247
4.995
.000
.000
.000
.000

df
1
1
1
1
3
1
1
1
1

Sig.
.491
.271
.000
.022
.172
.999
.999
1.000
1.000

Exp(B)
.431
.849
1.940
8.632
.000
.000
3.105
176.331

95.0% C.I.for EXP(B)


Lower
Upper
.039
4.719
.635
1.136
1.358
2.771
1.365
54.592
.000
.000
.000

a. Variable(s) entered on step 1: POC, PED, PEX, ACH, PIN.

11 (B) PEX ACH


.05
Z 5.172 .663PEX 2.156 ACH

Z 5.172 .841POC .163PED .663PEX 2.156 ACH


19.377 PIN (1) 17.381PIN (2) 1.133PIN (3)

.
.
.

211


Prob () = 1/1+e-z

Z 5.172 .841POC .163PED .663PEX 2.156 ACH


19.377 PIN (1) 17.381PIN (2) 1.133PIN (3)

6 3.50
0
Z 5.172 .663(6) 2.156(3.50) 14.71

Prob () = 1 / 1 e (14.71) 0.99



0.5
1
2.15 45,000 1
0
Z 5.172 .841(1) 2.156(2.45) 19.377(1) 9.76

Prob () = 1 / 1 e ( 9.76) 0.00005



0.5

212

. 2546. SPSS for Windows. :


.
. 2540.

11.
.
. 2541 . :
.
. 2548 .. ().
http:// http://www.thairenu.com/logistic.htm [15 2549]

You might also like