Chapter 2 f test of goodness of fit

Download Report

Transcript Chapter 2 f test of goodness of fit

Christopher Dougherty

EC220 - Introduction to econometrics (chapter 2)

Slideshow: f test of goodness of fit Original citation:

Dougherty, C. (2012) EC220 - Introduction to econometrics (chapter 2). [Teaching Resource] © 2012 The Author This version available at: http://learningresources.lse.ac.uk/128/ Available in LSE Learning Resources Online: May 2012 This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. This license allows the user to remix, tweak, and build upon the work even for commercial purposes, as long as the user credits the author and licenses their new creations under the identical terms. http://creativecommons.org/licenses/by-sa/3.0/

http://learningresources.lse.ac.uk/

F TEST OF GOODNESS OF FIT

(

Y

Y

) 2

TSS

  

(

Y

ˆ

ESS

 

Y

) 2

RSS

 

e

2 In an earlier sequence it was demonstrated that the sum of the squares of the actual values of Y (TSS: total sum of squares) could be decomposed into the sum of the squares of the fitted values (ESS: explained sum of squares) and the sum of the squares of the residuals.

1

F TEST OF GOODNESS OF FIT

(

Y

Y

) 2

TSS

  

(

Y

ˆ

ESS

 

Y

) 2

RSS

 

e

2

R

2

ESS TSS

  

(

Y

ˆ

i

(

Y i

Y

)

2

Y

)

2

R

2 , the usual measure of goodness of fit, was then defined to be the ratio of the explained sum of squares to the total sum of squares.

2

F TEST OF GOODNESS OF FIT

(

Y

Y

) 2

TSS

  

(

Y

ˆ

ESS

 

Y

) 2

RSS

 

e

2

R

2

ESS TSS

  

(

Y

ˆ

i

(

Y i

Y

)

2

Y

)

2

Y

 

1

 

2

X

u

The null hypothesis that we are going to test is that the model has no explanatory power.

3

F TEST OF GOODNESS OF FIT

(

Y

Y

) 2

TSS

  

(

Y

ˆ

ESS

 

Y

) 2

RSS

 

e

2

R

2

ESS TSS

  

(

Y

ˆ

i

(

Y i

Y

)

2

Y

)

2

Y

 

1

 

2

X

u H

0

:

2

0 ,

H

1

:

2

0

Since X is the only explanatory variable at the moment, the null hypothesis is that Y is not determined by X. Mathematically, we have H 0 :

2 = 0

4

F TEST OF GOODNESS OF FIT

(

Y

Y

) 2

TSS

  

(

Y

ˆ

ESS

 

Y

) 2

RSS

 

e

2

R

2

ESS TSS

  

(

Y

ˆ

i

(

Y i

Y

)

2

Y

)

2

Y

 

1

 

2

X

u H

0

:

2

0 ,

H

1

:

2

0

ESS F

(

k

1 ,

n

k

)

ESS RSS

/(

k

1 ) /(

n

k

)

TSS RSS TSS

(

k

1 ) (

n

k

)

( 1

R

2 /(

R

2 )

k

/(

1 )

n

k

) Hypotheses concerning goodness of fit are tested via the F statistic, defined as shown. k is the number of parameters in the regression equation, which at present is just 2.

5

F TEST OF GOODNESS OF FIT

(

Y

Y

) 2

TSS

  

(

Y

ˆ

ESS

 

Y

) 2

RSS

 

e

2

R

2

ESS TSS

  

(

Y

ˆ

i

(

Y i

Y

)

2

Y

)

2

Y

 

1

 

2

X

u H

0

:

2

0 ,

H

1

:

2

0

ESS F

(

k

1 ,

n

k

)

ESS RSS

/(

k

1 ) /(

n

k

)

TSS RSS TSS

(

k

1 ) (

n

k

)

( 1

R

2 /(

R

2 )

k

/(

1 )

n

k

)

n

k is, as with the t statistic, the number of degrees of freedom (number of observations less the number of parameters estimated). For simple regression analysis, it is n – 2.

6

