Announcement

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

  • how to do fixed effects regression

    Hey my regression does not work, how do I do a fund and time fixed effectes regression? What do I have to do prior with xtset. And for the ttest do I have to do sth. like level (99) at the end for 1% niveau

  • #2
    you might as well type " help xtreg " in your stata command bar. or search topics related to panel regression.

    A basic example of fixed effects follow as.

    Code:
    xtreg depvar var1 var2 var 3 ..., fe
    If you want random effects, simply change fe at the end for " re ".

    Now, you may want to tell stata what kind of data is handling.

    so an example of xtset command follows as:

    Code:
    xtset id_code year
    where id_code is a variable that doesn't change over time. and year is the time variable.

    to generate a single id variable something like this should work.

    Code:
    egen id_code= group(variable_that_does_not_change)

    Comment

    Working...
    X