Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • RE GLS Panel Data Regression with strong wooldridge serial correlation dicovered

    Hi,
    I am having some troubles with my model and will be grateful for all help with it.

    I am doing the research on the volume of trade between China and 45 partner countries between 2004 and 2016. Totally 585 ovservations over 13 years.
    It's a gravity model under the panel data framework and it includes different kinds of variables,
    in general my model is like this: lnTradeVolume = lnGDPi(china) + lnGDPj(partner x) + lnPopulationi + lnPopulationj + lnDevelopmentLeveli + lnDevelopmentLevelj + lnRealExchangeRate + lnLandDistance + InflationRatei + InflationRatej + CommonLandBorder + SeaAccess + StrategicPartnership.
    Most of my explanatory variables are in logs. Inflation is in its level form and three last variables are binary dummy variables

    I've started with Hausman test to make sure, the RE GLS will be relevant and performed Breusch-Pagan LM to confirm it. Both tests suggested I should use the RE GLS framework.
    However, I have two problems:

    -I have no idea how to test RE GLS Panel Data Regression for Heteroskedasticity. I'm a newbie in econometrics.
    -I have done the wooldridge test to check for serial correlation, and the test rejected the H0 with a really bad result of 0.0001
    I am not sure if it results from data itself or maybe i did something wrong with the construction of panel data in excel. All variables for China are repeating themself 45 times over each 13 years period, for each of the partner country. Is it okay?
    I've been looking for an answer how to deal with the autocorrelation issue and found suggestions of Professor Suborno Aditya. According to him, "If it is AR of order 1, using XTREGAR instead of XTREG" could solve the problem, although, he has also told that if serial autocorrelation is present alongside heteroskedasticity or cross section dependance, PCSE would be a better choice.

    Right now I am not sure which method should I addopt, because I don't know how to check heteroskedasticity for panel data and I don't know how to check if the problem is AR of order 1. I'm not really sure what does it mean. I;m not sure, how to check what type of autocorrelation is present, thus i can't choose any method of dealing with it
    Thank you in advance for all help
    Last edited by Jan Furmanek; 05 Mar 2018, 11:59.

  • #2
    Jan:
    welcome to this forum.
    If you're dealing with a N>T panel dataset and you suspect/have evidence of heteroskedasticity and/or autocorrelation, just use cluster/robust standard errors (both options do the same job under -xtreg-), which accomodate for both these nuisances.
    However, after that -hausman- test should be replaced with the user-written programme -xtoverid- (just type -search xtoverid- from within Stata to install it), as the latter, unlike -hausman-, allows cluster/robust standard errors.
    As an aside, please note that your chances of getting (more) positive replies are conditional on posting what you typed and what Stata gave you back (within CODE delimiters; see the FAQ). Thanks.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thank you for your reply Carlo.
      Yes I am dealing with N>T dataset and for now I am quite sure I've detected presence of heteroskedasticity, serial correlation and cross-sectional correlation.
      First of all, i've done FE and RE regressions. FE seems unfitting, as it ommits my main regressor, but ive stored results and done Hausman, which strongly advises to use RE
      Code:
      . hausman fixed random
      
                       ---- Coefficients ----
                   |      (b)          (B)            (b-B)     sqrt(diag(V_b-V_B))
                   |     fixed        random       Difference          S.E.
      -------------+----------------------------------------------------------------
            lnGDPi |    .8263685     .8108306        .0155379         .016283
            lnGDPj |    .3544855     .3693874       -.0149019               .
            lnPOPi |   -.0613889     .1095931        -.170982        .1391045
            lnPOPj |   -1.934571    -2.435469        .5008977        .0907769
            lnDEVi |   -.0019546    -.0087034        .0067489        .0048914
            lnDEVj |    .1188013     .1192637       -.0004624               .
        lnRERRMB2X |   -.0868634    -.0747232       -.0121401        .0047809
               Iri |   -.1105225    -.0996185       -.0109041        .0022759
               irj |    .4965152     .5014733       -.0049581               .
                SP |    .0373603     .0337698        .0035905        .0016907
      ------------------------------------------------------------------------------
                                 b = consistent under Ho and Ha; obtained from xtreg
                  B = inconsistent under Ha, efficient under Ho; obtained from xtreg
      
          Test:  Ho:  difference in coefficients not systematic
      
                       chi2(10) = (b-B)'[(V_b-V_B)^(-1)](b-B)
                                =        5.85
                      Prob>chi2 =      0.8278
                      (V_b-V_B is not positive definite)
      Furtherly I've tested the model for presence of heteroscedasticity according to command
      Code:
       xtreghet INVAR DEPVAR, id(countrynum) it (year) model(xtmlh) mhet (DEPVAR) diag lmhet
      Results suggested very strong heteroskedasticity problem:
      Code:
      ==============================================================================
      * MLE Random-Effects Panel Data Regression (Normal Distribution)
      * Multiplicative Heteroscedasticity
      ==============================================================================
        lntrade = lnGDPi + lnGDPj + lnPOPi + lnPOPj + lnDEVi + lnDEVj + lnRERRMB2X + lnLandDistance + Iri + irj + CLB + SA + SP
      ------------------------------------------------------------------------------
        Sample Size       =         585   |   Cross Sections Number   =          45
        Wald Test         =   1975.0798   |   P-Value > Chi2(13)      =      0.0000
        F-Test            =    151.9292   |   P-Value > F(13 , 527)   =      0.0000
       (Buse 1973) R2     =      0.7757   |   Raw Moments R2          =      0.9945
       (Buse 1973) R2 Adj =      0.7515   |   Raw Moments R2 Adj      =      0.9939
        Root MSE (Sigma)  =      0.3343   |   Log Likelihood Function =    624.6310
      ------------------------------------------------------------------------------
      - R2h= 0.7763   R2h Adj= 0.7521  F-Test =  152.41 P-Value > F(13 , 527)0.0000
      - R2v= 0.7805   R2v Adj= 0.7567  F-Test =  156.17 P-Value > F(13 , 527)0.0000
      Code:
      ==============================================================================
      * Panel Model Selection Diagnostic Criteria - Model= (xtmlh)
      ==============================================================================
      - Log Likelihood Function                   LLF            =    624.6310
      ---------------------------------------------------------------------------
      - Akaike Information Criterion              (1974) AIC     =      0.1115
      - Akaike Information Criterion              (1973) Log AIC =     -2.1935
      ---------------------------------------------------------------------------
      - Schwarz Criterion                         (1978) SC      =      0.1396
      - Schwarz Criterion                         (1978) Log SC  =     -1.9693
      ---------------------------------------------------------------------------
      - Amemiya Prediction Criterion              (1969) FPE     =      0.1175
      - Hannan-Quinn Criterion                    (1979) HQ      =      0.1217
      - Rice Criterion                            (1984) Rice    =      0.1122
      - Shibata Criterion                         (1981) Shibata =      0.1110
      - Craven-Wahba Generalized Cross Validation (1979) GCV     =      0.1118
      ------------------------------------------------------------------------------
      
      ==============================================================================
      * Panel Groupwise Heteroscedasticity Tests
      ==============================================================================
        Ho: Panel Homoscedasticity - Ha: Panel Groupwise Heteroscedasticity
      
      - Lagrange Multiplier LM Test     = 8.67e+04     P-Value > Chi2(44)  0.0000
      - Likelihood Ratio LR Test        = 496.5798     P-Value > Chi2(44)  0.0000
      - Wald Test                       = 1.06e+07     P-Value > Chi2(45)  0.0000
      ------------------------------------------------------------------------------
      At the end i've done Wooldridge test for serial correlation and Pesaran for cross-sectiona, which were positive:
      Code:
      Wooldridge test for autocorrelation in panel data
      H0: no first-order autocorrelation
          F(  1,      44) =     17.729
                 Prob > F =      0.0001
      Code:
      Pesaran's test of cross sectional independence =    10.099, Pr = 0.0000
       
      Average absolute value of the off-diagonal elements =     0.420
      Should I still use xtreg robust?
      I was reading about FGLS and PCSE. I know FGLS fits more when T>N, but I'm not sure about using PCSE. Will it do the same job as robust, and does it work under RE GLS?
      PS: i've done the test, you suggested before for RE robust:
      Code:
      . xtoverid
      
      Test of overidentifying restrictions: fixed vs random effects
      Cross-section time-series model: xtreg re  robust cluster(countrynum)
      Sargan-Hansen statistic 120.336  Chi-sq(9)    P-value = 0.0000
      Last edited by Jan Furmanek; 06 Mar 2018, 22:10.

      Comment


      • #4
        Jan:
        go -xtpcse-.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Thank you a lot Carlo!
          I though xtpcse should fit but I'm new to stata so wanted to make sure my assumptions are correct.
          Best regards

          Comment


          • #6
            Jan:
            all the best for you and your research.
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment

            Working...
            X