F TEST OF GOODNESS OF FIT

(

Y

Y

) 2

TSS

  

(

Y

ˆ

ESS

 

Y

) 2

RSS

 

e

2

R

2

ESS TSS

  

(

Y

ˆ

i

(

Y i

Y

)

2

Y

)

2

Y

 

1

 

2

X

u H

0

:

2

0 ,

H

1

:

2

0

ESS F

(

k

1 ,

n

k

)

ESS RSS

/(

k

1 ) /(

n

k

)

TSS RSS TSS

(

k

1 ) (

n

k

)

( 1

R

2 /(

R

2 )

k

/(

1 )

n

k

) The F statistic may alternatively be written in terms of R 2 . First divide the numerator and denominator by TSS.

7

F TEST OF GOODNESS OF FIT

(

Y

Y

) 2

TSS

  

(

Y

ˆ

ESS

 

Y

) 2

RSS

 

e

2

R

2

ESS TSS

  

(

Y

ˆ

i

(

Y i

Y

)

2

Y

)

2

Y

 

1

 

2

X

u H

0

:

2

0 ,

H

1

:

2

0

ESS F

(

k

1 ,

n

k

)

ESS RSS

/(

k

1 ) /(

n

k

)

TSS RSS TSS

(

k

1 ) (

n

k

)

( 1

R

2 /(

R

2 )

k

/(

1 )

n

k

) We can now rewrite the F statistic as shown. The R 2 the definition of R 2 .

in the numerator comes straight from

8

F TEST OF GOODNESS OF FIT

RSS TSS

TSS

ESS TSS

1

ESS TSS

1

R

2

R

2

ESS TSS

  

(

Y

ˆ

i

(

Y i

Y

)

2

Y

)

2

Y

 

1

 

2

X

u H

0

:

2

0 ,

H

1

:

2

0

ESS F

(

k

1 ,

n

k

)

ESS RSS

/(

k

1 ) /(

n

k

)

TSS RSS TSS

(

k

1 ) (

n

k

)

( 1

R

2 /(

R

2 )

k

/(

1 )

n

k

) It is easily demonstrated that RSS/TSS is equal to 1 – R 2 .

9

F TEST OF GOODNESS OF FIT

(

Y

Y

) 2

TSS

  

(

Y

ˆ

ESS

 

Y

) 2

RSS

 

e

2

R

2

ESS TSS

  

(

Y

ˆ

i

(

Y i

Y

)

2

Y

)

2

Y

 

1

 

2

X

u H

0

:

2

0 ,

H

1

:

2

0

ESS F

(

k

1 ,

n

k

)

ESS RSS

/(

k

1 ) /(

n

k

)

TSS RSS TSS

(

k

1 ) (

n

k

)

( 1

R

2 /(

R

2 )

k

/(

1 )

n

k

) F is a monotonically increasing function of R 2 . As R 2 increases, the numerator increases and the denominator decreases, so for both of these reasons F increases.

10

F

140 120 100 80 60 40 20 0 0

F

(

k

F TEST OF GOODNESS OF FIT

F

1 ,

n

k

) ( 1 , 18 )

 

( 1

( 1

R

2

R

2

/(

k

) /(

1 )

n

R

2

R

2

/ ) 1 / 18

k

)

0.2

0.4

0.6

0.8

1

R

2 Here is F plotted as a function of R 2 20 observations. for the case where there is 1 explanatory variable and

11

F

140 120 100 80 60 40 20 0 0

F

(

k

F TEST OF GOODNESS OF FIT

F

1 ,

n

k

) ( 1 , 18 )

 

( 1

( 1

R

2

R

2

/(

k

) /(

1 )

n

R

2

R

2

/ ) 1 / 18

0.2

0.4

0.6

If the null hypothesis is true, F will have a random distribution.

k

)

0.8

1

R

2

12

F

140 120 100 80 60 40 20 0 0

F

(

k

F TEST OF GOODNESS OF FIT

1 ,

n

k F

( 1 , 18 )

F

crit , 5 %

)

 

