Announcement

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

  • What is the formal name of xtreg fe? Is it simply called fixed panel regression?

    What is the formal name of xtreg fe? Is it simply called fixed panel regression?

  • #2
    I would say: a panel data fixed effects model.
    Thanks
    Ahmed

    Comment


    • #3
      Thanks Ahmed for your fast reply, but could you please tell me why not a fixed panel data regression? or a panel data regression with fixed effects?

      Comment


      • #4
        Your " fixed panel data regression" is confusing and muddled (the panel is fixed, not the effects), but "panel data regression with fixed effects" sounds OK. Ahmed's sounds even better, though.

        Comment


        • #5
          Very clear answer

          Some classmates told me that xtreg fe is an OLS regression, so now I know for sure that xtreg fe isn't an OLS regression

          Comment


          • #6
            You can do a fixed-effects regression with OLS, if you deviate every variable from the group mean, but it's still fixed-effects.

            Comment


            • #7
              Ben, now I'm confused again.

              xtreg fe is or is not an OLS regression?

              (I know you can do a fixed-effects regression with OLS just by using (reg ,fe) )

              Comment


              • #8
                The manual calls it a fixed effects linear model.

                A fixed effects linear model can be estimated via OLS regression. But OLS regression can estimate many other types of models.

                To me adding the word panel sounds redundant and awkward. Can others give examples of when the term "fixed effects" would be used with things besides panel data?
                -------------------------------------------
                Richard Williams, Notre Dame Dept of Sociology
                StataNow Version: 19.5 MP (2 processor)

                EMAIL: [email protected]
                WWW: https://www3.nd.edu/~rwilliam

                Comment


                • #9
                  Whatever you call it, I like adding the word "linear" since you can have fixed effects logit models, count models, and event history models.
                  -------------------------------------------
                  Richard Williams, Notre Dame Dept of Sociology
                  StataNow Version: 19.5 MP (2 processor)

                  EMAIL: [email protected]
                  WWW: https://www3.nd.edu/~rwilliam

                  Comment


                  • #10
                    With all observations deviated from their group mean, fixed effects regression is OLS and vice versa. See below for a very bad analysis, just done for the purpose of showing equivalency. It just regresses year, education, and smoking on income. It's terrible in so many ways, but it shows under what (highly restrictive) conditions OLS can be used to estimate a fixed-effects model. BTW -- the intercept is different, since of course the means are all shifted.

                    Code:
                    *=========download data, only do this once
                    webuse set "http://earnhart.org/data"
                    webuse simple_nlsy, clear
                    webuse set
                    save nlsy_simple, replace
                    
                    *========start from here normally
                    use nlsy_simple, clear
                    
                    *===========renaming to get ready for reshaping
                    foreach var of varlist CV_HGC_9899_1998 CV_HGC_9900_1999 CV_HGC_0001_2000 ///
                           CV_HGC_0102_2001 CV_HGC_0203_2002 CV_HGC_0304_2003 CV_HGC_0405_2004 ///
                           CV_HGC_0506_2005 ///
                           CV_HGC_0607_2006 CV_HGC_0708_2007 CV_HGC_0809_2008 CV_HGC_0910_2009 ///
                           CV_HGC_1011_2010 CV_HGC_EVER_EDT_2011 {
                           local year=substr("`var'",-4,.)
                           rename `var' HGC_`year'
                    }
                    *==========drop extraneous stuff and reshape
                    drop KEYBDATE_M_1997-PARYOUTH_SEX_1997 ASVAB_HIGH_DEGREE_EVER_1999 ASVAB_HIGH_DEGREE_EVER_LAT_1999 ///
                          CV_HGC_EVER_EDT_2010 VERSION_R15_2011 CV_SAMPLE_TYPE_1997 YHHI_55700A2_2002 YINC_1700A_2001
                    reshape long YSAQ_360C_ YINC_1700_ HGC_, i(PUBID_1997) j(whatyear)
                    
                    replace YINC_1700_=. if YINC_1700_<0
                    
                    
                    replace HGC_=. if HGC_<0
                    
                    replace YSAQ_360C_=. if YSAQ_360C_<0
                    
                    *=====making balanced
                    *====horizontally
                    egen missobs=rowmiss(YINC_1700_ HGC_ YSAQ_360C_ whatyear)
                    drop if missobs>0
                    
                    
                    gen lnyinc=ln(YINC_1700_+1)
                    
                    *==========deviating from means
                    egen YINC_mean=mean(lnyinc), by(PUBID_1997)
                    egen HGC_mean=mean(HGC_), by(PUBID_1997)
                    egen whatyear_mean=mean(whatyear), by(PUBID_1997)
                    egen YSAQ_360C_mean=mean(YSAQ_360C_), by(PUBID_1997)
                    gen YINC_dev=lnyinc-YINC_mean
                    gen HGC_dev=HGC_-HGC_mean
                    gen YSAQ_360C_dev=YSAQ_360C_-YSAQ_360C_mean
                    gen whatyear_dev=whatyear-whatyear_mean
                    
                    
                    *=========really bad analysis, but gets point across
                    xtset PUBID_1997
                    
                    xtreg lnyinc HGC_   YSAQ_360C_ whatyear, fe
                    reg YINC_dev HGC_dev YSAQ_360C_dev whatyear_dev
                    Last edited by ben earnhart; 04 Dec 2014, 19:32.

                    Comment


                    • #11
                      Originally posted by Richard Williams View Post
                      The manual calls it a fixed effects linear model.

                      A fixed effects linear model can be estimated via OLS regression. But OLS regression can estimate many other types of models.

                      To me adding the word panel sounds redundant and awkward. Can others give examples of when the term "fixed effects" would be used with things besides panel data?

                      Did you/Richard mean that xtreg, fe is a type of a fixed effects linear model?

                      I thought that OLS is a linear model

                      So,,,,thus, that mean the following?

                      Xtreg, fe = OLS = fixed effects linear model

                      When I think about the Hausman test and xttest0, then I would think that xtreg, fe isn't an OLS

                      Comment


                      • #12
                        A fixed effects linear model could be considered a special case of OLS. But since fixed effects can be used with many other types of models, as can OLS, think of it this way. A fixed effects model doesn't have to be panel (it could be kids nested in a classroom or people nested in census blocks).
                        Click image for larger version

