Documente Academic
Documente Profesional
Documente Cultură
Datos:
i = 1, 2, , n
MTODOS DE ESTIMACIN
Mnimos-cuadrados
Mxima-verosimilitud
AMBITO DE APLICACIN DEL MODELO
La poblacin donde se han obtenido los datos
MODELO ESTIMADO
Libro: ECONOMETRA: MODELOS ECONOMTRICOS Y SERIES TEMPORALES con los paquetes TSP y
TSP. Editorial Revert (calle Loreto 13-15). Barcelona. Espaa 1998. Autor: Jos M Caridad y Ocerin. ISBN 84-29126139 (dos tomos)
1
NOTACIN MATRICIAL
MODELO TERICO
1
1
:
:
1
x1 xk
1
1
x1 xk
2
i = 1,2,,n
1
0
+
: ... :
1
:
: ... :
:
:
x1 xk
k
n
n
r
r
y = X + r
MODELO ESTIMADO
yi = b0 + b1 x1i + + bk xki + ei
y1
1 x11 xk1
x
y2 = 1 x12 k2
b0
:
: : .... :
b1 +
:
: : .... :
:
yn
1 x1n xkn
bk
r
r
y = X b + er
i = 1,2,,n
e1
e2
:
:
en
2. VARIABLES PREDETERMINADAS
- No existe multicolinealidad exacta
r(X) = k + 1
3. PERTURBACIONES 1, 2, , n
-
E[ i] = 0
i = 1, 2, , n
V[ i] = cte. = 2
HOMOCEDASTICIDAD
C[ i, i'] = 0
i i' NO AUTOCORRELACIN
i N
r
r
N[ 0n ; 2 In ]
r
r
y N[X ;2In]
L( ; ) =
2
2
2
r r
r
r
0.5(y X)'(yX)/2
e
n
2
2
r
0.5S()/ 2
r
r
La funcin S( ) no depende de la distribucin de y
r 2
r 2
r
y
La funcin L( ; ) se basa en que N(X ; In)
r
r
min S( ) = S( b ) = Se
ECUACIONES NORMALES
S
nb0 + x1 b1 +..... + xk bk =yi
=
0
i
i
0
S
2
= 0 x1i b0 + x1i b1 + ..... + x1i xk bk = yi x1i
1
i
S = 0 x b + x x b + ..... +
xk2 bk = yi xk
k 0 k 1 1
i
k
i
i i
i
r
r
y
XX b = X
MXIMA-VEROSIMILITUD
r
r 2
2
max L( ; ) = L( b , se )
r
XX b = X y
se2 =
1 n e2
n i=1 i
TEOREMA DE GAUSS-MARKOV
r
ESTIMADORES LINEALES INSESGADOS
b MEJORES
r
DE
DISTRIBUCIN MUESTRAL DE b
r
r
E[ b ] =
r
V[ b ] = 2 (XX)-1
r
b N
-
E[bj] = [j]
j = 0,1,,k
E[bj] = 2ajj es mnima
bj N(j; 2ajj)
ESTIMADOR INSESGADO DE 2
n
1
2
se =
ei2
n k 1 i=1
(n k 1)se2 2 (n k 1)
V=
2
r
V es independiente de b
-
ESTADSTICOS T
bj j bj j
=
Tj = s
se a jj t(n k - 1)
b
j
ESTIMADOR DE V[ b ]
j = 0,1,,k
j = 1,2,,k
bj
bj
=
Tbj= s
se a jj
b
j
DISTRIBUCIN MUESTRAL
Tbj H0 t(n - k - 1)
C0 = (-t/2; +t/2)
VALOR DEL ESTADSTICO
PROBABILIDAD LMITE p
tbj
p = 2P[T > | t |]
bj
DECISIN: A nivel :
Si tbj C0 se acepta H0
Si tbj C1 se acepta H1
Si p se acepta H0
Si p < se acepta H1
0.4
0.3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0.4
f(t)
0.3
0.2
0.1
0.0
---
0.2
0.1
C1 --->-t/2<-----------C0 ------->+t/2<-------C1-----
0.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
f(t)
|
|
|
p/2
tbj
Error de tipo I:
rechazar H0 cierta incluir xj no relevante
Error de tipo II:
aceptar H0 falsa excluir xj relevante
RECOMENDACIN:
F(t) = 1-
g
10
15
20
25
30
60
0.5
t0.05/2
2.228
2.131
2.086
2.060
2.042
2
1.96
t0.10/2
1.812
1.753
1.725
1.708
1.697
1.671
1.645
t0.20/2
1.372
1.341
1.325
1.316
1.310
1.296
1.281
1.0
Funciones de
distribucin
F(z)
0.8
0.4
F(t)
f(z)
0.6
0.3
f(t)
0.2
0.4
0.1
0.2
0.0
0.0
-2.5
-2.5
2.5
2.5
1.0
0.4
f(t)
|
|
|
|
|
|
|1
|
|
|
|
|
|
|
0.8
0.3
0.6
F(t)
0.2
0.4
F(t)
0.1
|
|
|
|
0.0
-2.5
t 2.5
0.2
0.0
-2.5
t 2.5
y
320
450
370
470
420
500
570
640
670
780
690
700
910
930
940
1070
1160
1210
1450
1220
Interaccin
GENR x3 = x1*x2
x1
50
53
60
63
69
82
100
104
113
130
150
181
202
217
229
240
243
247
249
254
x2
7.4
5.1
4.2
3.9
1.4
2.2
7.0
5.7
13.1
16.4
5.1
2.9
4.5
6.2
3.2
2.4
4.9
8.8
10.1
6.7
Medidas descriptivas
STATS y x1 x2 x3
COR
y x1 x2 x3
COV
y x1 x2 x3
sy2 = 100152.75
sy= 316.4692
Matriz de correlacin R
R
y
x1
x2
x3
y
1
0.95
0.23
0.78
x1
0.95
1
0.06
0.64
x2
0.23
0.06
1
0.75
x3
0.78
0.64
0.75
1
Matriz de covarianzas S
S
y
x1
x2
x3
y
100152.75
22676.70
266.69
175960.90
x1
22676.70
5687.66
17.80
34507.26
x2
266.69
17.80
13.27
1949.91
x3
175960.90
34507.26
1949.91
504844.10
XX =
20
3036
121.2
18737.2
3036
574618
18754.2
3537033
121.2
18737.2
18754.2 3537033
998.85 152648.7
152648.7 27682883
Diagramas de dispersin
1500
1500
1000
1000
500
500
x1
0
0
50
100
1500
150
200
250
x2
0
0
300
1000
500
x3 = x1*x2
0
0
500
Modelos alternativos:
(1)
(2)
(3)
(4)
(5)
y = 0 + 1x1 +
y = 0 + 1x1 +2x2 +
y = 0 + 1 x1 +2 x2 +3 x1x2+
y = 0* + 1*x1 +2*x1x2+ *
Otros
10
15
20
n = 20
k=3
A-1 = (XX)-1 =
1.117610
-0.006792
-0.006792
4.97E-05
-0.157829
0.000999
0.000981 -0.00000725
se2 =
Sb =
20
1
ei2
20 3 1 i =1
s e2
tb =
3
A=
s e2
-0.157829
0.000981
0.000999 -0.00000725
0.028798
-0.000180
-0.000180 0.00000129
= 73284.44 / 16 = 67.677752
(XX)-1
0.286169
0.286169
=
= 3.725527
67.67775 0.00000129 0.076813
= 0.05
= 0.01
Probabilidad lmite
p = 2P[T > 3.725527] = 0.0018
Decisin Se acepta H1 para todo > 0.0018
LS y c x1 x2 x3
Dependent Variable: Y
Method: Least Squares
Date:
Time:
Sample: 1974 1993
Included observations: 20
Variable
Coefficient Std. Error t-Statistic
sb
bj
tj
Prob.
p lmite
C
X1
X2
X3
R-squared
Adj. R-sq.
303.5040
2.329275
-25.07113
0.286169
0.963414
0.956554
r2
r2
S.E. regres. se
Sum sq. resid. Se
Log likelihood
Durbin-Watson
71.54695 4.242026
0.0006
0.476982 4.883358
0.0002
11.48487 -2.182971
0.0443
0.076813 3.725527
0.0018
Mean depen. var. y 773.5000
S.D. depen. var.
324.6905
sy
11.44425
11.64339
140.4406
0.000000
1500
y
1000
150
500
100
50
0
-50
-100
-150
74
76
78
80
Residual
82
84
86
Actual
88
90
92
Fitted
RESIDUOS
1970
-20.32376
1975 73.55582 -40.07623 47.21746 -36.76827 9.027136
1980 8.748421 67.51612 8.104394 -25.25461 -53.95142
1985 -102.6063 -11.32465 -108.5268 -26.38462 102.8077
1990 72.58984 -70.22495 100.0396 5.835129
Std. Error
t-Statistic
54.61834
1.566845
0.266588
14.78183
5.518434
2.683178
Mean dependent var
S.D. dependent var
Akaike info criterion
Schwarz criterion
F-statistic
Prob(F-statistic)
Prob.
0.1356
0.0000
0.0157
773.5000
324.6905
11.96883
12.11819
115.9073
0.000000
Std. Error
t-Statistic
37.59454
4.418194
0.289880
11.03545
0.030769
4.221480
Mean dependent var
S.D. dependent var
Akaike info criterion
Schwarz criterion
F-statistic
Prob(F-statistic)
Prob.
0.0004
0.0000
0.0006
773.5000
324.6905
11.60495
11.75431
170.5113
0.000000
Dependent Variable: Y
Method: Least Squares
Sample: 1974 1993
Included observations: 20
Variable
Coefficient
C
166.0999
X1
3.198959
X3
0.129889
R-squared
0.952517
Adjusted R-squared
0.946931
S.E. of regression
74.79821
Sum squared resid
95111.12
Log likelihood
-113.0495
Durbin-Watson stat
1.688733
r2
r2
BIC
11.643
12.118
11.754
y x1 x2 x3
y x1 x2
0.9634
0.9317
0.9566
0.9236
AIC
11.444
11.969
y x1 x3
0.9525
0.9469
11.605
H0 : q + 1 = = k = 0
H1 : algn(os) q + 1, , k 0
s 2y = s 2y + se2
S y = Sx x
...x
1 2 k
+ Se
s 2y = s x2 ...xq + sx2
1
...x
q+1 k
S y = S x ...xq + S x
1
+ se2
...x
q+1 k
+ Se
S y = ( yi y)2
i= 1
n
Se = ei2
i =1
Descomposicin 1
n
S y = S x x
...x
12 k
= ( yi y )2
i=1
Descomposicin 2
i= 1
...x = S y S x ...xq
1
q +1 k
Sx
siendo
i = 1,2,....,n
MEDIAS DE CUADRADOS
Me = se2 = Se/(n-k-1)
M y = M x x ...x = S x x ...x / k
1 2 k
1 2 k
Mx
...x
q+1 k =
Sx
...x
q +1 k / (k-q)
TABLAS DE ANOVA
Fuente de variacin de la Grados de Sumas de Medias de
variable y
libertad
cuadrados cuadrados
Las k variables x1, , xk
k
S x x ...x M y
1 2
Las perturbaciones
(error)
Variacin total de y
nk-1
Se
n-1
Sy
M e = se2
Sx
Las k q variables
xq+1, , xk
k-q
Las perturbaciones
(error)
nk-1
Se
Variacin total de y
n-1
Sy
...x
q+1 k
Mx
...x
q+1 k
M e = se2
Estadstico
F=
M y
/Me
Estadstico
F= M xq+1...xk /
Me
ESTADSTICO
(1) F = M y /Me
(2) F = M xq+1...xk /Me
PROBABILIDAD LMITE
p = P[F > F ]
NOTA: El test (1) es poco til en la prctica, pues tiende a
aceptar la hiptesis H1
EJEMPLO 3: Serie trimestral con estacionalidad
10.8
13.7
18.8
22.7
24.8
28.0
7.8
10.1
17.1
16.9
23.4
26.3
10.2
11,0
17.5
19.3
24.7
28.0
17.5
20.2
26.2
29.1
32.4
34.1
Consumo
30
25
20
15
10
5
1987
1988
1989
1990
1991
1992
Caractersticas bsicas:
Tendencia Tt
Ciclo estacional Ct
yt = Tt + Ct + t
PROCESO DE MODELIZACIN
Tendencia lineal
Tt = 0 + 1t
Ciclo aditivo
Ct = 1 x1t + 2 x2t + 3 x3t
Modelo terico
(1.71)
Variable
C
t
X1
X2
X3
R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood
Durbin-Watson stat
( 7.3)
Coefficient
9.062203
0.910357
0.723869
-3.053155
-2.446845
0.979028
0.974612
1.189350
26.87654
-35.41292
1.230611
( 5.8)
Prob.
0.0000
0.0000
0.1040
0.0000
0.0000
20.4417
7.46446
3.36774
3.61317
221.738
0.00000
yt = 0* + 1* t + t*
Variable
C
t
R-squared
Adjusted R-squared
S.E. of regression
Sum squared resid
Log likelihood
Durbin-Watson stat
Coefficient
8.646015
0.943652
0.799092
0.789960
3.420972
257.4670
-62.52858
2.056873
Std. Error
t-Statistic
1.441428
5.998228
0.100879
9.354302
Mean dependent var
S.D. dependent var
Akaike info criterion
Schwarz criterion
F-statistic
Prob(F-statistic)
Prob.
0.0000
0.0000
20.44167
7.464462
5.377382
5.475553
87.50297
0.000000
FTendencia-Ciclo =
313.88
=221.74
1.415
FCiclo =
76.86
= 54.34
1.415
DESESTACIONALIZACIN DE LA SERIE
Dt = yt Ciclot = yt (0.72Q1 3.05Q2 2.45Q3 + 4.78Q4)
40
30
20
10
0
87
88
89
90
DESEST
91
YF
92
93
Y
5. ANLISIS DE RESIDUOS
ei = yi y i = yi ( b0 + b1 x1 + + bk xk )
i
i
i = 1, 2, , n
RESIDUOS TIPIFICADOS
ei* =
ei
se
GRFICOS ( y i , ei)
i = 1,2,,n
t = 1,2,,n
21.0
26.3
35.0
31.0
34.0
23.6
32.5
32.0
31.1
31.7
21.2
32.0
26.7
31.7
36.0
21.8
35.2
22.2
33.7
37.9
23.7
34.5
28.3
34.7
Coefficient
23.47464
0.519696
8
Serie y
Std. Error
1.628451
0.113968
t-Statistic
14.41531
4.560019
Residuos: modelo y
35
0
30
-4
25
-8
20
-12
70 72 74 76 78 80 82 84 86 88 90 92
10
70 72 74 76 78 80 82 84 86 88 90 92
0 _______________________________
-5
-10
20
25
30
35
40
Prob.
0.0000
0.0002
zt = 0 + t + t*
1970
1975
1980
1985
1990
20.5
25.2
29.0
34.2
29.8
21.8
30.8
23.0
29.0
23.2
20.2
25.1
16.3
30.7
46.7
22.1
31.1
15.6
36.0
40.5
23.6
26.5
39.0
34.5
Serie z
Variable
C
T
50
Coefficient
19.72754
0.674130
15
Serie z
Std. Error
2.610395
0.182690
t-Statistic
7.557299
3.690031
Prob.
0.0000
0.0013
Residuos z
10
40
5
30
0
-5
20
-10
10
-15
70 72 74 76 78 80 82 84 86 88 90 92
70 72 74 76 78 80 82 84 86 88 90 92
20
10
0 ________________________________
-10
-20
20
25
30
35
40
6. INTERPOLACIN Y PREDICCIN
MODELO ESTIMADO
yi =
b0 + b1 x1 + + bk xk + ei
i
i = 1,2,,n
x1 x2
f
x
k
f = n+1,, n+p
INTERVALO DE CONFIANZA 1 -
I1( y f ) =( y f t/ 2 se ;
f
y f +t/ 2 se )
f
r
x
PREDICCIN EX-ANTE f conocido
r
EX-POST x f estimado con otro modelo
Ejemplo 5. Interpolacin
Referencia: Ejemplo 1
Realizar las estimaciones del coste de mantenimiento si el nmero de
equipos es x1 = 260 y los tiempos medios de las interrupciones son x2 = 2,
4, 6, 8.
MODELO ESTIMADO
y = 303.5 + 2.329x1 25.071x2 + 0.28617x1x2 + e
ESTIMACIN POR PUNTO: x1 f = 260 x2 f = 2
f = 1007.8
y
1 - = 0.95
1 - = 0.99
se2
-0.1578 0.0010
0.0010 -0.0000007
1
260
0.0288 -0.00018
520
= 82.8912
I0.95 = (832.1; 1183.5)
I0.95 = (765.7; 1249.9)
Compara: y f con yf
f = n + 1, , n + p
n+ p
1 n+ p
2 1
ECM
U=
= ( y f y f ) / y 2f
V
p f = n+1
p f =n +1
U
0
Buena capacidad
predictiva
Peor capacidad
predictiva
=ES + EV + EA
Medias, varianzas y covarianzas de yf , y f , f = n+1, , n+ p
ES = Error medio de prediccin o de sesgo
EV = Error debido a la diferencia de variabilidad entre los valores
reales y de prediccin
EA = Error debido a la variacin aleatoria de los errores de
prediccin
US =
ES
ECM
SITUACIN IDEAL
UV =
EV
ECM
US = 0 UV = 0
UA =
UA = 1
7. OBSERVACIONES INFLUYENTES
EA
ECM
DETECCIN
1. MATRIZ
H = X(XX)-1X
hii > 2 k +1
n
2. RESIDUOS STUNDENTIZADOS
ei
ri =
se 1 hii
3. OTRAS MEDIDAS