( 1

( 1 , 18 )

R

2

R

2

/(

k

) /(

1 )

n

( 1

R

2

R

2

/ 1 ) / 18 4 .

41

k

)

0.2

0.4

0.6

0.8

1

R

2 There will be some critical value which it will exceed only 5 percent of the time. If we are performing a 5 percent significance test, we will reject H this critical value. 0 if the F statistic is greater than

13

F

140 120 100 80 60 40 20 0 0

F

(

k

F TEST OF GOODNESS OF FIT

1 ,

n

k F

( 1 , 18 )

F

crit , 5 %

)

 

( 1

( 1 , 18 )

R

2

R

2

/(

k

) /(

1 )

n

( 1

R

2

R

2

/ 1 ) / 18 4 .

41

k

)

0.2

0.4

0.6

0.8

1

R

2 In the case of an F test, the critical value depends on the number of explanatory variables as well as the number of degrees of freedom.

14

F

140 120 100 80 60 40 20 0 0

F

(

k

F TEST OF GOODNESS OF FIT

1 ,

n

k F

( 1 , 18 )

F

crit , 5 %

)

 

( 1

( 1 , 18 )

R

2

R

2

/(

k

) /(

1 )

n

( 1

R

2

R

2

/ 1 ) / 18 4 .

41

k

)

0.2

0.4

0.6

0.8

1

R

2 For the present example, the critical value for a 5 percent significance test is 4.41, when R 2 is 0.20.

15

F

140 120 100 80 60 40 20 0 0

F

(

k

F TEST OF GOODNESS OF FIT

1 ,

n

k F

( 1 , 18 )

F

crit , 1 %

)

 

( 1

( 1 , 18 )

R

2

R

2

/(

k

) /(

1 )

n

( 1

R

2

R

2

/ 1 ) / 18 8 .

29

k

)

0.2

0.4

0.6

0.8

1

R

2 If we wished to be more cautious, we could perform a 1 percent test. For this the critical value of F is 8.29, where R 2 is 0.32.

16

F

140 120 100 80 60 40 20 0 0

F

(

k

F TEST OF GOODNESS OF FIT

1 ,

n

k F

( 1 , 18 )

F

crit , 1 %

)

 

( 1

( 1 , 18 )

R

2

R

2

/(

k

) /(

1 )

n

( 1

R

2

R

2

/ 1 ) / 18 8 .

29

k

)

0.2

0.4

0.6

0.8

1

R

2 If R 2 is higher than 0.32, F will be higher than 8.29, and we will reject the null hypothesis at the 1 percent level.

17

F

140 120 100 80 60 40 20 0 0

F

(

k

F TEST OF GOODNESS OF FIT

1 ,

n

k F

( 1 , 18 )

F

crit , 1 %

)

 

( 1

( 1 , 18 )

R

2

R

2

/(

k

) /(

1 )

n

( 1

R

2

R

2

/ 1 ) / 18 8 .

29

k

)

0.2

0.4

0.6

0.8

1

R

2 Why do we perform the test indirectly, through F, instead of directly through R 2 ? After all, it would be easy to compute the critical values of R 2 from those for F.

18

F

140 120 100 80 60 40 20 0 0

F

(

k

F TEST OF GOODNESS OF FIT

1 ,

n

k F

( 1 , 18 )

F

crit , 1 %

)

 

( 1

( 1 , 18 )

R

2

R

2

/(

k

) /(

1 )

n

( 1

R

2

R

2

/ 1 ) / 18 8 .

29

k

)

0.2

0.4

0.6

0.8

1

R

2 The reason is that an F test can be used for several tests of analysis of variance. Rather than have a specialized table for each test, it is more convenient to have just one.

19

F TEST OF GOODNESS OF FIT

(

Y

Y

) 2

TSS

  

(

Y

ˆ

ESS

 

Y

) 2

RSS

 

e

2

R

2

ESS TSS

  

(

Y

ˆ

i

(

Y i

Y

)

2

Y

)

2

Y

 

1

 

2

X

u H

0

:

2

0 ,

H

1

:

2

0

ESS F