Name:	fe.png
Views:	1
Size:	13.0 KB
ID:	517686

                        Comment


                        • #13
                          Thank you Ben! However,,,

                          There's just 1 question remaining.
                          I used the procedure of comparing xtreg, fe with xtreg, re using the Hausman test
                          After that I used xttest0 to test whether I should use xtreg, re or OLS

                          xttest0 is also called the Breusch and Pagan LM test for random effects

                          Based on that... xtreg, fe cannot be an OLS??

                          Sorry for all the questions, however, I want to learn more but the things that I know seem to contradict each other

                          Comment


                          • #14
                            Ben, good point. The whole xt terminology is a bit deceptive because there are lots of things you can use these models with besides cross-sectional time series data. I suppose the key is that you have 2 or more cases that are somehow connected, e.g. The same individual at multiple points in time, members of the same household, students in the same school.
                            -------------------------------------------
                            Richard Williams, Notre Dame Dept of Sociology
                            StataNow Version: 19.5 MP (2 processor)

                            EMAIL: [email protected]
                            WWW: https://www3.nd.edu/~rwilliam

                            Comment


                            • #15
                              A few clarifying points. One of my pet peeves is when OLS is called "a model." OLS is not a model. It is an estimation method. It is proper to say that I estimate a linear model by OLS. The phrase "OLS model," while common, makes no sense. I could estimate a linear model by any number of estimation procedures, such as weighted least squares. My model is still a linear model, not a "weighted least squares model."

                              As I discuss in my MIT Press book, Econometric Analysis of Cross Section and Panel Data, it is better to refer to an "unobserved effects model," or even, following Richard's suggestion, a "linear unobserved effects model." Then there are many estimators of this model. One can use pooled OLS, effectively ignoring the heterogeneity. One can use a particular kind of GLS, namely, random effects. Or one can use fixed effects which, as Ben explained, is defined as the OLS estimator using deviations from means.

                              Fixed effects is also identical to a pooled OLS estimator where a dummy variable is added for each cross sectional unit. But there is only one fixed effects estimator of a linear unobserved effects model. How one obtains it is just a mechanical issue.

                              To answer Richard's question about is "panel" redundant, I would argue it is not (but probably not necessary because the context would be understood). It is common to apply the fixed effects estimator to general cluster structures -- such as schools or families. So, one might allow a common family effect among, say, siblings and then eliminate it using fixed effects estimation. There is no time dimension in such examples.

                              I hope this helps a little. Generally, I suggest using care in distinguishing models from estimation methods.

                              Comment

                              Working...
                              X