Announcement

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

  • A time-varying covariate in a panel date regression

    Dear all,

    I have a panel where all variables are indexed it apart from one covariate, say Der, that is indexed t.

    How can I run this model in Stata?

    I have this sample of code (using fixed effects or random effects)

    clear
    xtset Id Time
    sort Id Time
    xtreg y x Der, fe
    xtreg y x Der, re

    Is that correct?

    Thanks






  • #2
    Normally you'd have a fixed effect for time, which will eat the Der variable.

    use reghdfe to absorb multiple fixed effects.

    Comment

    Working...
    X