Beruflich Dokumente
Kultur Dokumente
ECON2209
Slides 02
BF-02
Lecture Plan
A review of probability theory
A review of linear regressions
EViews
Quick start (more will be introduced gradually)
Understand EViews output
BF-02
Cumulative Distribution
0.0
0.2
0.4
0.6
P(X<=x)
0.8
1.0
-4
-2
Probability distribution
cumulative distribution (cdf): F(x) = Prob(X x)
probability density (pdf):
f(x) = derivative of F(x)
g ( x) f( x)dx
E[ g ( X )] =
for continuous RV
g ( x) P( X = x)
.
for discrete RV
all x
BF-02
FXY(x,y) = P(X x, Y y)
fXY(x,y) = partial derivative of FXY(x,y).
BF-02
14
13
12
eg. xyz.dat
Y
6.9105
8.9035
13.0322
12.1195
9.1661
9.3989
Z
-1.7184
1.6342
-0.7165
1.1775
0.1522
-0.9960
10
X
-1.3044
0.0268
0.9392
0.9108
0.6078
-1.4191
11
9
8
7
6
5
...
BF-02
-3
-2
-1
These imply
E(t | xt) = 0 ;
t and xt are uncorrelated, ie, Cov(t , xt ) = 0;
E(yt | xt) = 0 + 1xt . (population regression function)
(y
t =1
0 1 xt ) 2
Sum of
squared residuals
(SSR)
T
T
1
1
( yt 0 1 xt ) 2 =
et2 .
2 =
standard
error
of
es2mate
-
unbiased
es2mator
of
the
variance
of
the
error
variable
-
square
root
of
the
above
et = yt y t = yt 0 1 xt .
0 = 9.959319, 1 = 0.949749.
14
12
Residual plot:
10
8
4
0
-2
-4
5
10
15
20
Residual
BF-02
25
30
Actual
35
40
Fitted
45
X
-1.3044055855
0.0268445360
0.9391732559
0.9108356314
0.6078185429
-1.4190856454
1.6450399496
-1.5705456746
1.1725971823
-0.0001469589
-1.9102214403
0.4106547298
-0.2633816925
2.9898141231
-1.1719854886
1.8628263016
1.1237612050
-1.8801405887
0.3094047477
-1.9164071601
0.0443377940
2.1231233412
-0.1525597566
-0.0302621863
-0.5267709581
1.1087466899
-0.7870372302
0.1217747790
-0.6272752055
3.0619892478
1.0277405158
2.2274783060
-0.0633318382
-0.9195725833
-0.4661417205
1.3575193910
1.1639896889
0.4570019947
-1.6182578476
-2.8131818585
-0.1329263293
-0.5127844249
1.3569336398
-0.8396330238
0.6548109587
-0.2817164164
0.7701143610
-0.0454431404
Y
6.910518
8.903510
13.032210
12.119516
9.166077
9.398871
10.861943
6.900604
8.557908
10.384578
8.951113
10.502956
9.012794
13.172481
7.294597
13.475142
11.766178
6.552416
11.078862
11.977582
9.175949
10.706387
8.633693
8.111663
7.630387
10.874706
11.471748
10.913112
8.379696
11.959233
10.103590
11.681388
9.716037
8.469919
9.167781
10.512578
10.094872
12.046379
9.805910
5.811298
11.314932
10.729959
13.846940
10.350224
10.837194
7.928579
10.755102
12.906690
Z
-1.71836069
1.63420482
-0.71649462
1.17746037
0.15218715
-0.99595505
1.95295568
-0.29073338
-1.35916970
-0.36981642
-0.53368660
0.01555975
0.39533785
0.62545839
1.05345240
-2.20815358
-0.54770754
1.50752962
-1.85750582
-2.60940240
0.07977844
0.70568532
1.29592881
-0.25520209
-1.46954656
0.56564230
-0.29023287
-1.09615388
-0.47673444
1.22468138
1.03023708
-0.12631043
-1.02449478
1.50979638
0.19944663
1.80739691
0.56168127
-0.69538078
-1.20063045
0.41839468
-1.72367774
-1.09610913
-1.07509952
0.23852197
1.16375597
0.50112855
0.62021869
-1.10814255
10
+ K xKt + t ,
t ~ iid (0, 2 ).
OLS estimation
( 0 ,
, K ) minimises
+ K xKt
( yt 0 1 x1t
t =1
K xKt ) 2
T
1
2
=
e
t .
T K 1 t =1
2
BF-02
11
+ K xKt ,
et = yt y t
eg. xyz.dat
y t = 0 + 1 xt + 2 zt ,
BF-02
12
Download bfData13.zip
Unzip it into F:\BF
BF-02
13
14
15
16
Y vs. Z
12
13
13
12
12
11
11
10
10
4
0
-4
5
10
15
20
30
25
35
40
45
14
14
9
8
-3
BF-02
-2
-1
-3
-2
-1
16
17
t ~ Student' s t .
SSR = et2 ,
t =1
et = yt 0 1 xt 2 zt ,
18
T 1 t =1
BF-02
19
K = # of regressors
= model size
R2 = 1
e
t =1
2
t
y
y
(
)
t
t =1
t =1
T
y
y
(
)
/(T 1)
t
t =1
R 2 = 1
2
e
t /(T K 1)
20
t =2
t =1
DW = (et et 1 ) 2 / et2
21
smaller SSR
complex model
more parameters
BF-02
22
ln(SSR/T)
ln(T)(K+1)/T
K*+1
BF-02
K+1
23
(SSR r SSR)/K
SSR/ (T K 1)
~ F ( K , T K 1) distr. under H 0
24
25
Summary
What is a linear regression?
What is the key assumption about linear regressions?
What is the method of estimating a linear regression
model?
How do you use EViews (read, plot, summarise data)?
How do you use EViews to estimate linear regression
models?
Do you understand EViews output?
How do you do inference with EViews output?
Why do we use SIC (or AIC) to choose models?
BF-02
26