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

Re: st: D-W and panel data


From   "Clive Nicholas" <[email protected]>
To   [email protected]
Subject   Re: st: D-W and panel data
Date   Fri, 4 Jun 2004 00:57:50 +0100 (BST)

Mikko M�kinen wrote:

> I'm also a new user of Stata :-) As Justin wrote, you can calculate the
> D-W statistic by using dummies and OLS. So, how does the -dwstat2- command
> differ from the dummies and OLS approach?

Apparently, not much at all. Using wagepan.dta from Jeffrey M.
Wooldridge's suite of datasets
(http://wooldridge-datasets.swlearning.com/):

. gen id = _n

. tsset id
        time variable:  id, 1 to 4360

. reg lwage year agric- union expersq

      Source |       SS       df       MS              Number of obs =   
4360
-------------+------------------------------           F( 33,  4326) =  
52.71
       Model |  354.627996    33  10.7463029           Prob > F      = 
0.0000
    Residual |  881.901646  4326   .20386076           R-squared     = 
0.2868
-------------+------------------------------           Adj R-squared = 
0.2814
       Total |  1236.52964  4359  .283672779           Root MSE      = 
.45151

------------------------------------------------------------------------------
       lwage |      Coef.   Std. Err.      t    P>|t|     [95% Conf.
Interval]
-------------+----------------------------------------------------------------
        year |   .0175141   .0062004     2.82   0.005     .0053582     
.02967
       agric |   .2171099   .0760737     2.85   0.004     .0679665   
.3662534
       black |  -.1226481   .0229259    -5.35   0.000    -.1675947  
-.0777015
         bus |   .3931705   .0620011     6.34   0.000     .2716166   
.5147245
    construc |   .4576362   .0628484     7.28   0.000     .3344212   
.5808513
         ent |  (dropped)
       exper |   .0603432   .0118913     5.07   0.000     .0370301   
.0836564
         fin |   .5605775   .0676363     8.29   0.000     .4279758   
.6931792
        hisp |  -.0413889   .0217987    -1.90   0.058    -.0841256   
.0013478
    poorhlth |  -.0304731   .0532302    -0.57   0.567    -.1348315   
.0738854
       hours |  -.0000874   .0000131    -6.70   0.000     -.000113  
-.0000618
       manuf |   .5456511   .0588261     9.28   0.000     .4303219   
.6609804
     married |   .1130483   .0152518     7.41   0.000      .083147   
.1429495
         min |   .7033441   .0803993     8.75   0.000     .5457203    
.860968
     nrthcen |   -.095112   .0223457    -4.26   0.000     -.138921   
-.051303
    nrtheast |   .0214095   .0230724     0.93   0.353    -.0238242   
.0666431
        occ1 |   .0854797   .0387491     2.21   0.027     .0095117   
.1614477
        occ2 |   .0689334     .03759     1.83   0.067    -.0047622    
.142629
        occ3 |  (dropped)
        occ4 |  -.0860991    .036848    -2.34   0.020      -.15834  
-.0138582
        occ5 |  -.0264525   .0354058    -0.75   0.455    -.0958659   
.0429609
        occ6 |  -.1017852   .0361376    -2.82   0.005    -.1726333  
-.0309371
        occ7 |  -.1267472   .0394001    -3.22   0.001    -.2039916  
-.0495029
        occ8 |  -.0688939   .0801958    -0.86   0.390    -.2261188   
.0883311
        occ9 |  -.1451409   .0378897    -3.83   0.000    -.2194242  
-.0708577
         per |    .388633    .077212     5.03   0.000     .2372579   
.5400081
         pro |   .2148503   .0615476     3.49   0.000     .0941854   
.3355151
         pub |   .4359741   .0661164     6.59   0.000     .3063521   
.5655961
         rur |   -.110404   .0184424    -5.99   0.000    -.1465605  
-.0742474
       south |  -.0791108   .0207352    -3.82   0.000    -.1197624  
-.0384593
        educ |   .0742839   .0052508    14.15   0.000     .0639897   
.0845781
         tra |   .5766668   .0631995     9.12   0.000     .4527635   
.7005701
        trad |   .3201914    .058149     5.51   0.000     .2061896   
.4341932
       union |    .173667   .0169976    10.22   0.000     .1403431    
.206991
     expersq |  -.0019649   .0006943    -2.83   0.005     -.003326  
-.0006038
       _cons |  -34.43747   12.23924    -2.81   0.005    -58.43265  
-10.44229
------------------------------------------------------------------------------

. dwstat

Durbin-Watson d-statistic( 34,  4360) =  2.096452

. dwstat2

Durbin-Watson d-statistic( 34,  4360) =  2.096452

With apologies for the messy output. Kit Baum may be able to shed more
light on what the "minor modifications" are for -dwstat2- when he has time
to reply.

CLIVE NICHOLAS        |t: 0(044)191 222 5969
Politics              |e: [email protected]
Newcastle University  |http://www.ncl.ac.uk/geps
*
*   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