Announcement

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

  • A question about areg

    Hi Statalist,

    I have a situation where I am looking at firm revenues. I want to include county*week fixed effects in the model, so this fixed effect alone amounts to 3000 counties * 21 weeks = 63000 dummies, which exceeds Stata limit even for Stata MP. So I am thinking to use areg, however, I read from the help manual, it seems like areg requires the number of levels for the absorbed variable being less than the cluster number of group (in my case, I want to cluster on state). Does it mean areg is not a feasible command for this case? if areg is not ok, do you have any suggestions about how I could get around with so many fixed effects? thank you.

    And a side question I have is: I want to include the interaction between my Diff-in-Diff indicator and a continuous variable about county fixed characteristics. Since I want to omit one period as the base period, I have to include the main effect of the continuous variable as well (in the case of putting county fixed effect dummies in the model, it will drop the main effect of the continuous variable, so including it is just for syntax matters). However, if I can use areg to absorb the county*week fixed effect, since county fixed effect has already being counted in the absorb, will including the main effect of the continuous variable affect the estimation results? Thank you. I asked a question before here, it may help understand the nuanced situation here. https://www.statalist.org/forums/for...n-a-regression

  • #2
    I just experimented a little by comparing the results from "reg y x i.county, cluster(state)" with the result from "areg y x, absorb(county) cluster(state)". Here county is a factor variable with 3000 levels and state has 50 levels. However, the results are exactly the same. I am confused about the following sentences in areg manual:

    "Exercise caution when using the vce(cluster clustvar) option with areg. The effective number of degrees of freedom for the robust variance estimator is ng − 1, where ng is the number of clusters. Thus, the number of levels of the absorb() variable should not exceed the number of clusters."

    Seems like it means areg is problematic when the absorbed variable having more levels than the cluster levels. Anyone has thoughts about this? Thanks!

    Comment


    • #3
      Austin:
      I'm not totally clear with what you're after (no example/excerpt of your data; no Stata codes and/or outcome tables; please see the FAQ on how to post more effectively. Thanks).
      That said, you may want to take a look to the community-contributed module -reghdfe-.
      Kind regards,
      Carlo
      (StataNow 18.5)

      Comment


      • #4
        Hi Carlo,

        I guess I am trying to ask if why areg produces the same results even the number of levels absorbed is greater than the number of cluster groups? The manual said it will mess up with the degree of freedom in calculating the SE.

        Thanks!

        Comment


        • #5
          Where in the documentation do you see something that makes you think that? Vague questions procure vague answers.

          Comment


          • #6
            Originally posted by Jackson Monroe View Post
            Where in the documentation do you see something that makes you think that? Vague questions procure vague answers.
            https://www.stata.com/manuals/rareg.pdf Please see the paragraph at the bottom of the second page of the document.

            Comment


            • #7
              When you cluster, you assume that observations are not independent within clusters. Therefore, the effective number of observations equals the number of clusters. On the other hand, in fixed effects models, the fixed effects are fixed parameters to be estimated. The restriction is thus the same as the number of observations should exceed the number of estimated parameters in standard regression.

              Comment

              Working...
              X