
F-test Comparing Two Models

R2y.12...k1 has all of the same variables as R2y.12...k2 plus more additional variables. Thus, R2y.12...k1 can be said to be nested in R2y.12...k2. The denominator always contains (1 - R2y.12...k1) for the model with more variables.
An Example Using hsb2
First model includes read math science socst female & ses.
use http://www.gseis.ucla.edu/courses/data/hsb2 regress write read math science socst female ses Source | SS df MS Number of obs = 200 -------------+------------------------------ F( 6, 193) = 48.66 Model | 10763.6571 6 1793.94285 Prob > F = 0.0000 Residual | 7115.21791 193 36.866414 R-squared = 0.6020 -------------+------------------------------ Adj R-squared = 0.5897 Total | 17878.875 199 89.843593 Root MSE = 6.0718 ------------------------------------------------------------------------------ write | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- read | .1263026 .0651304 1.94 0.054 -.0021563 .2547614 math | .2390707 .0673088 3.55 0.000 .1063154 .371826 science | .2439102 .0610028 4.00 0.000 .1235925 .3642278 socst | .2336959 .0539537 4.33 0.000 .1272814 .3401104 female | 5.444119 .8845485 6.15 0.000 3.699496 7.188742 ses | -.2751714 .6439092 -0.43 0.670 -1.545174 .994831 _cons | 6.297198 2.838673 2.22 0.028 .6983924 11.896 ------------------------------------------------------------------------------
Second model includes all of the above variables except for read female & ses.
regress write math science socst Source | SS df MS Number of obs = 200 -------------+------------------------------ F( 3, 196) = 69.36 Model | 9206.56411 3 3068.8547 Prob > F = 0.0000 Residual | 8672.31089 196 44.2464841 R-squared = 0.5149 -------------+------------------------------ Adj R-squared = 0.5075 Total | 17878.875 199 89.843593 Root MSE = 6.6518 ------------------------------------------------------------------------------ write | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- math | .2887075 .0696839 4.14 0.000 .151281 .4261339 science | .221637 .0624744 3.55 0.000 .0984286 .3448454 socst | .3017268 .0533039 5.66 0.000 .1966039 .4068496 _cons | 10.27213 3.002846 3.42 0.001 4.35009 16.19416 ------------------------------------------------------------------------------
Manual Arithmetic
(R2y.12...k1 - R2y.12...k2)/(k1 - k2) F = ----------------------------------- (1 - R2y.12...k1)/(N - k1 - 1) (.6020 - .5149)/(6-3) .0871/3 .0290333333333 = ------------------------ = -------- = ---------------- = 14.078 (1 - .6020)/(200 - 6 -1) .398/193 .0020621761658 with df = (k1 -k2) & (N - k1 -1) = 3 & 193
Using Stata
regress write read math science socst female ses Source | SS df MS Number of obs = 200 -------------+------------------------------ F( 6, 193) = 48.66 Model | 10763.6571 6 1793.94285 Prob > F = 0.0000 Residual | 7115.21791 193 36.866414 R-squared = 0.6020 -------------+------------------------------ Adj R-squared = 0.5897 Total | 17878.875 199 89.843593 Root MSE = 6.0718 ------------------------------------------------------------------------------ write | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- read | .1263026 .0651304 1.94 0.054 -.0021563 .2547614 math | .2390707 .0673088 3.55 0.000 .1063154 .371826 science | .2439102 .0610028 4.00 0.000 .1235925 .3642278 socst | .2336959 .0539537 4.33 0.000 .1272814 .3401104 female | 5.444119 .8845485 6.15 0.000 3.699496 7.188742 ses | -.2751714 .6439092 -0.43 0.670 -1.545174 .994831 _cons | 6.297198 2.838673 2.22 0.028 .6983924 11.896 ------------------------------------------------------------------------------ test read gender ses ( 1) read = 0.0 ( 2) female = 0.0 ( 3) ses = 0.0 F( 3, 193) = 14.08 Prob > F = 0.0000
Phil Ender, 14jan00