1 / 46

Module II Lecture 4:F-Tests

Graduate School 2004/2005 Quantitative Research Methods Gwilym Pryce g.pryce@socsci.gla.ac.uk. Module II Lecture 4:F-Tests. Plan:. (1) Testing a set of linear restrictions – the general case (2) Testing homogenous Restrictions

posy
Download Presentation

Module II Lecture 4:F-Tests

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Graduate School 2004/2005 Quantitative Research Methods Gwilym Pryce g.pryce@socsci.gla.ac.uk Module II Lecture 4:F-Tests

  2. 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

  3. (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:

  4. 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:

  5. The General formula for F: NB RSSR is always greater than RSSU since imposing a restriction on an equation can never reduce the RSS Where: RSSU = restricted 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.

  6. 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

  7. 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.

  8. Example 1: Ho: no country effects(R and U regressions have the same dependent variable) Step (i) RSSU = 1835.811

  9. Step (ii) RSSR = 2097.722

  10. Step (iii) r and dfu • r = number of restrictions = difference in no. of parameters between the restricted and unrestricted equations = 3 • dfu = df from unrestricted regression = nU - kU where k is total number of all coefficients including the intercept • = 516 - 5 = 511

  11. (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

  12. Alternatively use Excel calculator:F-Tests.xls First Paste ANOVA tables of U and R models:

  13. Second, check cell formulas, & let Excel do the rest:

  14. 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

  15. 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

  16. Example 3: Ho: b2 = b3(R and U regressions have the same dependent variable) • Unrestricted regression: y = b1 + b2x2 + b3x3 + u • H0: b2 = b3; H1: b2b3 • If H0 is true, then: y = b1 + b2x2 + b2x3 + u = b1 + b2(x2 + x3) + u • Restricted regression: y = b1 + b2(w)+ uwhere w = x2 + x3;

  17. 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 + b2MP_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)+ uwhere z = Infl - MP_GDP; v = MS_GDP + MP_GDP

  18. Step (i) RSSU = 2069.060

  19. 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 /STATISTICS COEFF OUTS R ANOVA /NOORIGIN /DEPENDENT Z /METHOD=ENTER V . • SPSS ANOVA Output:

  20. Step (iii) r and dfu • r = number of restrictions = difference in no. of parameters between the restricted and unrestricted equations = 1 • dfu = df from unrestricted regression = nU - kU where k is total number of all coefficients including the intercept • = 516 - 3 = 513

  21. (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

  22. Using F-Tests.xls:

  23. (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 of R2s:

  24. F-ratio test statistic for homogenous restrictions: 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.

  25. 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

  26. Proof continued... • Substituting RSSR = (1- RR2) TSS and RSSU = (1- RU2) TSS into our original formula for the F-ratio, we find that:

  27. 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: • 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: • 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

  28. Unrestricted model: RU2 = 0.139 • Restricted model: RR2 = 0.016

  29. F = (RU2 - RR2) / r = (0.139 - 0.016)/3 = 0.041 = 24.301 (1-RU2)/dfU (1-0.139) / 511 0.0017

  30. (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

  31. And the homogenous restriction F-ratio test statistic reduces to: 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

  32. (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

  33. (a) Chow’s First TestUse 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

  34. (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:

  35. (b) Chow’s Second TestUse 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

  36. (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.:

  37. Example of Chow’s 1st Test: n1: before 1986: n2: 1986 and after

  38. 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

  39. Reading • Kennedy (1998) “A Guide to Econometrics”, Chapters 4 and 6 • Maddala, G.S. (1992) “Introduction to Econometrics” p. 170-177

More Related