(

k

1 ,

n

k

)

ESS RSS

/(

k

1 ) /(

n

k

)

TSS RSS TSS

(

k

1 ) (

n

k

)

( 1

R

2 /(

R

2 )

k

/(

1 )

n

k

) Note that, for simple regression analysis, the null and alternative hypotheses are mathematically exactly the same as for a two-tailed t test. Could the F test come to a different conclusion from the t test?

20

F TEST OF GOODNESS OF FIT

(

Y

Y

) 2

TSS

  

(

Y

ˆ

ESS

 

Y

) 2

RSS

 

e

2

R

2

ESS TSS

  

(

Y

ˆ

i

(

Y i

Y

)

2

Y

)

2

Y

 

1

 

2

X

u H

0

:

2

0 ,

H

1

:

2

0

ESS F

(

k

1 ,

n

k

)

ESS RSS

/(

k

1 ) /(

n

k

)

TSS RSS TSS

(

k

1 ) (

n

k

)

( 1

R

2 /(

R

2 )

k

/(

1 )

n

k

) The answer, of course, is no. We will demonstrate that, for simple regression analysis, the F statistic is the square of the t statistic.

21

F TEST OF GOODNESS OF FIT

F

RSS ESS

/(

n

2 )

  

e i

2

Y

ˆ

i

 

n Y

 

2 2

   

[

b

1

b

2

X i

]

[

b

1

s u

2

b

2

X

]

2

1

s u

2

b

2 2

X i

X

2

b

2 2

s u

2

 

X i

X

2

s u

2

 

b

2 2

X i

X

2

b

2 2

s

.

e

.(

b

2 )

2

t

2 We start by replacing ESS and RSS by their mathematical expressions.

22

F TEST OF GOODNESS OF FIT

F

RSS ESS

/(

n

2 )

  

e i

2

Y

ˆ

i

 

n Y

 

2 2

   

[

b

1

b

2

X i

]

[

b

1

s u

2

b

2

X

]

2

1

s u

2

b

2 2

X i

X

2

b

2 2

s u

2

 

X i

X

2

s u

2

 

b

2 2

X i

X

2

b

2 2

s

.

e

.(

b

2 )

2

t

2 The denominator is the expression for s

u

2 , the estimator of

s

u

2 , for the simple regression model. We expand the numerator using the expression for the fitted relationship.

23

F TEST OF GOODNESS OF FIT

F

RSS ESS

/(

n

2 )

  

e i

2

Y

ˆ

i

 

n Y

 

2 2

   

[

b

1

b

2

X i

]

[

b

1

s u

2

b

2

X

]

2

1

s u

2

b

2 2

X i

X

2

b

2 2

s u

2

 

X i

X

2

s u

2

 

b

2 2

X i

X

2

b

2 2

s

.

e

.(

b

2 )

2

t

2 The b 1 terms in the numerator cancel. The rest of the numerator can be grouped as shown.

24

F TEST OF GOODNESS OF FIT

F

RSS ESS

/(

n

2 )

  

e i

2

Y

ˆ

i

 

n Y

 

2 2

   

[

b

1

b

2

X i

]

[

b

1

s u

2

b

2

X

]

2

1

s u

2

b

2 2

X i

X

2

b

2 2

s u

2

 

X i

X

2

s u

2

 

b

2 2

X i

X

2

b

2 2

s

.

e

.(

b

2 )

2

t

2 We take the b 2 2 term out of the summation as a factor.

25

F TEST OF GOODNESS OF FIT

F

RSS ESS

/(

n

2 )

  

e i

2

Y

ˆ

i

 

n Y

 

2 2

   

[

b

1

b

2

X i

]

[

b

1

s u

2

b

2

X

]

2

1

s u

2

b

2 2

X i

X

2

b

2 2

s u

2

 

X i

X

2

s u

2

 

b

2 2

X i

X

2

b

2 2

s

.

e

.(

b

2 )

2

t

2 We move the term involving X to the denominator.

26

F TEST OF GOODNESS OF FIT

F

RSS ESS

/(

n

2 )

  

