Announcement

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

  • Error when testing for woodridge autocorrelation test on panel data

    Hello,

    I have been testing for the serial correlation using the Woodridge test but i seem to have this error
    I am using panel data and have useed the -xtreg command for these

    xi xtserial iGDPpercapitagrowth i.RealGDPpercapita i.FDI i.Populationrate
    > i.Corruptioncontrolindex i.HDI i.TradeOpenness i.PoliticalStability
    i.RealGDPperc~a _IRealGDPpe_1-446 (_IRealGDPpe_1 for Rea~a==500.4228825
    > omitted)
    i.FDI _IFDI_1-449 (_IFDI_1 for FDI==-6915050000 omitted
    > )
    i.Populationr~e _IPopulatio_1-450 (_IPopulatio_1 for Pop~e==-.759628600
    > 9282213 omitted)
    i.Corruptionc~x _ICorruptio_1-450 (_ICorruptio_1 for Cor~x==-1.685389 o
    > mitted)
    i.HDI _IHDI_1-422 (_IHDI_1 for HDI==.27125 omitted)
    i.TradeOpenness _ITradeOpen_1-436 (_ITradeOpen_1 for Tra~s==1.478492272
    > 170269 omitted)
    i.PoliticalSt~y _IPolitical_1-449 (_IPolitical_1 for Pol~y==-2.7632835
    > omitted)

  • #2
    Some issues here. When using the -xi- prefix, you need to add a colon as a delimiter. Additionally, you place the -i.- prefix in front of categorical variables. "GDP per capita" and "Trade Openness" are normally continuous variables.

    Code:
    xi: xtserial GDPpercapitagrowth RealGDPpercapita FDI i.catvar1 i.catvar2 ...

    Comment


    • #3
      So, would that mean that i would put the -i- prefix in front just "HDI"?
      Last edited by Aiyana Cookey; 04 May 2022, 08:01.

      Comment


      • #4
        I assume that FDI is "foreign direct investment". If this is the nominal (money) value of FDI, then it is a continuous variable. A categorical variable for FDI would be, e.g., if it is grouped into categories such as high, medium and low. Other examples of categorical variables are gender (male or female) and geographical regions of England (London, the North East, North West, Yorkshire, East Midlands, West Midlands, South East, East of England and the South West). See https://en.wikipedia.org/wiki/Categorical_variable.

        Comment


        • #5
          Okay, i understand, thank you!

          Comment

          Working...
          X