CICLO)DE)METODOLOGIA)2 MODELOS
•Los$modelos$de$regresión$permiten$predecir$el$
valor$de$una$variable$Y$a$partir$de$una$o$mas$
variables$explicativas$X.
INTRODUCCION)a)los)MODELOS)de •Veremos$como$ejemplo.
REGRESION • la$regresión$lineal$y
• la$regresión$logística
Departamento de Métodos Cuantitativos
Facultad de Medicina
Universidad de la República
1 2
REGRESION(LINEAL(SIMPLE(
•Esta&técnica&permite&describir&la&eventual&relación&
lineal entre&&dos&variables&&continuas.
•A&diferencia&de&la&correlación&lineal&aquí&se&analizan&
los&cambios&que&ocurren&en&una&cierta&variable&Y&(de&
respuesta&o&dependiente)&en&relación&a&los&cambios&
REGRESION(LINEAL(SIMPLE( ocurridos&en&una&cierta&variable&X&(explicativa&o&
independiente&).
•El&objetivo&final&es&estimar&o&predecir&el&valor&de&“y”&
asociado&a&un&determinado&valor&de&“x”
3 4
REGRESION(LINEAL(SIMPLE( REGRESION(LINEAL(SIMPLE(
Variabilidad(global((sin(tomar(en(cuenta(la(EG)
5 6
REGRESION(LINEAL(SIMPLE( REGRESION(LINEAL(SIMPLE(
Variabilidad(global((sin(tomar(en(cuenta(la(EG) 7
Para$cada$EG$la$dispersión$es$menor 8
REGRESION(LINEAL(SIMPLE( REGRESION(LINEAL(SIMPLE(
9 10
REGRESION(LINEAL(SIMPLE( REGRESION(LINEAL(SIMPLE(
xi, ,
xi, ,
residuo
x 11 12
REGRESION(LINEAL(SIMPLE( REGRESION(LINEAL(SIMPLE(
Como$se$calculan$los$coeficientes?
13 14
REGRESION(LINEAL(SIMPLE( COMO$EVALUO$EL$MODELO$
yi
Variación Residual
(respecto de la regresión)
Total
yˆi
Explicada
y (debida a reg)
15 16
VariacionTotal = Regresion + residual
COMO$EVALUO$EL$MODELO$ COMO$EVALUO$EL$MODELO$
n
" (y ! yˆ )
i i
2
MCErr = i =1
n!2
n
" (yˆ ! y )
i
2
VariacionTotal = Regresion + residual MCReg = i =1
1
n n n
" (y ! y ) = " (yˆ ! y ) + " (y ! yˆ )
2 2 2 MC#respecto
i i i i a#la#regresión#
i =1 i =1 i =1
Como podría comparar estas dos Varianzas? (residuos)
SCT SC Err
SC Reg
COMO$EVALUO$EL$MODELO$ COMO$EVALUO$EL$MODELO$
n
" (y ! yˆ ) i i
2
MCReg
MCErr = i =1
n
n!2
" (yˆ ! y ) i
2
MCReg = i =1 MCReg
1 VariacionTotal = Regresion + residual
MCErr
MC#respecto
a#la#regresión#
MCRe
F= (residuos)
MCErr MCErr
COMO$EVALUO$EL$MODELO$ REGRESION(LINEAL(SIMPLE(
ANOVAb
Suma>de Media
Modelo cuadrados gl cuadrática F Sig.
1 Regresión 386.867 1 386.867 152.947 .000a
Residual 247.883 98 2.529
Total 634.750 99
a.> Variables>predictoras:>(Constante),>gestage
b.> Variable>dependiente:>headcirc
MC#respecto
a#la#regresión#
2.75 (residuos)
Concluyo que la Edad gestacional (GESTAGE) es Se#usa#el#estadístico#t#y#se#decide#respecto#de#Ho
22
un predictor del perimetro craneal
REGRESION(LINEAL(SIMPLE( REGRESION(LINEAL(SIMPLE(
Se#usa#el#estadístico#t#y#se#decide#respecto#de#la#Ho
23 Se#decide#el#rechazo#de#la#Ho 24
REGRESION(LINEAL(SIMPLE( REGRESION(LINEAL(SIMPLE(
Que significan las suposiciones ?
25 26
REGRESION(LINEAL(SIMPLE( REGRESION(LINEAL(SIMPLE(
27 28
REGRESION(LINEAL(SIMPLE( REGRESION(LINEAL(SIMPLE(
R2= SCReg SCReg
SCT
SCT
SC Err
n n n
" (y ! y ) = " (yˆ ! y ) + " (y ! yˆ )
i =1
i
2
i =1
i
2
i =1
i i
2
29 30
REGRESION(LINEAL(SIMPLE( REGRESION(LINEAL(SIMPLE(
31 32
REGRESION(LINEAL(SIMPLE( REGRESION(LINEAL(SIMPLE(
Gráfico((de(residuos(
Consideraciones+finales+de+la+Regresión+lineal+simple:
4Describe+la+relación+lineal+entre+un+variable+dependiente+
continua++y+una+variable+explicativa
4Tiene+algunos+supuestos+para+su+uso
4Se+vieron+algunas+herramientas+para+verificar+estos+
supuestos
4Existe+un+coeficiente+para+medir+al+bondad+del+ajuste
33 34
REGRESION(LINEAL(MULTIPLE REGRESION(LINEAL(MULTIPLE
Situación)problema:) yˆ = 8.3080 + 0.4487 * EG + 0.0047 * Peso
Deseo)explicar)el)resultado)de)la)variable)Y)a)través) EG = Edad _ gestacional
de)varias)variables)explicativas)X.)
Peso = Peso _ al _ nacer
Ejemplo:)Supongamos)que)se)desea)predecir(la) y = Circunferencia _ craneal
circunferencia)craneal,)no)solo)a)través)de)la)edad)
• Como%se%interpretan%%los%coeficientes?.
gestacional,)sino)a)partir)del)peso)al)nacer también.)
• Esto%será%tratado%en%la%próxima%clase.
35
REGRESION(LINEAL(
Bibliografía+recomendada:
• Bioestadística,para,ciencias,de,la,salud.,
Daniel,W.
• Principles of,Biostatistics.,M.,Pagano,y,K.,
Gauvreau.,Harvard,University.,Ed.,Duxbury.