Announcement

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

  • How can I test assumptions in fixed effects regressions

    Hi all,
    I have data on online hotel ratings, over a timespan of 5 years and including approx. 5600 hotels.
    I am trying to run a fixed regression to see what influences hotel ratings (e.g. gender, age, etc.). I.e. I am group mean centering my variables at the hotel level.
    Now I am trying to test regression assumptions, but the commands I use for normal regressions don't work for fixed effects regressions. Can anyone help with this?
    Thanks!

  • #2
    Did you already take a look at
    Code:
    xi: xtreg y x1 x2, fe
    ?

    Comment


    • #3
      Hi Laura,
      yes, thats the code I'm using for the regression. The output looks alright, but I don't know how to assess the underlying assumptions (homoscedasticity, no milticollinearity, etc.).
      To me it looks as if quite a few users seem to have that problem, but no one found a soultion so far...
      Can I maybe just group mean center my variables and then run a normal regression and test assumptions?

      Comment


      • #4
        Ninate:
        welcome to the list.
        Please, as per FAQ #12, post what you typed and what Stata gave you back.
        Besides; please (as per FAQ again), note that statements along the lines of "did not/does not work" are seldom useful, as they do not convey any clue about the potential cause of the problem (if any problem exist). Thanks.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          You can use i.hotel in reg to run the fixed effect regression with hotel as the panel. It will take a little time and a large matsize, but then all the diagnostics from reg are available.

          Phil

          Comment


          • #6
            Perfect! That worked. Thanks so much!!
            Now the next hurdle: The two approaches (xtreg vs. dummies) produce the same coefficients, but a different F-statistic and different R-squares. Which ones should I report?




            -----------------------------------------​-----------------------------------------​-----------------------------------------
            Bildschirmfoto 2016-06-19 um 14.31.52.png


            Bildschirmfoto 2016-06-19 um 14.31.46.png

            Comment


            • #7
              Ninate:
              You should consider the output of -xtreg, fe-.
              You should have clustered on hotel.id the standard errors of the pooled OLS, as your observations are not independent.
              Kind regards,
              Carlo
              (Stata 19.0)

              Comment


              • #8
                Hi Carlo,

                Like this? To me it looks as if nothing changed...
                Click image for larger version

Name:	Bildschirmfoto 2016-06-19 um 15.17.54.png
Views:	1
Size:	186.6 KB
ID:	1345903


                Comment


                • #9
                  Ninate:
                  Pooled OLS ( -reg-), not -xtreg-.
                  Kind regards,
                  Carlo
                  (Stata 19.0)

                  Comment


                  • #10
                    Hi Carlo,
                    so now I ran the whole thing with pooled OLS. But now its not a fixed effect regression anymore, right?
                    Or should it be
                    reg x y i.HotelID, cluster() ?
                    Attached Files
                    Last edited by Ninate Sum; 19 Jun 2016, 07:58.

                    Comment


                    • #11
                      Ninate:
                      it should be:
                      Code:
                      reg depvar indepars i.HotelID, cluster(HotelID)
                      Kind regards,
                      Carlo
                      (Stata 19.0)

                      Comment


                      • #12
                        Just one more question regrading the output above (for xtreg x y, fe): What do rho and the "F-test that all u_i=0" tell me? Do the values indicate any problems? I think I remember that the F-test should not be significant. Is that correct?

                        Comment


                        • #13
                          Ninate:
                          if the "F-test that all u_i=0" appearing as a footnote of the -xtreg,fe- outcome table is significant, that specification fits your data better than a pooled OLS.
                          Kind regards,
                          Carlo
                          (Stata 19.0)

                          Comment


                          • #14
                            Perfect! That is good news
                            But is the rho of 0.57 an issue? Or rather - what does that tell me?

                            Comment


                            • #15
                              Ninate:
                              no, it is not.
                              -rho- (intraclass correlation) gives you the fraction of variance explained by individual effects (across panels variance).
                              Besides Stata .pdf manual related entries, see for further details: https://www.princeton.edu/~otorres/Panel101.pdf.
                              Kind regards,
                              Carlo
                              (Stata 19.0)

                              Comment

                              Working...
                              X