Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: test the error term is uncorrelated with the explanatory variables


From   "Clive Nicholas" <[email protected]>
To   [email protected]
Subject   Re: st: test the error term is uncorrelated with the explanatory variables
Date   Tue, 8 May 2007 23:14:33 +0100

On 08/05/07, [email protected] <[email protected]> wrote:

Dear Statalist, I simple question, if I want test this hypothesis
E(ui|xi, ai)=0 wich test I use?
ai is individual effects, because I have a panel data and x is
exogenous explanatory variable
thanks a lot for your help
I don't think any panel model can give you this, because the unit
(a_i) effects are 'differenced away', and hence are unobservable. The
-xtreg- routines offers you something close to what you want. An
example:

. webuse grunfeld

. tsset company year
      panel variable:  company (strongly balanced)
       time variable:  year, 1935 to 1954

. xtreg invest mvalue kstock time, i(company) fe

Fixed-effects (within) regression               Number of obs      =       200
Group variable (i): company                     Number of groups   =        10

R-sq:  within  = 0.7786                         Obs per group: min =        20
      between = 0.8108                                        avg =      20.0
      overall = 0.8010                                        max =        20

                                               F(3,187)           =    219.16
corr(u_i, Xb)  = -0.2367                        Prob > F           =    0.0000

------------------------------------------------------------------------------
     invest |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     mvalue |   .1107207   .0115852     9.56   0.000     .0878662    .1335751
     kstock |   .3535765   .0218494    16.18   0.000     .3104735    .3966795
       time |  -2.664218    .843852    -3.16   0.002    -4.328911   -.9995244
      _cons |  -43.42509   13.09867    -3.32   0.001    -69.26524   -17.58495
-------------+----------------------------------------------------------------
    sigma_u |   89.64192
    sigma_e |  51.552705
        rho |  .75146422   (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0:     F(9, 187) =    52.51              Prob > F = 0.0000

Here, our diagnostic of interest does _not_ equal zero. One thing that
would be nice to have here is a p-statistic. But, then, not everybody
is mustard-keen on significance tests!

--
HTH,
Clive Nicholas
*
*   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