Take the 2-minute tour ×
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

I was testing the cross sectional independence test using Pesaran CD test in stata 10 for the panel data using the N=50 and T=18. After running the fixed effect with time dummies (effects), I got a negative value for the test with the p value >1 (which is not possible). I checked the paper on this: http://www.stata-journal.com/article.html?article=st0113 ,but they didn't talk about the negative value at all. I would really appreciate if you can help me to interpret the results.

xtreg Y  X1 X2 i.year,fe

Fixed-effects (within) regression               Number of obs      =       900
Group variable: state                           Number of groups   =        50

R-sq:  within  = 0.4336                         Obs per group: min =        18
       between = 0.0417                                        avg =        18
       overall = 0.3772                                        max =        18

                                                F(19,825)          =     33.24
corr(u_i, Xb)  = -0.0215                        Prob > F           =    0.0000

------------------------------------------------------------------------------
            Y |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
           X1 |  -.0008466   .0005767    -1.47   0.142    -.0019787    .0002854
           X2 |    .185078   .0304043     6.09   0.000     .1253991     .244757
             |
        year |
       1993  |  -.0101846   .0029659    -3.43   0.001    -.0160061   -.0043631
       1994  |  -.0173621   .0028749    -6.04   0.000     -.023005   -.0117192
       1995  |  -.0046886   .0029062    -1.61   0.107     -.010393    .0010159
       1996  |  -.0175546   .0028879    -6.08   0.000     -.023223   -.0118862
       1997  |   -.009572    .002962    -3.23   0.001     -.015386    -.003758
       1998  |   -.012109   .0029123    -4.16   0.000    -.0178254   -.0063926
       1999  |  -.0097348   .0029043    -3.35   0.001    -.0154356   -.0040341
       2000  |  -.0137918   .0028784    -4.79   0.000    -.0194416   -.0081419
       2001  |    .004144   .0029323     1.41   0.158    -.0016116    .0098996
       2002  |   .0188509   .0028925     6.52   0.000     .0131733    .0245285
       2003  |   .0058601   .0028772     2.04   0.042     .0002127    .0115076
       2004  |  -.0005801   .0028731    -0.20   0.840    -.0062195    .0050594
       2005  |  -.0085907   .0029534    -2.91   0.004    -.0143877   -.0027937
       2006  |   -.018118   .0028702    -6.31   0.000    -.0237516   -.0124843
       2007  |  -.0164648   .0028771    -5.72   0.000    -.0221121   -.0108174
       2008  |  -.0352191   .0028805   -12.23   0.000    -.0408731   -.0295652
       2009  |   .0094679   .0032904     2.88   0.004     .0030094    .0159265
             |
       _cons |   .0467515   .0024088    19.41   0.000     .0420234    .0514797
-------------+----------------------------------------------------------------
     sigma_u |  .00686051
     sigma_e |  .01433916
         rho |   .1862708   (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0:     F(49, 825) =     4.02             Prob > F = 0.0000


xtcsd, pesaran abs
 Pesaran's test of cross sectional independence =    -2.673, Pr = 1.9925
  Average absolute value of the off-diagonal elements =     0.215
share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

The relevant lines in the code file xtcsd.ado, to view which type

viewsource xtcsd.ado

are 163-165, which read

    di in gr "Pesaran's test of cross sectional independence = "/*
    */in ye %9.3f `pesaran' in gr ", Pr = " %6.4f /*
    */ in ye 2*(1-norm(abs(`pesaran'))) 

The last line of code is the one that produces the p-value, and it behaves as expected under version control, with the value of the statistic that you get

. version 9: di 2*(1-norm(abs(-2.673)))
.00751763

So, there is no ostensible reason why your computed statistic should result in an abnormal p-value. I suggest you set trace on and check what is going on, or show us the output.

By the way, you should check what version of the xtcsd package you have. You can check using

. which xtcsd
*! version 1.1.1        R.E. De Hoyos and V. Sarafidis 16may2006
share|improve this answer
    
Thanks nu for the insight. I checked the version and it is version 1.1.0 (how do I have the new version?; stata says it is the latest). As to the code in the line 165, I figure out (by googling) that stata 11 doesn't have norm (stata.com/statalist/archive/2011-08/msg00761.html). Is it possible for us to change that content? –  Metrics Nov 9 '12 at 18:27
1  
In order to get the latest version of the xtcsd package, type ssc install xtcsd, replace at the prompt. Also, since xtcsd runs under version control (version 6), norm should be okay. However, if you do run into trouble relating to the use of the norm function, then starting Stata 10.1, there was a reorganization of the density functions, and the norm function was replaced by the normal function. See help density_functions##normal. –  fg nu Nov 10 '12 at 2:43
    
Thanks a lot!. The problem occurred because of using the old version. Now, I got the correct answer Pr = 0.0075. –  Metrics Nov 10 '12 at 3:02
1  
Great. You might consider marking the answer as accepted. –  fg nu Nov 10 '12 at 3:06
    
It doesn't allow me to vote for the answer; i don't have enough reputation. Is there alternative way to do that? –  Metrics Nov 10 '12 at 3:08
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.