Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Regresin Logstica
Frida Coaquira
El modelo logstico
Probabilidad de un suceso en funcin de los valores de una
variable
1
P(S/X)
0.8
P(S/X=15)=0.924
0.6
0.4
0.2
10
15
20
25
P(S/X)
0.8
Y=y1
0.6
Y=y3
Y=y2
0.4
0.2
X
5
10
15
20
25
P(S/X,Y)
1
0.75
20
0.5
0.25
15
0
0
10
10
20
30 0
5
1
1 e ( 0 1 X )
P( S / X )
e ( 0 1 X )
P(S / X )
P( S / X )
0 1 X
Log
P( S / X )
6
P ( S / X x2 ) P ( S / X x1 ) P ( S / X x2 ) P ( S / X x1 )
P ( S / X x2 ) / P ( S / X x1 )
OR
P ( S / X x2 ) / P ( S / X x1 )
P ( S / X x1 )
e ( 0 1 x1 )
P ( S / X x1 )
1 ( x2 x1 )
OR
P ( S / X x2 )
e ( 0 1 x2 )
P ( S / X x2 )
Odds ratio (estimacin del riesgo relativo) asociado
a un cambio de x2 a x1
Ejemplo
Ejemplo
Valor interno
0
1
Variables en la ecuacin
Paso
a
1
EDAD
Constante
B
,244
-10,579
E.T.
,059
2,796
Wald
17,289
14,318
gl
1
1
Sig.
,000
,000
Exp(B)
1,276
,000
P( S / edad )
OR e
0.24
OR e
0.24*5
1
1 e
1.276
3.32
( 10.58 0.24*edad )
OR e
0.24*(e2 e1 )
10
P( S / X )
1
1 e ( 0 1 X1 2 X 2 ... n X n )
P( S / X )
e ( 0 1 X1 2 X 2 ... n X n )
P( S / X )
P( S / X )
0 1 X 1 2 X 2 ... n X n
Log
P(S / X )
11
P ( S / X i xi )
( 0 1 X 1 2 X 2 ... i xi n X n )
e
P ( S / X i xi )
P( S / X i x j )
P( S / X i x j )
( 0 1 X 1 2 X 2 ... i x j n X n )
P( S / X i xi ) / P ( S / X i xi )
i ( xi x j )
OR
e
P(S / X i x j ) / P(S / X i x j )
OR correspondiente a la estimacin del RR cuando X pasa de x i a xj
12
Ejemplo
13
Resultados
Codificaciones de variables categricas
SEXO
Hombre
Mujer
Frecuencia
59
52
Codificaci
n de
parmetr
(1)
os
1,000
,000
Variables en la ecuacin
Paso
a
1
SEXO(1)
X1
X2
Constante
B
,451
,253
,319
-8,086
E.T.
,418
,110
,114
2,697
Wald
1,164
5,277
7,852
8,988
gl
1
1
1
1
Sig.
,281
,022
,005
,003
Exp(B)
1,569
1,288
1,376
,000
14
Interpretacin
Variables en la ecuacin
Paso
a
1
SEXO(1)
X1
X2
Constante
B
,451
,253
,319
-8,086
E.T.
,418
,110
,114
2,697
Wald
1,164
5,277
7,852
8,988
gl
1
1
1
1
Sig.
,281
,022
,005
,003
Exp(B)
1,569
1,288
1,376
,000
OR ( H / M ) 1.57
Seleccin de variables
Variables en la ecuacin
Paso
a
1
SEXO(1)
X1
X2
Constante
B
,451
,253
,319
-8,086
E.T.
,418
,110
,114
2,697
Wald
1,164
5,277
7,852
8,988
gl
Sig.
,281
,022
,005
,003
1
1
1
1
Exp(B)
1,569
1,288
1,376
,000
Paso
a
1
X1
X2
Constante
B
,267
,309
-8,111
E.T.
,110
,113
2,701
Wald
5,917
7,501
9,019
gl
1
1
1
Sig.
,015
,006
,003
Exp(B)
1,306
1,362
,000
Modelo final
Variables en la ecuacin
Paso
a
1
X1
X2
Constante
B
,267
,309
-8,111
E.T.
,110
,113
2,701
Wald
5,917
7,501
9,019
gl
1
1
1
Sig.
,015
,006
,003
Exp(B)
1,306
1,362
,000
P(S / X )
1
1 e ( 8.11 0.267 X 1 0.309 X 2 )
X 1 x1
e 1x1 2 x2 e 0.267( 23 21) 0.309( 65.5) 1.99
OR
X 2 x2
17
18