No Slide Title

Download Report

Transcript No Slide Title

Graduate School 2004/2005
Quantitative Research Methods
Gwilym Pryce
[email protected]
Module II
Lecture 4:F-Tests
1
Plan:
(1) Testing a set of linear restrictions –
the general case
 (2) Testing homogenous Restrictions
 (3) Testing for a relationship – Special
Case of Homogenous Restrictions
 (4) Testing for Structural Breaks

2
(1) Testing a set of linear Restrictions The General Procedure

Suppose we want to test whether there are any
country specific effects in the relationship
between inflation and the money supply:
INFL = a + b MS + g1 COUNTRY1 + …. + g42 COUNTRY2
– I.e. we want to test the following null hypothesis:
• H0: g1 = g2 = g3 =…. = g42 = 0

Then we can think of this as being equivalent
to comparing two regressions, one restricted
and one unrestricted:
3

The Unrestricted regression is:
INFL = a + b MS + g1 COUNTRY1 + …. + g42 COUNTRY2

The Restricted regression is:
INFL = a + b MS

We can test whether all the g coefficients
equal zero using the F-test:
4
The General formula for F:
df numerator
df denominato r
F
 FdfrU
( RSSR  RSSU ) / r

RSSU / dfU
Where:
RSSU = restricted residual sum of squares
=
RSS under H1
NB RSSR is
always greater
than RSSU since
imposing a
restriction on an
equation can
never reduce the
RSS
RSSR = unrestricted residual sum of squares
= RSS under H0
r
= number of restrictions = diff. in no. parameters
between restricted and unrestricted equations
dfu
= df from unrestricted regression = n - k where k is all
coefficients including the intercept.
5
Using the F-test:

If the null hypothesis is true (i.e. restrictions
are satisfied) then we would expect the
restricted and unrestricted regressions to give
similar results
– I.e. RSSR and RSSU will be similar
– so we accept H0 when the test statistic gives a
small value for F.

But if one of the restrictions does not hold,
then the restricted regression will have had an
invalid restriction imposed upon it and will be
mispecified.
–  higher residual variation  higher RSSR
– so we reject H0 when the test stat. gives a large
value
6
Test Procedure:

(i) Compute RSSU
– Run the unrestricted form of the regression in
SPSS and take a note of the residual sum of
squares = RSSU

(ii) Compute RSSR
– Run the restricted form of the regression in SPSS
and take a note of the residual sum of squares =
RSSR

(iii) Calculate r and dfU
 (iv) Substitute RSSU, RSSR, r and dfU in the
