Announcement

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

  • query on absorb command

    Dear all,

    Can anyone explain the details on "absorb" command for me? I have read the help. file of the command but still confused. In the example, the whole command is:
    ". areg mpg weight gear_ratio, absorb(rep78)",
    and the illustration is that "however, does not report the coefficients for rep78, and, in fact, they are not even calculated. This computational trick makes the problem manageable when k is large. areg reports a test that the coefficients associated with rep78 are jointly zero. Here this test has a significance level of 35.6%.". I am confused because we didn't even treat rep78 as dependent or independent variable, they why should we absorb the effect of it?

    Many thanks,

    Regards,

    Caiwei

  • #2
    areg mpg weight gear_ratio, absorb(rep78)
    is a command simply illustrating the syntax and use of -areg- in a data set that every Stata user has access to. It is perhaps not the best example of the circumstances in which -areg- would be used.

    When you have longitudinal (panel) data, it is generally wrong to simply do an ordinary least squares regression of an outcome on some regressors, because it fails to take into account the nesting of observations within panels. In Stata, there are several solutions to this problem available.

    1. When you are talking about a linear regression (not logistic or other non-linearmodel) you can just add indicator variables for the panels to the model:
    Code:
    regress outcome regressors i.panel
    2. You can use the panel-regression command -xtreg, fe-
    Code:
    xtset panel
    xtreg outcome regressors
    The above two are entirely equivalent approaches. The difference between them is that in the former the output includes coefficients for each of the panel indicators (except the reference level, of course), whereas -xtreg- does not give that. In fact, behind the scenes, -xtreg- doesn't even calculate those coefficients, it arrives at its results in a completely different way. If the number of panels is very large, all the panel coefficients that -regress... i.panel- gives can clutter up your output with lots of numbers that are usually not of much interest anyway. So for large panels the -xtreg- approach produces more compact output that focuses on the statistics that are actually of interest.

    -areg- is very similar to -xtreg-, and produces almost identical results, although it does use a different calculation for degrees of freedom for certain statistics. The choice between -areg- and -xtreg- depends on your sampling scheme. If drawing a larger sample would mean getting more panels, then -xtreg- is appropriate. If drawing a larger sample would mean getting the same number of panels but more observations per panel, then -areg- is appropriate.

    The auto.dta data set is not really panel data, and the use of these commands is really artificial in this context. But the -absorb()- option in -areg- is intended for the panel identifier variable in panel data.

    While we're on the subject, I will point out that there is also a user-written command, Sergio Correa's -reghdfe- which is similar to -areg- but allows you to absorb the effects of more than just one variable.

    Comment


    • #3
      Hi Clede, appreciate for your detailed explanation. But may I know what is panel indicators? As in my panel dataset, I have occupation information for voters in different years, like whether they are employed currently, and what kind of job they are in. I also have information about the candidates the voters devote to, like their party number, the city they are. I saw a reference paper treated city code as absorb variable, may I know the meaning of it?

      Regards,

      Caiwei

      Comment


      • #4
        Panel indicators refer to indicator variables (often called "dummy variables") coded 0/1, which identify the individual panels. Not knowing anything about your data, I can't say anything that would specifically apply to your situation.

        I saw a reference paper treated city code as absorb variable, may I know the meaning of it?
        So apparently those authors were working with a panel data set in which cities were the different panels.

        I suggest you browse the bookstore page at Stata.com. There are several books there on longitudinal data analysis (or panel data analysis--same thing, really). One of them might be a suitable introduction to the subject for you. I think you need a clear understanding of the concepts before proceding to work with these commands.

        Comment


        • #5
          Thanks for the suggestion Clyde.

          Comment

          Working...
          X