Announcement

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

  • reghdfe results show only coefficient estimate but not output

    Hi all,
    I'm doing a difference-in-difference regression, but apart from the treat*post interaction, I also want to see heterogeneity based on variable M(which is an industry-quarter level variable), so it does not change across firms (i) within the same industry-year, so I did the following regression:
    \[Y_{i,t}= \sum_{k \in \text{(-8,8)}} \beta_{k} \,{I_{t=s+k}}*Treat_i*M_{nais,t=s+k}+ \mu_i + \tau_t + \varepsilon_{i,t}\] Where s is the event date, k is the event window (I consider 8 quarters before and 8 quarters after). Treat_i is 1 if i is inthe treated group.
    I run the regression with the following code:
    Code:
    reghdfe Y pre_* current* post_* [aw=atq], absorb(i t) cluster(state)
    Where pre_* and post_* are interacted with M already (M is a continuous variable)
    The result gives me only a coefficient estimate, but not the confidence interval. Does anyone know why this happens?




    I paste the result below:


    {
    \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
    \begin{tabular}{l*{1}{c}}
    \toprule
    &\multicolumn{1}{c}{(1)} \\
    \midrule
    pre\_8 & -0.00939 \\
    & (.) \\
    \addlinespace
    pre\_7 & -0.00580 \\
    & (.) \\
    \addlinespace
    pre\_6 & -0.00778 \\
    & (.) \\
    \addlinespace
    pre\_5 & -0.0169 \\
    & (.) \\
    \addlinespace
    pre\_4 & -0.0146 \\
    & (.) \\
    \addlinespace
    pre\_3 & -0.0236 \\
    & (.) \\
    \addlinespace
    pre\_2 & -0.0241 \\
    & (.) \\
    \addlinespace
    pre\_1 & 0 \\
    & (.) \\
    \addlinespace
    pre\_8\_br & 0.102 \\
    & (.) \\
    \addlinespace
    pre\_7\_br & 0.0737 \\
    & (.) \\
    \addlinespace
    pre\_6\_br & 0.0848 \\
    & (.) \\
    \addlinespace
    pre\_5\_br & 0.111 \\
    & (.) \\
    \addlinespace
    pre\_4\_br & 0.106 \\
    & (.) \\
    \addlinespace
    pre\_3\_br & 0.132 \\
    & (.) \\
    \addlinespace
    pre\_2\_br & 0.145 \\
    & (.) \\
    \addlinespace
    pre\_1\_br & 0 \\
    & (.) \\
    \addlinespace
    current & 0.000961 \\
    & (.) \\
    \addlinespace
    current\_br & -0.0248 \\
    & (.) \\
    \addlinespace
    post\_1 & 0.00118 \\
    & (.) \\
    \addlinespace
    post\_2 & 0.00161 \\
    & (.) \\
    \addlinespace
    post\_3 & -0.00862 \\
    & (.) \\
    \addlinespace
    post\_4 & -0.0137 \\
    & (.) \\
    \addlinespace
    post\_5 & -0.0128 \\
    & (.) \\
    \addlinespace
    post\_6 & -0.0183 \\
    & (.) \\
    \addlinespace
    post\_7 & -0.0155 \\
    & (.) \\
    \addlinespace
    post\_8 & -0.0253 \\
    & (.) \\
    \addlinespace
    post\_1\_br & -0.0269 \\
    & (.) \\
    \addlinespace
    post\_2\_br & -0.0173 \\
    & (.) \\
    \addlinespace
    post\_3\_br & 0.0344 \\
    & (.) \\
    \addlinespace
    post\_4\_br & 0.0872 \\
    & (.) \\
    \addlinespace
    post\_5\_br & 0.0753 \\
    & (.) \\
    \addlinespace
    post\_6\_br & 0.0936 \\
    & (.) \\
    \addlinespace
    post\_7\_br & 0.110 \\
    & (.) \\
    \addlinespace
    post\_8\_br & 0.145 \\
    & (.) \\
    \addlinespace
    Constant & 0.207 \\
    & (.) \\
    \midrule
    Observations & 115454 \\
    R-squared & 0.890 \\
    \bottomrule
    \end{tabular}
    }
    Last edited by Chengmou Lei; 15 Nov 2025, 09:18.

  • #2
    Your post has been up for over 6 hours now with no response. While it is the weekend, I'm pessimistic that you will get any helpful replies to it.

    First, the "output" you are showing is posted in some kind of markup language, it looks like Latex. So it is not readily readable. And even if one makes the effort to visualize in one's head what it shows, it is clearly not output from -reghdfe-. It looks more like it comes from -estout- or -outreg- or -etable-, or some other pretty-print program people often use after running regressions in Stata. So it isn't even possible to localize the problem to something within -reghdfe- or something within the pretty-print program. Not to mention that more often than not these things represent problems not with any program but with the data, about which you tell us next to nothing and show absolutely nothing.

    So, to improve your chances of getting useful advice, I recommend you post back in a more informative way. First, any code or output you show us should be copy/pasted from Stata itself (do-file, Results window, Viewer for code and results). Show both the -reghdfe- output and the output of the secondary program that is creating the table. Also show the exact -reghdfe- command, the exact command used to create that table, and any commands that you may have run between those.

    Also, the -reghdfe- command you show does not contain any explicit interaction terms. It may be that some of the variables that expand from the _* wildcard notation are homebrew interactions you created yourself. But if so, then you also need to show the code that created them, as these, too, might be the source of your problem. If none of those variables are actually interaction terms, then you have the additional problem that your -reghdfe- command does not represent your model equation (which may or may not be related to why no standard errors are being calculated.)

    Finally, include example data that reproduces your problem, and show that data by using the -dataex- command. If you are running version 16 or later, or a fully updated version 15.1 or 14.2, -dataex- is already part of your official Stata installation. If not, run -ssc install dataex- to get it. Either way, run -help dataex- to read the simple instructions for using it. -dataex- will save you time; it is easier and quicker than typing out tables. It includes complete information about aspects of the data that are often critical to answering your question but cannot be seen from tabular displays or screenshots. It also makes it possible for those who want to help you to create a faithful representation of your example to try out their code, which in turn makes it more likely that their answer will actually work in your data.

    More generally, I urge you to read the Forum FAQ before you compose your next post. It is filled with good advice on how to write a post that has the best chance of getting a timely and helpful reply. You can access them by scrolling to the top of this page, and underneath the Statalist banner, you will see a long black box with the letters FAQ. Click on that.

    Comment

    Working...
    X