Announcement

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

  • Fixed effects

    Dear All,

    I have a question about something that I find confusing. Which one is correct? I am running a linear probability model regression with the establishment (id) and yearly (time) fixed effects. Standard errors are clustered at the exporter-importer pair level.
    To get the exporter-importer pair level I used the "group" command and got xm.
    Code:
        egen xm= group(exporting_ind importing_ind)
    1-
    Code:
    reghdfe dep indep, absorb(id time)  vce(cluster xm);
    2-
    Code:
    reghdfe dep indep i.time, absorb(id time)  vce(cluster xm);
    3-
    Code:
    reghdfe dep indep i.time i.id, absorb(id time)  vce(cluster xm);
    I think the 1st one is true. But every time I read more, I get confused.
    Thanks,
    JL

  • #2
    Hi, did you try all the code?

    Comment


    • #3
      Hi Xin, No I only tried the first one.

      Comment


      • #4
        Xin: I tried all, the 2nd gave me the same result as in the 1st. But all years were omitted (2006 to 2015). The data is between 2005 and 2015. The third one gave me the same as 2.
        I guess I am fine with the first then. absorb is used for the FE as I understood.

        Do you have any idea if my clustering is correct?

        Thank you
        JL

        Comment


        • #5
          The only way for anyone to answer this is to see an example of your data AND the code that you tried. Since you've given different options here, it may make sense to run each of these on sample data so we can see the exact differences, but we can ONLY do this once you've provided a data example using the dataex command. Then we can have a more holistic idea of what the issue might be.

          Barring that though, if you get the same results across all estimators, isn't that a good thing? The SE only adjusts your confidence intervals, not your point estimates.

          Comment


          • #6
            Dear Jared,

            Thank you for your answer. Usually, I provide an example, but I thought it is not important in this question. Of course, it is a good thing, but I just wanted to understand the code i am using. Regarding the SE, my question was if the code
            Code:
             
             egen xm= group(exporting_ind importing_ind)
            Makes sense if I want to cluster at the xm-pair-level

            Best,
            JL

            Comment

            Working...
            X