e i

2

Y

ˆ

i

 

n Y

 

2 2

   

[

b

1

b

2

X i

]

[

b

1

s u

2

b

2

X

]

2

1

s u

2

b

2 2

X i

X

2

b

2 2

s u

2

 

X i

X

2

s u

2

 

b

2 2

X i

X

2

b

2 2

s

.

e

.(

b

2 )

2

t

2 The denominator is the square of the standard error of b 2 .

27

F TEST OF GOODNESS OF FIT

F

RSS ESS

/(

n

2 )

  

e i

2

Y

ˆ

i

 

n Y

 

2 2

   

[

b

1

b

2

X i

]

[

b

1

s u

2

b

2

X

]

2

1

s u

2

b

2 2

X i

X

2

b

2 2

s u

2

 

X i

X

2

s u

2

 

b

2 2

X i

X

2

b

2 2

s

.

e

.(

b

2 )

2

t

2 Hence we obtain b 2 2 squared.

divided by the square of the standard error of b 2 . This is the t statistic,

28

F TEST OF GOODNESS OF FIT

F

RSS ESS

/(

n

2 )

  

e i

2

Y

ˆ

i

 

n Y

 

2 2

   

[

b

1

b

2

X i

]

[

b

1

s u

2

b

2

X

]

2

1

s u

2

b

2 2

X i

X

2

b

2 2

s u

2

 

X i

X

2

s u

2

 

b

2 2

X i

X

2

b

2 2

s

.

e

.(

b

2 )

2

t

2 It can also be shown that the critical value of F, at any significance level, is equal to the square of the critical value of t. We will not attempt to prove this.

29

F TEST OF GOODNESS OF FIT

F

RSS ESS

/(

n

2 )

  

e i

2

Y

ˆ

i

 

n Y

 

2 2

   

[

b

1

b

2

X i

]

[

b

1

s u

2

b

2

X

]

2

1

s u

2

b

2 2

X i

X

2

b

2 2

s u

2

 

X i

X

2

s u

2

 

b

2 2

X i

X

2

b

2 2

s

.

e

.(

b

2 )

2

t

2 Since the F test is equivalent to a two-tailed t test in the simple regression model, there is no point in performing both tests. In fact, if justified, a one-tailed t test would be better than either because it is more powerful (lower risk of Type II error if H 0 is false).

30

F TEST OF GOODNESS OF FIT

F

RSS ESS

/(

n

2 )

  

e i

2

Y

ˆ

i

 

n Y

 

2 2

   

[

b

1

b

2

X i

]

[

b

1

s u

2

b

2

X

]

2

1

s u

2

b

2 2

X i

X

2

b

2 2

s u

2

 

X i

X

2

s u

2

 

b

2 2

X i

X

2

b

2 2

s

.

e

.(

b

2 )

2

t

2 The F test will have its own role to play when we come to multiple regression analysis.

31

F TEST OF GOODNESS OF FIT . reg EARNINGS S Source | SS df MS Number of obs = 540 -------------+----------------------------- F( 1, 538) = 112.15

Model | 19321.5589 1 19321.5589 Prob > F = 0.0000

Residual | 92688.6722 538 172.283777 R-squared = 0.1725

-------------+----------------------------- Adj R-squared = 0.1710

Total | 112010.231 539 207.811189 Root MSE = 13.126

----------------------------------------------------------------------------- EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+--------------------------------------------------------------- S | 2.455321 .2318512 10.59 0.000 1.999876 2.910765

_cons | -13.93347 3.219851 -4.33 0.000 -20.25849 -7.608444

----------------------------------------------------------------------------- Here is the output for the regression of hourly earnings on years of schooling for the sample of 540 respondents from the National Longitudinal Survey of Youth.

32

F TEST OF GOODNESS OF FIT . reg EARNINGS S Source | SS df MS Number of obs = 540 -------------+----------------------------- F( 1, 538) = 112.15

Model | 19321.5589 1 19321.5589 Prob > F = 0.0000

Residual | 92688.6722 538 172.283777 R-squared = 0.1725

