Announcement

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

  • Using Fixed Effects Stata and Random Effects

    Dear all

    I am getting an error when I use the follow fixed effects codes.
    • I have a balanced panel data. (Individual= state and across 4 time periods)
    • I have two fixed effects : Individual State Fixed Effect= total panel observations/ year and time fixed effect (year)
    when I use

    lets say
    k=state
    t=years

    xtreg y x1 x2 x3 x4 , fe i(k t)

    i get the following error : i(): too many variables specified

    Also,

    areg y x1 x2 x3 x4 , absorb (k t )

    i get the following error : absorb(): too many variables specified


    Questions

    Q1 Basically my question is ; how to use two way fixed effects and random effects??? with
    Fixed Effects
    xtreg , fe
    areg ,absorb

    Random Effects
    xtmixed || :,


    Q2 should I just include i.year dummy after (xtreg ,areg xmixed) and before ( , fe , absorb , || :.)

    Thank you







  • #2
    Roberto:
    what f you go:
    Code:
    xtset panelid timevar
    xtreg y x1 x2 x3 x4 i.timevar, fe
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment

    Working...
    X