equation for F and find the significance level
associated with the value of F you have
calculated.
7
Example 1: Ho: no country effects
(R and U regressions have the same dependent variable)
Step (i)
RSSU = 1835.811
b
O
m
e
a
d
u
F
a
M
i
f
g
a
1
R
2
4
3
2
0
R
1
1
3
T
3
5
f
a
P
b
D
i
a
c
n
d
z
e
n
f
d
f
i
a
S
u
f
t
i
c
s
S
.B
e
M
t
i
E
g
E
1
(
C
1
9
2
7
t
s
h
m
2
5
7
3
9
q
R
m
M
u
u
C
6
2
7
9
4
a
1
C
6
2
0
4
0
a
P
C
4
3
3
3
6
C
8
a
D
Step (ii)
RSSR = 2097.722
b
O
m
e
a
d
u
F
a
M
i
f
g
a
1
R
0
1
0
2
4
R
2
4
1
T
3
5
f
a
P
b
D
i
a
c
u
n
d
E
e
t
s
h
d
f
f
q
R
q
m
M
u
u
a
f
t
i
s
c
1
S
B
e
M
E
t
i
g
a
P
1
(
1
0
1
3
m
2
5
8
3
4
a
D
9
Step (iii) r and dfu

r
=
=
number of restrictions
difference in no. of parameters between
the restricted and unrestricted equations
=

dfu
=
3
df from unrestricted regression = nU - kU
where k is total number of all coefficients
including the intercept

=
516 - 5 = 511
10
(iv) Substitute RSSU, RSSR, r and dfU in the
formula for F

F = (RSSR - RSSU) / r = (2097.722 - 1835.811)/3
RSSU/dfU
1835.811 / 511
= 87.304
3.593
= 24.298




dfnumerator = r
=3
dfdenominator = dfU = 511
From Tables, we know that at P = 0.01, the value for
F[3,511] would be 3.88
(I.e. Prob(F > 3.88) = 0.01)
F we have calculated is > 3.88, so we know that P <
0.01
(I.e. Prob(F > 24.298) <0.01)
Reject Ho
11
Degrees of freedom in the denominator
F Critical Values
Degrees of freedom in the numerator
1
2
3
p
200
1000
4
5
6
7
0.100
0.050
0.025
0.010
0.001
2.73
3.89
5.10
6.76
11.15
2.33
3.04
3.76
4.71
7.15
2.11
2.65
3.18
3.88
5.63
1.97
2.42
2.85
3.41
4.81
1.88
2.26
2.63
3.11
4.29
1.80
2.14
2.47
2.89
3.92
1.75
2.06
2.35
2.73
3.65
0.100
0.050
0.025
0.010
0.001
2.71
3.85
5.04
6.66
10.89
2.31
3.00
3.70
4.63
6.96
2.09
2.61
3.13
3.80
5.46
1.95
2.38
2.80
3.34
4.65
1.85
2.22
2.58
3.04
4.14
1.78
2.11
2.42
2.82
3.78
1.72
2.02
2.30
2.66
3.51
12
Degrees of freedom in the denominator
F Critical Values
Degrees of freedom in the numerator
1
2
3
p
200
1000
4
5
6
7
0.100
0.050
0.025
0.010
0.001
2.73
3.89
5.10
6.76
11.15
2.33
3.04
3.76
4.71
7.15
2.11
2.65
3.18
3.88
5.63
1.97
2.42
2.85
3.41
4.81
1.88
2.26
2.63
3.11
4.29
1.80
2.14
2.47
2.89
3.92
1.75
2.06
2.35
2.73
3.65
0.100
0.050
0.025
0.010
0.001
2.71
3.85
5.04
6.66
10.89
2.31
3.00
3.70
4.63
6.96
2.09
2.61
3.13
3.80
5.46
1.95
2.38
2.80
3.34
4.65
1.85
2.22
2.58
3.04
4.14
1.78
2.11
2.42
2.82
3.78
1.72
2.02
2.30
2.66
3.51
13
Alternatively use Excel calculator:
F-Tests.xls
First Paste ANOVA tables of U and R models:
Restricted Model
ANOVA
Model
a
b
Sum of Squares
df
Mean Square
F
Sig.
1 Regression 34.86042
1 34.86042 8.541767 0.003624
Residual
2097.722
514 4.081172
Total
2132.583
515
Predictors: (Constant), money supply
Dependent Variable: inflation
Unrestricted Model
ANOVA
Model
a
b
Sum of Squares
df
Mean Square
F
Sig.
1 Regression 296.7719
4 74.19296 20.65169
0
Residual
1835.811
511 3.592585
Total
2132.583
515
Predictors: (Constant), CNTRY_3, CNTRY_2, CNTRY_1, money supply
Dependent Variable: inflation
14
Second, check cell formulas, & let Excel
do the rest:
F Test
(RSSR  RSSU ) / r
F 
RSSU / dfU
r
dfU
r
=
3
ku
=
5
n
=
516
=
511
=
511
F
=
24.30111338
Sig F
=
1.02857E-14
df u
=
=
kU -kR
n-ku
15
Example 2: Ho: b2 + b3 = 1
(R and U regressions have different dependent variables)

(i) Compute RSSU
– Run the unrestricted form of the regression in SPSS and take
a note of the residual sum of squares = RSSU

(ii) Compute RSSR
– Run the restricted form of the regression in SPSS by:
• substituting the restrictions into the equation
• rearrange the equation so that each parameter appears only
once
• create new variables where necessary and estimate by OLS
– and take a note of the residual sum of squares = RSSR


(iii) Calculate r and dfU
(iv) Calculate F and find the significance level
16

Unrestricted regression:
y = b1 + b2x2 + b3x3 + u
• H0: b2 + b3 = 1;
• If H0 is true, then: b3 = 1 - b2 and:
y = b1 + b2x2 + (1-b2)x3 + u
= b1 + b2x2 + x3- b2x3 + u
= b1 + b2(x2 - x3)+ x3 + u
y - x3= b1 + b2(x2 - x3)+ u

Restricted regression:
z = b1 + b2(v)+ u
where z = y - x3;
v = x2 - x3
17
Example 3: Ho: b2 = b3
(R and U regressions have the same dependent variable)

Unrestricted regression:
y = b1 + b2x2 + b3x3 + u
• H0: b2 = b3;
• If H0 is true, then:
H1: b2  b3
y = b1 + b 2x 2 + b 2x 3 + u
= b1 + b2(x2 + x3) + u

Restricted regression:
y = b1 + b2(w)+ u
where w = x2 + x3;
18
Example 4: Ho: b3 = b2 + 1
(R and U regressions have the different dependent variables)

Unrestricted regression:
Infl = b1 + b2MS_GDP + b3MP_GDP + u
• Ho: b3 = b2 + 1
• If H0 is true, then:
Infl = b1 + b2MS_GDP + (b2+1)MP_GDP + u
= b1 + b2MS_GDP + b2 MP_GDP + 1MP_GDP + u
= b1 + b2(MS_GDP + MP_GDP) + MP_GDP + u
Infl - MP_GDP = b1 + b2(MS_GDP + MP_GDP) + u

Restricted regression:
z = b1 + b2(v)+ u
where z = Infl - MP_GDP ;
v = MS_GDP + MP_GDP
19
 Step
(i)
RSSU = 2069.060
b
O
m
e
a
d
u
F
a
M
i
f
g
a
1
R
3
2
1
5
0
R
0
3
3
T
3
5
a
P
b
D
i
a
c
u
n
d
z
e
E
d
f
f
t
s
h
f
t
is
c
q
R
q
m
M
u
u
S
B
e
M
E
i
t
g
a
1
1
(
6
9
1
0
a
P
M
6
3
6
8
5
M
3
8
9
7
1
20
a
D
Step (ii)

RSSR = 2070.305
SPSS syntax for creating Z and V
COMPUTE Z = Infl - MP_GDP.
EXECUTE.
COMPUTE V = MS_GDP + MP_GDP.
EXECUTE.

SPSS syntax for Restricted
Regression:
REGRESSION
/MISSING LISTWISE
b
/STATISTICS COEFF OUTS R ANOVA
O
/NOORIGIN
m
e
/DEPENDENT
Z
S
u
d
u
F
a
M
i
1
R
1
1
1
9
0
/METHOD=ENTER V .
R
5
4
8
T
6
5

SPSS ANOVA Output:
a
P
21
b
D
Step (iii) r and dfu

r
=
=
number of restrictions
difference in no. of parameters between
the restricted and unrestricted equations
=

dfu
=
1
df from unrestricted regression = nU - kU
where k is total number of all coefficients
including the intercept

=
516 - 3 = 513
22
(iv) Substitute RSSU, RSSR, r and dfU in the
formula for F

F = (RSSR - RSSU) / r = (2070.305 - 2069.060)/1
RSSU/dfU
2069.060 / 513
= 1.245 / 4.033
= 0.309



dfnumerator = r
=1
dfdenominator = dfU = 513
From Excel =FDIST(0.309,1,513), we know that Prob(F >
0.309) = 0.58 (I.e. 58% chance of Type I Error)
– I.e. if we reject H0 then there is more than a one in
two chance that we have rejected H0 incorrectly
–  Accept H0 that b3 = b2 + 1
23
Using F-Tests.xls:
Restricted Model
ANOVA
Model
a
b
Sum of Squares
df
Mean Square
F
Sig.
1 Regression 55.7013
1 55.7013 13.82911 0.000222
Residual
2070.305
514 4.02783
Total
2126.006
515
Predictors: (Constant), V
Dependent Variable: Z
Unrestricted Model
ANOVA
Model
a
b
Sum of Squares
df
Mean Square
F
Sig.
1 Regression 63.52287
2 31.76143 7.874889 0.000428
Residual
2069.06
513 4.033255
Total
2132.583
515
Predictors: (Constant), MP_GDP, MS_GDP
Dependent Variable: inflation
24
F Test
(RSSR  RSSU ) / r
F 
RSSU / dfU
r
dfU
r
=
kU -kR
=
1
ku
=
3
n
=
516
=
513
=
513
F
=
0.308674039
Sig F
=
0.578737192
df u
=
n-ku
25
(2) Testing a set of linear Restrictions When the Restrictions are Homogenous

When linear restrictions are homogenous:
– e.g. H0: b2 = b3 = 0
– e.g. H0: b2 = b3
we do not need to transform the
dependent variable of the restricted
equation.

For restrictions of this type
– I.e. where the dependent variable is the same in the
restricted and unrestricted regressions
we can re-write our F-ratio test statistic in terms
26
of R2s:
F-ratio test statistic for homogenous
restrictions:
df numerator
df denominato r
F
F
r
dfU
(R  R ) / r

2
1  RU / dfU
2
U
2
R
Where:
RSSU = unrestricted residual sum of squares
=
RSS under H1
RSSR = unrestricted residual sum of squares
= RSS under H0
r
= number of restrictions = diff. in no. parameters
between restricted and unrestricted equations
dfu
= df from unrestricted regression = n - k where k is all
coefficients including the intercept.
27
Proof of simpler formula for
homogenous restrictions:
If the dependent variable is the same in both the
restricted and unrestricted equations, then the TSS
will be the same
We can then make use of the fact that RSS = (1 - R2)
TSS, which implies that:
RSSR = (1- RR2) TSS
RSSU = (1- RU2) TSS
28
Proof continued...

Substituting RSSR = (1- RR2) TSS and RSSU
= (1- RU2) TSS into our original formula for the
F-ratio, we find that:
FdfrU
[(1  RR2 )TSS  (1  RU2 )TSS] / r

,
2
[(1  RU )TSS] / dfU
(1  RR2  1  RU2 ) / r

(1  RU2 ) / dfU
( RU2  RR2 ) / r

(1  RU2 ) / dfU
29
Example 1: Ho: no country effects
(R and U regressions have the same dependent variable)

Our approach to this restriction when
we tested it above was to use the RSSs
as follows:
F = (RSSR - RSSU) / r = (2097.722 - 1835.811)/3
RSSU/dfU
1835.811 / 511
= 24.301
Prob(F > F[3,511] 24.298) = 1.028E-14

 Reject H0
Since it is a homogenous restriction (I.e. dep
var is same in restricted and unrestricted
models), we shall now attempt the same test
but using the R2 formulation of the F-ratio
formula:
30

S
Unrestricted model: RU2 = 0.139
u
E
t
s
h
q
R
m
M
u
u
a
1
a
P
C

Restricted model: RR2 = 0.016
u
E
t
s
h
q
R
q
m
M
u
u
a
1
a
P
31
F = (RU2 - RR2) / r = (0.139 - 0.016)/3
(1-RU2) /dfU
(1- 0.139)
/ 511
= 0.041
= 24.301
0.0017
32
Restricted Model
ANOVA
Model
a
b
Sum of Squares
df
Mean Square
F
Sig.
1 Regression 34.86042
1 34.86042 8.541767 0.003624
Residual
2097.722
514 4.081172
Total
2132.583
515
Predictors: (Constant), money supply
Dependent Variable: inflation
Model Summary
Model
R
R Square Adjusted RStd.
Square
Error of the Estimate
1 0.127854 0.016347 0.014433 2.020191
a
Predictors: (Constant), money supply
Unrestricted Model
ANOVA
Model
a
b
Sum of Squares
df
Mean Square
F
Sig.
1 Regression 296.7719
4 74.19296 20.65169
0
Residual
1835.811
511 3.592585
Total
2132.583
515
Predictors: (Constant), CNTRY_3, CNTRY_2, CNTRY_1, money supply
Dependent Variable: inflation
Model Summary
Model
R
R Square Adjusted RStd.
Square
Error of the Estimate
1 0.373043 0.139161 0.132422 1.895412
a
Predictors: (Constant), CNTRY_3, CNTRY_2, CNTRY_1, money supply
33
F Test Statistic for homogenous restrictions:
2
2
r
=
df numerator
df denominator
F
(R  R ) / r
F  U 2 R
1 RU / dfU
=
3
ku
=
5
n
=
516
=
511
=
511
F
=
24.30111
Sig F
=
1.03E-14
r
dfU
df u
=
kU -kR
n-ku
34
(3) Testing a set of linear Restrictions When the Restrictions say that bi = 0 i

A special case of homogenous restrictions is
where we test for the existence of a
relationship
– I.e. H0: all slope coefficients are zero:

Unrestricted regression:
y = b1 + b2x2 + b3x3 + u
• H0: b2 = b3 = 0;
• If H0 is true, then y = b1

In this case, Restricted regression does no
explaining at all and so RR2 = 0
35
And the homogenous restriction F-ratio
test statistic reduces to:
df numerator
df denominato r
F
F
r
dfU
( R  0) / r

1  RU2 / dfU
2
U
2
U
2
U
(R ) / r

1  R / dfU

where,
r
= k -1
dfU = n - k
This is the F-test we came across in MII
Lecture 2, and is the one automatically
calculated in the SPSS ANOVA table
36
(4) Testing for Structural Breaks

The F-test also comes into play when we
want to test whether the estimated
coefficients change significantly if we split the
sample in two at a given point
 These tests are sometimes called “Chow
Tests” after one of its proponents.
 There are actually two versions of the test:
– Chow’s first test
– Chow’s second test
37
(a) Chow’s First Test
Use where n2 > k

(1) Run the regression on the first set of data
(i = 1, 2, 3, … n1) & let its RSS be RSSn1
 (2) Run the regression on the second set of
data (i = n1+1, n1+2, …, end of data) & let its
RSS be RSSn2
 (3) Run the regression on the two sets of data
combined (i = 1, …, end of data) & let its RSS
be RSSn1 + n2
38

(4) Compute RSSU, RSSR, r and dfU:
– RSSU = RSSn1 + RSSn2
– RSSR = RSSn1 + n2
–r
= k = total no. of coeffts including the
constant
– dfU = n1 + n2 -2k

(5) Use RSSU, RSSR, r and dfU to calculate F
using the general formula for F and find the
sig. Level:
( RSS  RSS ) / r
r
numerator
Fdfdfdenominato

F
dfU 
r
R
U
RSSU / dfU
39
(b) Chow’s Second Test
Use where n2 < k (I.e. when you have insufficient
observations on 2nd subsample to do Chow’s 1st test)

(1) Run the regression on the first set of data
(i = 1, 2, 3, … n1) & let its RSS be RSSn1

(2) Run the regression on the two sets of data
combined (i = 1, …, end of data) & let its RSS
be RSSn1 + n2
40

(3) Compute RSSU, RSSR, r and dfU:
–
–
–
–

RSSU = RSSn1
RSSR = RSSn1 + n2
r
= n2
dfU = n1 - k
(4) Use RSSU, RSSR, r and dfU to calculate F
using the general formula for F and find the
sig.:
( RSS  RSS ) / r
r
numerator
Fdfdfdenominato

F
dfU 
r
R
U
RSSU / dfU
41
Example of Chow’s
n1: before 1986:
st
1
Test:
n2: 1986 and after
a
i
c
f
i
c
n
d
a
n
d
z
e
d
z
e
f
d
f
a
i
e
n
f
d
f
t
i
s
c
f
t
i
s
S
B
e
M
t
E
i
g
t
B
.
S
B
e
M
t
E
i
1
(
C
3
0
7
9
1
(
9
1
7
0
3
8
5
1
M
8
3
9
2
8
M
0
6
6
6
4
6
9
1
8
4
M
7
7
1
4
6
M
4
9
9
4
9
0
3
6
1
9
C
6
7
4
1
9
C
6
5
1
9
2
7
7
8
0
8
C
4
1
3
0
0
C
3
3
6
0
1
3
2
8
2
8
C
5
4
7
1
0
C
4
4
0
2
0
3
2
9
7
3
C
C
4
6
6
9
0
9
0
2
2
4
5
1
1
5
6
C
C
0
8
4
5
2
0
0
4
5
1
0
9
3
7
2
C
C
3
7
5
0
5
5
2
6
9
7
9
4
0
5
2
C
C
3
0
1
1
3
0
7
4
5
0
2
9
6
6
4
C
C
1
1
1
8
5
1
5
2
0
7
2
2
7
0
7
C
C
0
2
0
0
1
2
4
7
7
5
2
0
6
3
6
a
a
.
D
D
42
ANOVA from n 1
ANOVA
Model
a
b
Sum of Squares
df
Mean Square
F
Sig.
1 Regression 670.1102
11 60.91911
31.2705 4.53E-43
Residual
563.0107
289 1.948134
Total
1233.121
300
Predictors: (Constant), CNTRY_9, CNTRY_8, CNTRY_7, CNTRY_6, CNTRY_
Dependent Variable: inflation
ANOVA from n 2
ANOVA
Model
Sum of Squares
df
1 Regression 65.9947
a
b
Mean Square
F
Sig.
11 5.999519 3.428609 0.000217
Residual
355.2176
203 1.749841
Total
421.2124
214
Predictors: (Constant), CNTRY_9, CNTRY_8, CNTRY_7, CNTRY_6, CNTRY_
Dependent Variable: inflation
ANOVA from n1 + n2
ANOVA
Model
Sum of Squares
df
Mean Square
F
Sig.
1 Regression 300.8519
11 27.35017 7.525389
Residual
1831.731
504 3.634387
Total
2132.583
515
0
43
k
r
=
=
12
k
=
12
n-k
=
=
=
301
215
492
n1
n2
df u
=
RSS R
= RSSn1+n2
=
1831.730825
RSSU
= RSSn1 + RSSn2
=
918.2283021
F
=
40.78898826
Sig F
=
4.18611E-66
(RSSR  RSSU ) / r
F 
RSSU / dfU
r
dfU
44
Summary:
(1) Testing a set of linear restrictions –
the general case
 (2) Testing homogenous Restrictions
 (3) Testing for a relationship – Special
Case of Homogenous Restrictions
 (4) Testing for Structural Breaks

45
Reading
Kennedy (1998) “A Guide to
Econometrics”, Chapters 4 and 6
 Maddala, G.S. (1992) “Introduction to
Econometrics” p. 170-177

46