Escolar Documentos
Profissional Documentos
Cultura Documentos
Miércoles 10 de octubre
Carmen Le Foulon
• Modelo poblacional: y = β0 + β1 x1 + β2 x2 + µ
1
Regresión lineal múltiple
• Modelo poblacional: y = β0 + β1 x1 + β2 x2 + µ
2
Ejemplo regresión lineal múltiple
3
Cuadro 1: Estadı́sticas descriptivas datos
4
Porcentaje hogares con agua potable y ELF
5
Porcentaje hogares con agua potable y DEM
6
DEM y ELF
7
Controlando por
8
Controlando por
9
Regresión lineal múltiple
10
Una variable explicativa
13
Estimación MCO
14
Estimación por MCO
Dependent variable:
PorcAg
ELF −19.17
DEM 5.33
Constant 58.96
Observations 30
15
Propiedades algebraicas
16
Propiedades algebraicas: Caso dos variables explicativas
17
Propiedades algebraicas: ejemplo
18
Propiedades algebraicas caso general
19
Bondad de ajuste: R 2
Definimos:
Pn
Suma Cuadrados Totales: SCT = i=1 (yi − ȳ )2
Pn
Suma Cuadrados Explicados: SCE = i=1 (ŷi − ȳ )2
Pn
Suma Cuadrados Residuales: SCR = i=1 (ŷi − yi )2
SCE SCR
R2 = =1−
SCT SCT
20
R 2 vs R̄ 2
Definimos:
(1 − R 2 ) ∗ (n − 1)
R̄ 2 = 1 −
(n − k − 1)
21
Volviendo a nuestro ejemplo
Cuadro 3: Resultados
Dependent variable:
PorcAg
ELF −19.17
DEM 5.33
Constant 58.96
Observations 30
R2 0.71
Adjusted R2 0.69
22
Propiedades estimadores: Supuestos Gauss-Markov
23
Varianza estimadores
Caso 2 variables explicativas
σ2
V (βˆ2 ) = P
(x2i − x̄2 )2 ∗ (1 − R22 )
x2i = d0 + d1 x1i
24
Varianza estimadores
Caso 2 variables explicativas
σ2
V (βˆ2 ) = P
(x2i − x̄2 )2 ∗ (1 − R22 )
Tres componentes:
(x2i − x̄2 )2
P
2. Variabilidad de x2 :
25
Dos variables explicativas
σ2
V (βˆ2 ) = P
(x2i − x̄2 )2 ∗ (1 − R22 )
27
Varianza estimadores: caso general
σ2
V (β̂j ) = P
(xji x¯j )2 ∗ (1 − Rj2 )
28
Volviendo a nuestro ejemplo
Cuadro 4: Resultados
Dependent variable:
PorcAg
ELF −19.17
(8.54)
DEM 5.33
(0.83)
Constant 58.96
(5.89)
Observations 30
R2 0.71
Adjusted R2 0.69
Residual Std. Error 10.25 (df = 27)
29
Resultado regresión multivariada
ˆ = −19,17, se = 8,54
• βELF
ˆ = 5,33, se = 0,83
• βDEM
• ¿Cómo los interpretamos?
• ¿Dónde entra el ceteris paribus?
• ¿Cómo se calculó el error estándar de los estimadores?
30
Interpretación y ceteris paribus
31
Interpretación y ceteris paribus
ˆ = 5,33, se = 0,83
• βDEM
• Cómo cambia el porcentaje de hogares con agua potable si DEM
aumenta 2.5 - una desviación estándar ...
• 4PorcAg = βDEMˆ ∗ 4DEM
• 4PorcAg = 5,33 ∗ 2,5 = 13,32
• Es decir, subir el nivel de DEM en 2.5, en promedio aumenta el
porcentaje de hogares con agua potable en 13.32, manteniendo el
nivel de ELF constante.
32
Varianza estimadores:V (βˆ1 )
σˆ2
V (β̂1 ) = P ¯ )2 ∗ (1 − R 2 )
(ELFi ELF ELF
SCR 2837,422
σˆ2 = = = 105,08
(n − (k + 1)) (30 − 3)
P ¯ )2 = 1,666987
(ELFi − ELF
Se estima: ELFi = d0 + d1 DEMi , el R 2 de esta regresión es: 0,1359,
2
por lo tanto RELF = 0,1359.
105,08
Ası́: V (βˆ1 ) = = 72,94976
1,666987 ∗ (1 − 0,1359)
q
desv (βˆ1 ) = V (βˆ1 ) = 8,54
33
Inferencia: test de un parámetro
Test de significancia estadı́stica
Ası́,
(β̂j − βj )
∼ N (0, 1)
desv (β̂j )
34
Test de significancia estadı́stica
SCR
σˆ2 =
(n − (k + 1))
(β̂j − βj )
∼ t − Student(n−k−1)
se(β̂j )
Nota: n − (k + 1) = n − k − 2
35
Test de significancia estadı́stica
• Supuestos
• Modelo poblacional PorcAgi = β0 + β1 ELFi + β2 DEMi + µi
• supuestos Gauss-Markov más normalidad errores
• H0 : βELF = 0
• Ha : βELF 6= 0
(β̂ELF − βELF )
∼ tStudent(30−2−1)
se(β̂ELF )
• Test estadı́stico
(−19,17 − 0)
= −2,2447
8,54
• Valor p: Prob(t > |2,447|)
• t ∼ t − Student(30−3) , por lo que Prob(t > |2,447|) = 0,0332
• Conclusión: Se rechaza H0 .
36
Test de significancia estadı́stica
37
Volviendo a nuestro ejemplo
Cuadro 5
Dependent variable:
PorcAg
ELF −19.17∗∗
(8.54)
DEM 5.33∗∗∗
(0.83)
Constant 58.96∗∗∗
(5.89)
Observations 30
R2 0.71
Adjusted R2 0.69
Residual Std. Error 10.25 (df = 27)
F Statistic 33.19∗∗∗ (df = 2; 27)
∗ ∗∗ ∗∗∗
Note: p<0.1; p<0.05; p<0.01
38