Announcement

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

  • Comparing the coefficients of a variable in two subsamples after REGHDFE

    Hello everyone,

    I have firm-level data and I run a panel regression with year and industry fixed effects with clustered standard errors at firm level. I run the regressions across 2 subsamples as given below

    Code:
    reghdfe IDIO_Log FRQ_DD1 Mast_Perc int1 SIZE LEV MTB VCFO CFO ROA LPCGDP POP INF HH CAPGDP legalregqual invIPI legalsys_Dummy, absorb(year i.Industry_Dummy) , if Openness_Dummy==0
    estimates store IDIO0
    
    reghdfe IDIO_Log FRQ_DD1 Mast_Perc int1 SIZE LEV MTB VCFO CFO ROA LPCGDP POP INF HH CAPGDP legalregqual invIPI legalsys_Dummy, absorb(year i.Industry_Dummy) , if Openness_Dummy==1
    estimates store IDIO1

    What I want to do is to compare the coefficients of "Mast_Perc" across both regression models (subsamples).
    So, when I use the following code (so I can use test command), I get the following error:
    Code:
    suest IDIO0 IDIO1, vce (cluster ID)
    unable to generate scores for model IDIO0
    suest requires that predict allow the score option
    It sounds that I cannot use suest after REGHDFE. So, is there an alternative way to test if there a significant difference in "Mast_Perc" across both subsamples?

    Many thanks

  • #2
    reghdfe is from SSC (FAQ Advice #12). See #6 of the linked thread where you use test after estimating the model with interactions. https://www.statalist.org/forums/for...mparing-slopes

    Comment


    • #3
      Many thanks for your response Andrew.

      I used your approach as suggested in the sent link and sets 1 and 2 worked very well:

      I did it as follows:
      Code:
      **1. INTERACT EACH CATEGORY OF VARIABLE WITH FIXED EFFECTS
      
      gen yearop0 = year#0.Openness_Dummy
      gen yearop1 = year#1.Openness_Dummy
      
      gen Industryop0 = Industry_Dummy#0.Openness_Dummy
      gen Industryop1 = Industry_Dummy#1.Openness_Dummy
      
      **2. ESTIMATE INTERACTD MODEL WITH CLUSTERED SEs
      
      reghdfe IDIO_Log i.Openness_Dummy#(c.FRQ_DD1 c.Mast_Perc c.int1 c.SIZE c.LEV c.MTB c.VCFO c.CFO c.ROA c.LPCGDP c.POP c.INF c.HH c.CAPGDP i.legalregqual i.invIPI i.legalsys_Dummy), absorb(yearop0 yearop1 i.Industryop0 i.Industryop1)
      However, when I do step three for generating predictions with margins I get nothing as follows:
      Code:
      --------------------------------------------------------------------------------
                     |     Margin   Legend
      ---------------+----------------------------------------------------------------
      Openness_Dummy |
                  0  |          .  _b[0bno.Openness_Dummy]
                  1  |          .  _b[1o.Openness_Dummy]
      --------------------------------------------------------------------------------
      So, could you help me here please? and how to specifically test the difference in Mast_Perc variable.

      Thanks very much for your help.

      Comment


      • #4
        I said that you should use the test command after estimating the model with interactions. Forget the margins part. Your question is different from that asked by the OP in the linked thread. You can think of the estimated model with interactions as equivalent to the results that you would have gotten from suest had you been able to combine the separate regressions in this way. An exact example is https://www.statalist.org/forums/for...erent-outcomes.
        Last edited by Andrew Musau; 02 Mar 2023, 16:31.

        Comment


        • #5
          Great. Thanks Andrew!

          Comment

          Working...
          X