-------------+----------------------------- Adj R-squared = 0.1710

Total | 112010.231 539 207.811189 Root MSE = 13.126

----------------------------------------------------------------------------- EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+--------------------------------------------------------------- S | 2.455321 .2318512 10.59 0.000 1.999876 2.910765

_cons | -13.93347 3.219851 -4.33 0.000 -20.25849 -7.608444

------------------------------------------------------------------------------

F

( 1 ,

n

2 )

ESS

(

RSS

) /(

n

2 )

19322 92689 /( 540

2 )

19322 172 .

28

112 .

15

We shall check that the F statistic has been calculated correctly. The explained sum of squares (described in Stata as the model sum of squares) is 19322.

33

F TEST OF GOODNESS OF FIT . reg EARNINGS S Source | SS df MS Number of obs = 540 -------------+----------------------------- F( 1, 538) = 112.15

Model | 19321.5589 1 19321.5589 Prob > F = 0.0000

Residual | 92688.6722 538 172.283777 R-squared = 0.1725

-------------+----------------------------- Adj R-squared = 0.1710

Total | 112010.231 539 207.811189 Root MSE = 13.126

----------------------------------------------------------------------------- EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+--------------------------------------------------------------- S | 2.455321 .2318512 10.59 0.000 1.999876 2.910765

_cons | -13.93347 3.219851 -4.33 0.000 -20.25849 -7.608444

------------------------------------------------------------------------------

F

( 1 ,

n

2 )

RSS ESS

/(

n

2 )

19322 92689 /( 540

2 )

19322 172 .

28

112 .

15

The residual sum of squares is 92689.

34

F TEST OF GOODNESS OF FIT . reg EARNINGS S Source | SS df MS Number of obs = 540 -------------+----------------------------- F( 1, 538) = 112.15

Model | 19321.5589 1 19321.5589 Prob > F = 0.0000

Residual | 92688.6722 538 172.283777 R-squared = 0.1725

-------------+----------------------------- Adj R-squared = 0.1710

Total | 112010.231 539 207.811189 Root MSE = 13.126

----------------------------------------------------------------------------- EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+--------------------------------------------------------------- S | 2.455321 .2318512 10.59 0.000 1.999876 2.910765

_cons | -13.93347 3.219851 -4.33 0.000 -20.25849 -7.608444

------------------------------------------------------------------------------

F

( 1 ,

n

2 )

RSS ESS

/(

n

2 )

19322 92689 /( 540

2 )

19322 172 .

28

112 .

15

The number of degrees of freedom is 540 – 2 = 538.

35

F TEST OF GOODNESS OF FIT . reg EARNINGS S Source | SS df MS Number of obs = 540 -------------+----------------------------- F( 1, 538) = 112.15

Model | 19321.5589 1 19321.5589 Prob > F = 0.0000

Residual | 92688.6722 538 172.283777 R-squared = 0.1725

-------------+----------------------------- Adj R-squared = 0.1710

Total | 112010.231 539 207.811189 Root MSE = 13.126

----------------------------------------------------------------------------- EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+--------------------------------------------------------------- S | 2.455321 .2318512 10.59 0.000 1.999876 2.910765

_cons | -13.93347 3.219851 -4.33 0.000 -20.25849 -7.608444

------------------------------------------------------------------------------

F

( 1 ,

n

2 )

RSS ESS

/(

n

2 )

19322 92689 /( 540

2 )

19322 172 .

28

112 .

15

The denominator of the expression for F is therefore 172.28. Note that this is an estimate of

s

u

2 . Its square root, denoted in Stata by Root MSE, is an estimate of the standard deviation of u.

36

F TEST OF GOODNESS OF FIT . reg EARNINGS S Source | SS df MS Number of obs = 540 -------------+----------------------------- F( 1, 538) = 112.15

Model | 19321.5589 1 19321.5589 Prob > F = 0.0000

Residual | 92688.6722 538 172.283777 R-squared = 0.1725

-------------+----------------------------- Adj R-squared = 0.1710

