Announcement

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

  • autocorrelation for panel data (xtserial)*

    I am trying to run an autocorrelation(xtserial) for panel data
    I tried using:
    Code:
    xtset fid_ndvi
    xtreg yield_ndvi avg8_ndre, fe
    
    search xtserial
    net sj 3-2 st0039
    net install st0039
    
    xtserial yield_ndvi avg8_ndre , output
    Can't run an autocorrelation(xtserial) for panel data (error: time variable not set, use tsset varname ...)


    I have generated panel data and run fixed effects based on Hausman test results. However, I cannot check the autocorrelation and normality test for my panel data. I would really appreciate it if anyone could advise me on how to solve this problem.

  • #2
    xtset fid_ndvi
    While xtset allows you to include only the panel-identifier, xtserial requires the time variable as well. So xtset your data again, including the time variable, below assumed to be named "year".

    Code:
    xtset fid_ndvi year
    In any case, you can cluster using the panel identifier and forego testing for autocorrelation if you have \(N>T\). Additionally, with a sufficiently large sample, you can appeal to the central limit theorem and therefore not perform normality tests on your data (because the assumptions for many statistical tests that rely on normality are met).

    Comment


    • #3
      Dear Andrew Musau,

      Thank you very much

      Comment

      Working...
      X