Announcement

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

  • Saving fixed effects estimates as a new variable

    Hi,

    I have a problem with regards to fixed effects estimation.

    I have a dataset with a little over 15 000 dummy variables, where I want to save the estimates i get when running a regression, but I cannot figure out how to do this.

    I want to run the regression: reg score i.class where score is my dependent variable and class is an indicator for class.

    My question is then if it is possible to save the estimates I get on the different class as its own variable without creating all the dummies as separate variables.



  • #2
    Try...

    Code:
    xtset class
    xtreg score, fe
    predict fixedEffect, u

    Comment


    • #3
      Thank you!

      Comment


      • #4
        Dear all,

        I tried to run the above code for an xtpois, fe regression but it appears that the option predict is not available for the "u" dimension. Is there something I am overlooking?

        I would appreciate any insight, thanks

        Comment


        • #5
          Originally posted by Paola Bertolini View Post
          Dear all,

          I tried to run the above code for an xtpois, fe regression but it appears that the option predict is not available for the "u" dimension. Is there something I am overlooking?

          I would appreciate any insight, thanks
          This is because -xtpoisson- does not estimate the fixed effects. See the section Methods and Formulas in -xtpoisson-.

          Comment


          • #6
            Dear Joro,

            I'm not sure I'm following you? I can see that xtpois has a FE option?

            Comment


            • #7
              Originally posted by Paola Bertolini View Post
              Dear Joro,

              I'm not sure I'm following you? I can see that xtpois has a FE option?
              The fixed effects are nuisance parameters, conditioning on them or eliminating them, is not the same as estimating them. If you see the methods and formulas, it reads "the conditional likelihood is conditioned on the sum of the outcomes in the set (panel);" after this is done, the fixed effects are eliminated.

              If you are interested explicitly in the fixed effects, and you have many observation per panel, you can explicitly estimate the fixed effects by -poisson- regression with dummy variables.

              Comment


              • #8
                I see, thanks

                Comment

                Working...
                X