Announcement

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

  • optimal lag lengths in newey

    Dear Profs and Colleagues,

    I have panel data.

    Code:
    xtset NPC_FIC year
    
    Panel variable: NPC_FIC (unbalanced)
     Time variable: year, 2010 to 2020, but with gaps
             Delta: 1 year
    after regression, I realized that there exist heteroskedasticity and autocorrelation
    Code:
    reg mig_jump immi_sh firm_age foreign_aff i.sector i.region
    in order to correct them simultaneously, I use neway

    Code:
    newey mig_jump immi_sh firm_age foreign_aff i.sector i.region, lag(4) force
    The question arises that whats the optimal lag lengths? How can I be assured that lag(4) or lag (3) or ... is the proper one?

    Another question is that can I use newey with random effect ? because Hausman Test says to run random effect.

    Any help appreciated.

    Cheers,
    Paris

  • #2
    See #4 https://www.statalist.org/forums/for...lation-command. For newey standard errors with panel data, see

    Code:
    ssc install newey2
    help newey2
    The linked selection criteria assume that you have time-series data. Why use newey standard errors with panel data? If you have \(N> T\), clustering on the panel identifier will yield standard errors that are robust to heteroscedasticity and arbitrary forms of serial correlation. So you would just go xtreg, fe with the -robust- option.
    Last edited by Andrew Musau; 06 Apr 2023, 12:50.

    Comment


    • #3
      Thank you Andrew. The first question has been solved. About the second one, still I am confused, how can I deal with random effect .

      Comment

      Working...
      X