Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: OLS, FE xtreg and the i() option


From   Robert Gaskell <[email protected]>
To   [email protected]
Subject   st: OLS, FE xtreg and the i() option
Date   Wed, 2 Mar 2005 17:24:09 +0000

All,

I have been working on a panel dataset, looking at the relationship
between inflation and openness, but am slightly confused at to the
results I have been finding.  When running OLS and Fixed-Effects (FE)
estimations completely different results are found.  However, when the
i() option for the FE estimation is set to the year (which it
shouldn't be; it should be the country code), the panel data results
are almost exactly equal to OLS.

Am I making an error in my use of Stata, or is this a kind of
'pooling' (when setting i() to the year), implying that the 'correct'
value is as found by the 'correct' FE estimation.  I have not been
able to find any direct information on this in the Stata documentation
or the net in general - any comments that you can give will be much
appreciated.

The three estimations are:

. xtreg lninf open if [various statements], fe i(period)

Fixed-effects (within) regression               Number of obs      =      1727
Group variable (i): period                      Number of groups   =        21

R-sq:  within  = 0.0327                         Obs per group: min =        70
       between = 0.0167                                        avg =      82.2
       overall = 0.0323                                        max =        86

                                                F(1,1705)          =     57.67
corr(u_i, Xb)  = 0.0026                         Prob > F           =    0.0000

------------------------------------------------------------------------------
       lninf |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        open |  -.9897034   .1303229    -7.59   0.000    -1.245313   -.7340938
       _cons |  -1.800335   .0537737   -33.48   0.000    -1.905804   -1.694865
-------------+----------------------------------------------------------------
     sigma_u |  .19099431
     sigma_e |  1.2090179
         rho |  .02434839   (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0:     F(20, 1705) =     2.08            Prob > F = 0.0034



. xtreg lninf open if [various statements], fe i(code)

Fixed-effects (within) regression               Number of obs      =      1727
Group variable (i): code                        Number of groups   =        86

R-sq:  within  = 0.0017                         Obs per group: min =        12
       between = 0.0809                                        avg =      20.1
       overall = 0.0323                                        max =        21

                                                F(1,1640)          =      2.73
corr(u_i, Xb)  = -0.3667                        Prob > F           =    0.0984

------------------------------------------------------------------------------
       lninf |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        open |   .4950169   .2993937     1.65   0.098    -.0922174    1.082251
       _cons |  -2.315556   .1061136   -21.82   0.000    -2.523688   -2.107423
-------------+----------------------------------------------------------------
     sigma_u |   .9055351
     sigma_e |  .89717541
         rho |  .50463719   (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0:     F(85, 1640) =    18.02            Prob > F = 0.0000



. reg lninf open if [various statements]

      Source |       SS       df       MS              Number of obs =    1727
-------------+------------------------------           F(  1,  1725) =   57.61
       Model |  85.2610149     1  85.2610149           Prob > F      =  0.0000
    Residual |  2552.98501  1725  1.47999131           R-squared     =  0.0323
-------------+------------------------------           Adj R-squared =  0.0318
       Total |  2638.24603  1726  1.52853188           Root MSE      =  1.2165

------------------------------------------------------------------------------
       lninf |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        open |  -.9919216   .1306868    -7.59   0.000    -1.248243   -.7356004
       _cons |  -1.799565    .053978   -33.34   0.000    -1.905434   -1.693696
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index