Linear Statistical Models: Regression

Specification Errors

Updates for Stata 11


Specification Errors

Recall that specification errors include:

Omitting Relevant Variables

Including Irrelevant Variables

Some Stata Commands

use http://www.philender.com/courses/data/hsbdemo, clear

regress read write female i.ses

      Source |       SS       df       MS              Number of obs =     200
-------------+------------------------------           F(  4,   195) =   35.32
       Model |  8789.20628     4  2197.30157           Prob > F      =  0.0000
    Residual |  12130.2137   195  62.2062242           R-squared     =  0.4201
-------------+------------------------------           Adj R-squared =  0.4083
       Total |    20919.42   199  105.122714           Root MSE      =  7.8871

------------------------------------------------------------------------------
        read |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       write |    .666923   .0631027    10.57   0.000     .5424716    .7913743
      female |  -3.997829   1.182598    -3.38   0.001    -6.330155   -1.665504
             |
         ses |
          2  |   1.727183   1.427627     1.21   0.228    -1.088388    4.542754
          3  |   3.967854   1.610743     2.46   0.015     .7911399    7.144568
             |
       _cons |   17.24087   3.271046     5.27   0.000      10.7897    23.69204
------------------------------------------------------------------------------

testparm i.ses

 ( 1)  2.ses = 0
 ( 2)  3.ses = 0

       F(  2,   195) =    3.11
            Prob > F =    0.0467

linktest

      Source |       SS       df       MS              Number of obs =     200
-------------+------------------------------           F(  2,   197) =   72.36
       Model |  8859.13636     2  4429.56818           Prob > F      =  0.0000
    Residual |  12060.2836   197  61.2197139           R-squared     =  0.4235
-------------+------------------------------           Adj R-squared =  0.4176
       Total |    20919.42   199  105.122714           Root MSE      =  7.8243

------------------------------------------------------------------------------
        read |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        _hat |  -.2489419   1.171552    -0.21   0.832    -2.559335    2.061451
      _hatsq |   .0121192   .0113394     1.07   0.286    -.0102429    .0344814
       _cons |   31.63874   29.92719     1.06   0.292    -27.38005    90.65752
------------------------------------------------------------------------------

ovtest

Ramsey RESET test using powers of the fitted values of read
       Ho:  model has no omitted variables
                 F(3, 192) =      1.44
                  Prob > F =      0.2337
                  
use http://www.philender.com/courses/data/gpa, clear

regress gpa mat ar

  Source |       SS       df       MS                  Number of obs =      30
---------+------------------------------               F(  2,    27) =   13.09
   Model |  5.13721671     2  2.56860836               Prob > F      =  0.0001
Residual |  5.29744993    27  .196201849               R-squared     =  0.4923
---------+------------------------------               Adj R-squared =  0.4547
   Total |  10.4346666    29  .359816091               Root MSE      =  .44295

------------------------------------------------------------------------------
     gpa |      Coef.   Std. Err.       t     P>|t|       [95% Conf. Interval]
---------+--------------------------------------------------------------------
     mat |   .0249295   .0104491      2.386   0.024       .0034898    .0463692
      ar |   .2997867    .115247      2.601   0.015       .0633194    .5362541
   _cons |   .5738174   .6029815      0.952   0.350      -.6633984    1.811033
------------------------------------------------------------------------------

linktest

  Source |       SS       df       MS                  Number of obs =      30
---------+------------------------------               F(  2,    27) =   21.11
   Model |  6.36484445     2  3.18242222               Prob > F      =  0.0000
Residual |   4.0698222    27  .150734155               R-squared     =  0.6100
---------+------------------------------               Adj R-squared =  0.5811
   Total |  10.4346666    29  .359816091               Root MSE      =  .38824

------------------------------------------------------------------------------
     gpa |      Coef.   Std. Err.       t     P>|t|       [95% Conf. Interval]
---------+--------------------------------------------------------------------
    _hat |   9.044484   2.824042      3.203   0.003       3.250028    14.83894
  _hatsq |  -1.181952   .4141642     -2.854   0.008      -2.031747   -.3321575
   _cons |  -13.47598   4.756589     -2.833   0.009      -23.23569   -3.716264
------------------------------------------------------------------------------

ovtest

Ramsey RESET test using powers of the fitted values of gpa
       Ho:  model has no omitted variables
                  F(3, 24) =      9.83
                  Prob > F =      0.0002
                  
regress gpa mat ar greq grev

      Source |       SS       df       MS              Number of obs =      30
-------------+------------------------------           F(  4,    25) =   11.13
       Model |  6.68313355     4  1.67078339           Prob > F      =  0.0000
    Residual |   3.7515331    25  .150061324           R-squared     =  0.6405
-------------+------------------------------           Adj R-squared =  0.5829
       Total |  10.4346666    29  .359816091           Root MSE      =  .38738

------------------------------------------------------------------------------
         gpa |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         mat |   .0208961   .0095488     2.19   0.038     .0012299    .0405623
          ar |   .1442335   .1130013     1.28   0.214    -.0884969     .376964
        greq |   .0039983   .0018307     2.18   0.039      .000228    .0077686
        grev |   .0015236   .0010502     1.45   0.159    -.0006392    .0036865
       _cons |  -1.738107   .9507399    -1.83   0.079    -3.696192    .2199789
------------------------------------------------------------------------------

linktest

      Source |       SS       df       MS              Number of obs =      30
-------------+------------------------------           F(  2,    27) =   26.99
       Model |   6.9555881     2  3.47779405           Prob > F      =  0.0000
    Residual |  3.47907855    27  .128854761           R-squared     =  0.6666
-------------+------------------------------           Adj R-squared =  0.6419
       Total |  10.4346666    29  .359816091           Root MSE      =  .35896

------------------------------------------------------------------------------
         gpa |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        _hat |   4.488587    2.40314     1.87   0.073    -.4422485    9.419423
      _hatsq |  -.5179375   .3561891    -1.45   0.157    -1.248777    .2129022
       _cons |  -5.757461   3.986623    -1.44   0.160    -13.93734    2.422414
------------------------------------------------------------------------------

ovtest

Ramsey RESET test using powers of the fitted values of gpa
       Ho:  model has no omitted variables
                  F(3, 22) =      1.71
                  Prob > F =      0.1932


Linear Statistical Models Course

Phil Ender, 17sep10, 13dec00