Total | 112010.231 539 207.811189 Root MSE = 13.126

----------------------------------------------------------------------------- EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+--------------------------------------------------------------- S | 2.455321 .2318512 10.59 0.000 1.999876 2.910765

_cons | -13.93347 3.219851 -4.33 0.000 -20.25849 -7.608444

------------------------------------------------------------------------------

F

( 1 ,

n

2 )

RSS ESS

/(

n

2 )

19322 92689 /( 540

2 )

19322 172 .

28

112 .

15

Our calculation of F agrees with that in the Stata output.

37

F TEST OF GOODNESS OF FIT . reg EARNINGS S Source | SS df MS Number of obs = 540 -------------+----------------------------- F( 1, 538) = 112.15

Model | 19321.5589 1 19321.5589 Prob > F = 0.0000

Residual | 92688.6722 538 172.283777 R-squared = 0.1725

-------------+----------------------------- Adj R-squared = 0.1710

Total | 112010.231 539 207.811189 Root MSE = 13.126

----------------------------------------------------------------------------- EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+--------------------------------------------------------------- S | 2.455321 .2318512 10.59 0.000 1.999876 2.910765

_cons | -13.93347 3.219851 -4.33 0.000 -20.25849 -7.608444

------------------------------------------------------------------------------

F

( 1 ,

n

2 )

( 1

R

2

R

2

) /(

n

2 )

( 1

0 .

1725 0 .

1725 ) /( 540

2 )

112 .

15

We will also check the F statistic using theexpression for it in terms of R 2 . We see again that it agrees.

38

F TEST OF GOODNESS OF FIT . reg EARNINGS S Source | SS df MS Number of obs = 540 -------------+----------------------------- F( 1, 538) = 112.15

Model | 19321.5589 1 19321.5589 Prob > F = 0.0000

Residual | 92688.6722 538 172.283777 R-squared = 0.1725

-------------+----------------------------- Adj R-squared = 0.1710

Total | 112010.231 539 207.811189 Root MSE = 13.126

----------------------------------------------------------------------------- EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+--------------------------------------------------------------- S | 2.455321 .2318512 10.59 0.000 1.999876 2.910765

_cons | -13.93347 3.219851 -4.33 0.000 -20.25849 -7.608444

----------------------------------------------------------------------------- We will also check the relationship between the F statistic and the t statistic for the slope coefficient.

39

F TEST OF GOODNESS OF FIT . reg EARNINGS S Source | SS df MS Number of obs = 540 -------------+----------------------------- F( 1, 538) = 112.15

Model | 19321.5589 1 19321.5589 Prob > F = 0.0000

Residual | 92688.6722 538 172.283777 R-squared = 0.1725

-------------+----------------------------- Adj R-squared = 0.1710

Total | 112010.231 539 207.811189 Root MSE = 13.126

----------------------------------------------------------------------------- EARNINGS | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+--------------------------------------------------------------- S | 2.455321 .2318512 10.59 0.000 1.999876 2.910765

_cons | -13.93347 3.219851 -4.33 0.000 -20.25849 -7.608444

----------------------------------------------------------------------------- 112 .

15

10 .

59 2 Obviously, this is correct as well.

40

Copyright Christopher Dougherty 2011.

These slideshows may be downloaded by anyone, anywhere for personal use.

Subject to respect for copyright and, where appropriate, attribution, they may be used as a resource for teaching an econometrics course. There is no need to refer to the author.

The content of this slideshow comes from Section 2.7 of C. Dougherty, Introduction to Econometrics, fourth edition 2011, Oxford University Press.

Additional (free) resources for both students and instructors may be downloaded from the OUP Online Resource Centre http://www.oup.com/uk/orc/bin/9780199567089/ .

Individuals studying econometrics on their own and who feel that they might benefit from participation in a formal course should consider the London School of Economics summer school course EC212 Introduction to Econometrics http://www2.lse.ac.uk/study/summerSchools/summerSchool/Home.aspx

or the University of London International Programmes distance learning course 20 Elements of Econometrics www.londoninternational.ac.uk/lse .

11.07.25