presentación de powerpoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat...
TRANSCRIPT
![Page 1: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/1.jpg)
(1,10)
(2,8)
(3,5) (4,5)
(5,2)
(6,3)
01
23
45
67
89
10
0 1 2 3 4 5 6 7 8 9 10x
y Fitted values
clear
input x y
1 10
2 8
3 5
4 5
5 2
6 3
end
gen str p="("+string(x)+ ","+string(y)+ ")"
graph twoway (scatter y x, mlabel(p) xline(3.5) yline(5.5) xlabel(0(1)10,grid) ylabel(0(1)10,grid)) (lfit y x)
list
![Page 2: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/2.jpg)
𝛽2𝑀𝐶𝑂 =
−26.5
17.5= −1.514286
𝛽1𝑀𝐶𝑂 = 5.5 − −1.514286 3.5 = 10.8
x y x-xmedia y-ymedia (x-xmedia)(y-ymedia) (x-xmedia)^2
1 10 -2.5 4.5 -11.25 6.25
2 8 -1.5 2.5 -3.75 2.25
3 5 -0.5 -0.5 0.25 0.25
4 5 0.5 -0.5 -0.25 0.25
5 2 1.5 -3.5 -5.25 2.25
6 3 2.5 -2.5 -6.25 6.25
Suma 21 33 0 0 -26.5 17.5
Media 3.5 5.5
![Page 3: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/3.jpg)
list, clean mean(*)
x y
1. 1 10
2. 2 8
3. 3 5
4. 4 5
5. 5 2
6. 6 3
Mean 3.5 5.5
𝑦𝑖 = 𝛽1 + 𝛽2𝑥𝑖
𝑥𝑖 = 𝑥Si
𝑦𝑖 = 𝛽1 + 𝛽2 𝑥 = 10.8 − 1.514286 × 3.5 = 5.5 = 𝑦
A partir del modelo estimado
𝑦𝑖 = 10.8 − 1.514286𝑥𝑖es decir
La recta de regresión pasa por . 𝑥, 𝑦
(1,10)
(2,8)
(3,5) (4,5)
(5,2)
(6,3)
(3.5,5.5)
01
23
45
67
89
10
0 1 2 3 4 5 6 7 8 9 10x
y Fitted values
clear
input x y
1 10
2 8
3 5
4 5
5 2
6 3
3.5 5.5
end
gen str p="("+string(x)+ ","+string(y)+ ")"
graph twoway (scatter y x, mlabel(p) xline(3.5) yline(5.5) xlabel(0(1)10,grid) ylabel(0(1)10,grid)) (lfit y x)
list
![Page 4: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/4.jpg)
x y x-xmedia y-ymedia (x-xmedia)(y-ymedia) (x-xmedia)^2 predicción de y predicción de e
1 10 -2.5 4.5 -11.25 6.25 9.285714 0.714286
2 8 -1.5 2.5 -3.75 2.25 7.771429 0.228571
3 5 -0.5 -0.5 0.25 0.25 6.257143 -1.257143
4 5 0.5 -0.5 -0.25 0.25 4.742857 0.257143
5 2 1.5 -3.5 -5.25 2.25 3.228571 -1.228571
6 3 2.5 -2.5 -6.25 6.25 1.714286 1.285714
Suma 21 33 0 0 -26.5 17.5 0.000000
Media 3.5 5.5
x y x-xmedia y-ymedia (x-xmedia)(y-ymedia) (x-xmedia)^2 predicción de y predicción de e xe
1 10 -2.5 4.5 -11.25 6.25 9.285714 0.714286 0.714286
2 8 -1.5 2.5 -3.75 2.25 7.771429 0.228571 0.457143
3 5 -0.5 -0.5 0.25 0.25 6.257143 -1.257143 -3.771429
4 5 0.5 -0.5 -0.25 0.25 4.742857 0.257143 1.028571
5 2 1.5 -3.5 -5.25 2.25 3.228571 -1.228571 -6.142857
6 3 2.5 -2.5 -6.25 6.25 1.714286 1.285714 7.714286
Suma 21 33 0 0 -26.5 17.5 0.000000 0.000000
Media 3.5 5.5
![Page 5: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/5.jpg)
clear
input x y
1 10
2 8
3 5
4 5
5 2
6 3
end
generate str p="("+string(x)+ ","+string(y)+ ")"
graph twoway (scatter y x, mlabel(p) xline(3.5) yline(5.5) xlabel(0(1)10,grid) ylabel(0(1)10,grid)) (lfit y x)
list, clean sum(x y) mean(x y)
regress y x
predict yhat
predict ehat, residuals
generate xe=x*ehat
list, clean sum(x y yhat ehat xe) mean(x y yhat ehat xe)
![Page 6: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/6.jpg)
a) El intercepto es la estimación del número de sodas vendidas cuando la temperatura es de 0 grados Fahrenheit. Económicamente no tiene sentido práctico dicha estimación de -240 sodas vendidas.
b) Sustituyendo en el modelo ajustado se tiene sodas.c) Resolviendo se obtiene .d) Gráfica de la recta de regresión estimada en la siguiente diapositiva.
𝑦 = −240 − 8𝑥 = −240 + 8 80 = 4000 = −240 + 8𝑥 𝑥 = 30℉
![Page 7: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/7.jpg)
-20
0
0
20
040
060
0y
0 20 40 60 80 100x
clear
set obs 100
range x 0 100
gen y=-240+8*x
line y x, xlabel(0(20)100) ylabel(-200(200)600) xline(30,lpattern(dash)) yline(0)
![Page 8: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/8.jpg)
30
40
50
60
70
80
90
10
0
0 2 4 6 8 10 12 14 16 18 20 22 24 26month, 1=march 2003,.., 25=march 2005
percentage motel occupancy percentage competitors occupancy
use "C:\poe4\motel.dta", clear
tsset time
tab time repair
graph twoway (scatter motel_pct time, msymbol(circle)
connect(l) xline(17 23) xlabel(0(2)26)
ylabel(30(10)100)) (scatter comp_pct time,
msymbol(circle) connect(l) xline(17 23) xlabel(0(2)26)
ylabel(30(10)100))
table time if time<17, c(min motel_pct max motel_pct
min comp_pct max comp_pct) f(%19.1f) row
table time if repair, c(min motel_pct max motel_pct
min comp_pct max comp_pct) f(%19.1f) row
periodo de reparación
![Page 9: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/9.jpg)
Previo al periodo de reparación el motel tienemás altas tasas de ocupación (entre 62.9 y 96.2 por ciento) que la competencia (entre 48.6 y 81.4 por ciento).
Durante el periodo de reparación el motel tienemenores tasas de ocupación (entre 39.2 y 82.4 por ciento) en comparación con las del periodo previo a la reparación, pero similares a las de la competencia (entre 42.9 y 83.9 por ciento).
![Page 10: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/10.jpg)
use "C:\poe4\motel.dta", clear
scatter motel_pct comp_pct, ylabel(40(10)100)
40
50
60
70
80
90
10
0
pe
rcen
tage
mo
tel occu
pa
ncy
40 50 60 70 80percentage competitors occupancy
Aparente relación directa entre el porcentaje de ocupación del motel y el porcentaje de ocupación en la competencia.
El motel y la competencia muestran el mismo comportamiento de la demanda por habitaciones.
![Page 11: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/11.jpg)
regress motel_pct comp_pct
Ante un incremento de uno por ciento en la tasa de ocupación de la competencia, la tasa esperada de ocupación del motel siniestrado se incrementa en 0.865 de punto porcentual.
![Page 12: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/12.jpg)
-30
-20
-10
010
20
30
Re
sid
ua
ls
0 2 4 6 8 10 12 14 16 18 20 22 24 26month, 1=march 2003,.., 25=march 2005
predict ehat, residuals
scatter ehat time, xline(17 23) xlabel(0(2)26) ylabel(-30(10)30) yline(0)
periodo de reparación
𝑦𝑖 − 𝑦𝑖 > 0
𝑦𝑖 − 𝑦𝑖 < 0
El modelo está sobreestimando las predicciones de ocupación en el motel durante el periodo de reparación.
![Page 13: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/13.jpg)
Se verifica la relación inversa entre el porcentaje de ocupación en el motel y el precio relativo por habitación del motel respecto al de la competencia.
A partir de que la demanda por un bien o servicio se relaciona inversamente a su precio, se espera una relación inversa entre el porcentaje de ocupación en el motel y el precio relativo por habitación del motel respecto al de la competencia.
regress motel_pct relprice
![Page 14: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/14.jpg)
𝑀𝑂𝑇𝐸𝐿_𝑃𝐶𝑇𝑡 = 𝛽1 + 𝛽2𝑅𝐸𝑃𝐴𝐼𝑅𝑡A partir del modelo estimado 𝑀𝑂𝑇𝐸𝐿_𝑃𝐶𝑇𝑡 = 79.35 − 13.23571𝑅𝐸𝑃𝐴𝐼𝑅𝑡es decir
regress motel_pct repair
𝑀𝑂𝑇𝐸𝐿_𝑃𝐶𝑇𝑡 = 79.35 %
La tasa estimada de ocupación fuera del periodo de reparación es
𝑀𝑂𝑇𝐸𝐿_𝑃𝐶𝑇𝑡 = 79.35 − 13.23571 = 66.11 %
El motel tiene pérdidas de ocupación y por lo tanto, de utilidades durante el periodo de reparación.
La tasa estimada de ocupación en el periodo de reparación es
![Page 15: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/15.jpg)
𝐶𝑂𝑀𝑃_𝑃𝐶𝑇𝑡 = 𝛽1 + 𝛽2𝑅𝐸𝑃𝐴𝐼𝑅𝑡A partir del modelo estimado 𝐶𝑂𝑀𝑃_𝑃𝐶𝑇𝑡 = 62.49 + 0.88254𝑅𝐸𝑃𝐴𝐼𝑅𝑡es decir
𝐶𝑂𝑀𝑃_𝑃𝐶𝑇𝑡 = 62.49 %
La tasa estimada de ocupación fuera del periodo de reparación es
𝐶𝑂𝑀𝑃_𝑃𝐶𝑇𝑡 = 62.49 + 0.88254 = 63.37 %
La competencia no tiene pérdidas de ocupación durante el periodo de reparación.
La tasa estimada de ocupación en el periodo de reparación es
El diferencial de ocupación fuera del periodo de reparación es
𝑀𝑂𝑇𝐸𝐿0 − 𝐶𝑂𝑀𝑃0 = 79.35% − 62.49% = 16.86%
El diferencial de ocupación dentro del periodo de reparación es
𝑀𝑂𝑇𝐸𝐿1 − 𝐶𝑂𝑀𝑃1 = 66.11% − 63.37% = 2.74%
Cuando no hay reparaciones, la tasa de ocupación del motel es 16.86% superior a la de sus competidores.En periodo de reparación, tal diferencial es del 2.74%.
reg comp_pct repair
![Page 16: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/16.jpg)
gen y=motel_pct-comp_pct
reg y repair
display 16.86111-14.11825
graph twoway (line yhat repair) (scatter y repair)
-10
01
02
03
04
0
0 .2 .4 .6 .8 1= 1 if motel under repair, = 0 otherwise
Fitted values y
Se verifica que cuando no hay reparaciones, el diferencial de ocupación del motel respecto a los competidores es de 16.86% y en periodo de reparación es del 2.74%.
![Page 17: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/17.jpg)
use "C:\poe4\stockton4.dta", clear
describe
scatter sprice livarea
0
200
00
04
00
00
06
00
00
08
00
00
0
se
llin
g p
rice o
f h
om
e, d
olla
rs
10 20 30 40 50living area, hundreds of square feet
Aparente relación directa entre el precio de venta de las viviendas y su tamaño, medido como el área habitable (en cientos de pies cuadrados).
![Page 18: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/18.jpg)
0
200
00
04
00
00
06
00
00
08
00
00
010 20 30 40 50
living area, hundreds of square feet
selling price of home, dollars Fitted values
regress sprice livarea
twoway (scatter sprice livarea) (lfit sprice livarea)
El precio promedio de venta de las viviendas se incrementa en 9,182 dólares por cada cien pies cuadrados adicionales de área habitable.
La interpretación del intercepto no tiene sentido económico.
![Page 19: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/19.jpg)
gen livarea2=livarea*livarea
reg sprice livarea2
𝑆𝑃𝑅𝐼𝐶𝐸 = 𝛽1 + 𝛽2𝐿𝐼𝑉𝐴𝑅𝐸𝐴2
𝑆𝑃𝑅𝐼𝐶𝐸 = 57728.31 + 212.611𝐿𝐼𝑉𝐴𝑅𝐸𝐴2
𝜕 𝑆𝑃𝑅𝐼𝐶𝐸
𝜕𝐿𝐼𝑉𝐴𝑅𝐸𝐴= 2 212.611 𝐿𝐼𝑉𝐴𝑅𝐸𝐴
𝜕 𝑆𝑃𝑅𝐼𝐶𝐸
𝜕𝐿𝐼𝑉𝐴𝑅𝐸𝐴 15= 2 212.611 15 = 6,378.33
El precio de venta de una vivienda de 1,500=15x100 pies cuadrados se incrementa en 6,378 dólares si se le agregan cien pies cuadrados adicionales de área habitable.
![Page 20: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/20.jpg)
Modelo lineal
Modelo cuadrático
0
200
00
04
00
00
06
00
00
08
00
00
0
10 20 30 40 50living area, hundreds of square feet
selling price of home, dollars Fitted values
Fitted values
graph twoway (scatter sprice livarea)
(lfit sprice livarea) (qfit sprice
livarea)
El modelo cuadrático ajusta mejor que el lineal, pues
𝑆𝐶𝑅cuadr = 2.0315 × 1012 < 𝑆𝐶𝑅lineal = 2.227 × 1012
![Page 21: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/21.jpg)
bysort lgelot: reg sprice livarea2
Lotes pequeños
Lotes grandes
𝑆𝑃𝑅𝐼𝐶𝐸𝑖 = 62,172.41 + 186.8586𝐿𝐼𝑉𝐴𝑅𝐸𝐴𝑖2
𝜕 𝑆𝑃𝑅𝐼𝐶𝐸
𝜕𝐿𝐼𝑉𝐴𝑅𝐸𝐴= 2 186.8586 𝐿𝐼𝑉𝐴𝑅𝐸𝐴
𝜕 𝑆𝑃𝑅𝐼𝐶𝐸
𝜕𝐿𝐼𝑉𝐴𝑅𝐸𝐴= 373.72𝐿𝐼𝑉𝐴𝑅𝐸𝐴
𝑆𝑃𝑅𝐼𝐶𝐸𝑖 = 113,279.4 + 193.8298𝐿𝐼𝑉𝐴𝑅𝐸𝐴𝑖2
𝜕 𝑆𝑃𝑅𝐼𝐶𝐸
𝜕𝐿𝐼𝑉𝐴𝑅𝐸𝐴= 2 193.8298 𝐿𝐼𝑉𝐴𝑅𝐸𝐴
𝜕 𝑆𝑃𝑅𝐼𝐶𝐸
𝜕𝐿𝐼𝑉𝐴𝑅𝐸𝐴= 387.66𝐿𝐼𝑉𝐴𝑅𝐸𝐴
Efecto marginal
Efecto marginal
![Page 22: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/22.jpg)
0
20
00
00
40
00
00
60
00
00
80
00
00
0 20 40 60 80 100age of home at time of sale, years
selling price of home, dollars Fitted values
10
11
12
13
14
0 20 40 60 80 100age of home at time of sale, years
lsprice Fitted values
use "C:\poe4\stockton4.dta", clear
reg sprice age
graph twoway (scatter sprice age) (lfit sprice age)
gen lsprice=log(sprice)
reg lsprice age
graph twoway (scatter lsprice age) (lfit lsprice age)
El modelo log-lineal ajusta mejor que el lineal, pues
𝑆𝐶𝑅loglin = 211.12 < 𝑆𝐶𝑅lineal = 5.9 × 1012
𝑆𝑃𝑅𝐼𝐶𝐸 = 137,403.6 − 627.161𝐴𝐺𝐸 𝐿𝑂𝐺(𝑆𝑃𝑅𝐼𝐶𝐸) = 11.74597 − 0.00476𝐴𝐺𝐸
𝜕 𝑆𝑃𝑅𝐼𝐶𝐸
𝜕𝐴𝐺𝐸= −627.161
𝜕 𝐿𝑂𝐺(𝑆𝑃𝑅𝐼𝐶𝐸)
𝜕𝐴𝐺𝐸= −0.00476= −0. 48%
𝑆𝑃𝑅𝐼𝐶𝐸0
= 137,404 𝐿𝑂𝐺(𝑆𝑃𝑅𝐼𝐶𝐸)0
= 11.74597
𝑆𝑃𝑅𝐼𝐶𝐸0
= 𝑒11.74597 = 126,244
Modelo lineal Modelo log-lineal
![Page 23: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/23.jpg)
reg sprice lgelot
𝑆𝑃𝑅𝐼𝐶𝐸 = 115220 + 133797.3𝐿𝐺𝐸𝐿𝑂𝑇
𝑆𝑃𝑅𝐼𝐶𝐸 = 115220 + 133797.3(0) 𝑆𝑃𝑅𝐼𝐶𝐸 = 115220 + 133797.3(1) 𝑆𝑃𝑅𝐼𝐶𝐸 = 115,220 𝑆𝑃𝑅𝐼𝐶𝐸 = 249,017
lotes grandeslotes pequeños
El precio promedio de venta de una casa en
![Page 24: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/24.jpg)
use if year>=1916 & year<=2008 using "C:\poe4\fair4.dta", clear
scatter vote growth
regress vote growth
predict yhat
graph twoway (scatter vote growth) (line yhat growth, xline(0))
30
40
50
60
Incum
ben
t sha
re o
f th
e tw
o-p
art
y p
resid
entia
l vote
-15 -10 -5 0 5 10growth rate GDP in first three quarters of the election year
Aparente relación directa entre la participación del voto por el partido establecido y crecimiento económico.
![Page 25: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/25.jpg)
list year vote growth yhat, clean30
40
50
60
-15 -10 -5 0 5 10growth rate GDP in first three quarters of the election year
Incumbent share of the two-party presidential vote Fitted values
![Page 26: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/26.jpg)
use "C:\poe4\fair4.dta", clear
regress vote growth if year>=1916 & year<=2004
list year growth if year==2008
display _b[_cons]+_b[growth]*growth[33]
𝑉𝑂𝑇𝐸 = 51.05 + 0.889𝐺𝑅𝑂𝑊𝑇𝐻
𝑉𝑂𝑇𝐸 = 51.05 + 0.889(0.22)
𝑉𝑂𝑇𝐸 = 51. 246
El modelo estimado con datos de 1916 a 2004 sugiere que para 2008 el partido obtendría una mayoría de votación, 51.25%. Sin embargo, el voto realizado fue del 46.6%. Predecir para periodos lejanos al de la última observación disponible conlleva un mayor error.
𝑉𝑂𝑇𝐸 = 51.05 + 0.889𝐺𝑅𝑂𝑊𝑇𝐻
![Page 27: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/27.jpg)
use "C:\poe4\fair4.dta", clear
reg vote inflation if year>=1916 & year<=2008
𝑉𝑂𝑇𝐸 = 53.408 − 0.444𝐼𝑁𝐹𝐿𝐴𝑇𝐼𝑂𝑁
Un incremento de 1 por ciento en la inflación reduce la participación en el voto por el partido establecido en 0.444 de punto porcentual.
Si el índice de precios no varía, es decir la inflación es cero, se espera una participación de voto mayoritaria para el partido establecido del 53.4%.
![Page 28: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/28.jpg)
-2.819 2.819
0.1
.2.3
.4
f(t)
-4 -3 -2 -1 0 1 2 3 4t
bilateral P[|t|>2.819]=0.01𝑛 = 24
𝛽2 = 0.310
𝑠𝑒 𝛽2 = 0.082𝐻0 ∶ 𝛽2 = 0
𝐻𝑎 ∶ 𝛽2 ≠ 0
𝑡calc = 𝛽2 − 𝛽2
𝑠𝑒 𝛽2
𝑡calc =0.31 − 0
0.082= 3.7804878
Si se rechaza 𝐻0
𝑡calc = 3.78 > 𝑡22 = 2.819clear
set obs 1000
range x -4 4
display invt(24-2,0.99+0.01/2)
twoway (function y=tden(22,x), range(-4 4) lcolor(black) color(white) recast(area)) (function y=tden(22,x),
range(-4 -2.819) lcolor(black) color(red) recast(area)) (function y=tden(22,x), range(-4 -2.819) lcolor(black)
color(red) recast(area)) (function y=tden(22,x), range(2.819 4) lcolor(black) color(red) recast(area)),
legend(off) plotregion(margin(zero)) xtitle("t") text(0 -2.819 "-2.819",place(s)) text(0 2.819 "2.819",place(s))
xline(3.78) xlabel(-4(1)4) title("bilateral P[|t|>2.819]=0.01") ytitle("f(t)")
por lo tanto, se rechaza .𝐻0
𝑡calc > 𝑡n−k
![Page 29: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/29.jpg)
2.508
0.1
.2.3
.4
f(t)
-4 -3 -2 -1 0 1 2 3 4t
unilateral P[t>2.508]=0.01𝑛 = 24
𝛽2 = 0.310
𝑠𝑒 𝛽2 = 0.082
𝐻0 ∶ 𝛽2 = 0
𝐻𝑎 ∶ 𝛽2 > 0
𝑡calc = 𝛽2 − 𝛽2
𝑠𝑒 𝛽2
𝑡calc =0.31 − 0
0.082= 3.7804878
Si se rechaza 𝑡calc > 𝑡n-k 𝐻0
𝑡calc = 3.78 > 𝑡22 = 2.508
clear
set obs 1000
range x -4 4
display invt(24-2,0.99)
twoway (function y=tden(22,x), range(-4 4) lcolor(black) color(white) recast(area)) (function y=tden(22,x),
range(2.508 4) lcolor(black) color(red) recast(area)), xline(3.78) legend(off) plotregion(margin(zero)) xtitle("t")
text(0 2.508 "2.508",place(s)) xlabel(-4(1)4) title("unilateral P[t>2.508]=0.01") ytitle("f(t)")
por lo tanto, se rechaza .𝐻0
![Page 30: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/30.jpg)
-1.717
0.1
.2.3
.4
f(t)
-4 -3 -2 -1 0 1 2 3 4t
unilateral P[t<-1.717]=0.05𝑛 = 24
𝛽2 = 0.310
𝑠𝑒 𝛽2 = 0.082
𝐻0 ∶ 𝛽2 = 0
𝐻𝑎 ∶ 𝛽2 < 0
𝑡calc = 𝛽2 − 𝛽2
𝑠𝑒 𝛽2
𝑡calc =0.31 − 0
0.082= 3.7804878
Si se rechaza 𝑡calc < 𝑡n-k 𝐻0
𝑡calc = 3.78 > 𝑡22 = −1.717
clear
set obs 1000
range x -4 4
display invt(24-2,0.05)
twoway (function y=tden(22,x), range(-4 4) lcolor(black) color(white) recast(area)) (function y=tden(22,x), range(-4 -
1.717) lcolor(black) color(red) recast(area)), xline(3.78) legend(off) plotregion(margin(zero)) xtitle("t") text(0 -
1.717 "-1.717",place(s)) xlabel(-4(1)4) title("unilateral P[t<-1.717]=0.05") ytitle("f(t)")
por lo tanto, no se rechaza .𝐻0
![Page 31: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/31.jpg)
-2.074 2.074
0.1
.2.3
.4
f(t)
-4 -3 -2 -1 0 1 2 3 4t
bilateral P[|t|>2.074]=0.05
𝑛 = 24
𝛽2 = 0.310
𝑠𝑒 𝛽2 = 0.082
𝐻0 ∶ 𝛽2 = 0.5
𝐻𝑎 ∶ 𝛽2 ≠ 0.5
𝑡calc = 𝛽2 − 𝛽2
𝑠𝑒 𝛽2
𝑡calc =0.31 − 0.5
0.082= −2.3170732
Si se rechaza 𝑡calc > 𝑡n−k 𝐻0
clear
set obs 1000
range x -4 4
display invt(24-2,0.95+0.05/2)
twoway (function y=tden(22,x), range(-4 4) lcolor(black) color(white) recast(area)) (function y=tden(22,x),
range(-4 -2.074) lcolor(black) color(red) recast(area)) (function y=tden(22,x), range(-4 -2.074) lcolor(black)
color(red) recast(area)) (function y=tden(22,x), range(2.074 4) lcolor(black) color(red) recast(area)),
legend(off) plotregion(margin(zero)) xtitle("t") text(0 -2.074 "-2.074 ",place(s)) text(0 2.074 "2.074 ",place(s))
xline(-2.32) xlabel(-4(1)4) title("bilateral P[|t|>2.074]=0.05") ytitle("f(t)")
por lo tanto, se rechaza .𝐻0
−2.32 > −2.074
![Page 32: Presentación de PowerPoint€¦ · reg y repair display 16.86111-14.11825 graph twoway (line yhat repair) (scatter y repair 0) 0 10 20 30 40 0 .2 .4 .6 .8 1 = 1 if motel under repair,](https://reader034.vdocuments.us/reader034/viewer/2022043011/5fa737e454b483679a135fbf/html5/thumbnails/32.jpg)
𝑃 𝛽2 − 𝑡n-k𝑠𝑒 𝛽2 < 𝛽2 < 𝛽2 + 𝑡n-k𝑠𝑒 𝛽2 = 1 − 𝛼
𝑃 0.31 − 𝑡n-k0.082 < 𝛽2 < 0.31 + 𝑡n-k0.082 = 0.99
𝑃 0.31 − 2.8187561 × 0.082 < 𝛽2 < 0.31 + 2.8187561 × 0.082 = 0.99
display invt(22,0.995)
display "P[",0.31-invt(22,0.995)*0.082,"< beta2 <",0.31+invt(22,0.995)*0.082,"] = 0.99"
𝑃 0.078862 < 𝛽2 < 0.541138 = 0.99