Announcement

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

  • Check if coefficients in a split sample are statistically different from each other using xtreg

    Hello everybody!

    I am using xtreg in paneld data, splitting the sample by democracy and am trying to check if the coefficients for the negative shocks are statistically different from each other.

    Code:
    xtreg D.growth neg_shock time* if D.exconst2!=. &growth!=. &polity2>0 &exporter==1, fe cluster(ccode)
    xtreg D.growth neg_shock  time* if D.exconst2!=. &growth!=. &polity2<=0 &exporter==1, fe cluster(ccode)
    As far is I understood, the command
    Code:
    lrtest
    could check for this, but not when using xtreg, since robus vce are used. Apart from that I am a bit confused on where to start.

    Thank you for the help in advance!
    Leon
    Last edited by Leon Probst; 31 Aug 2023, 06:48.

  • #2
    Why are you splitting the sample? Is there some reason why you cannot include the negative shock x democracy interaction in your model?
    --
    Bruce Weaver
    Email: [email protected]
    Version: Stata/MP 19.5 (Windows)

    Comment


    • #3
      Leon:
      I think the best way is to interact -neg_shock- with -polity2- and then -test-.
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment


      • #4
        Thank you for the suggestions.

        These are the regressions I ran for exporter:

        Code:
        xtreg D.growth petro_nx_index_growth time* if D.exconst2!=. &growth!=. &polity2>0 &exporter==1, fe cluster(ccode)
        xtreg D.growth pos_shock time* if D.exconst2!=. &growth!=. &polity2>0 &exporter==1, fe cluster(ccode)
        xtreg D.growth neg_shock time* if D.exconst2!=. &growth!=. &polity2>0 &exporter==1, fe cluster(ccode)
        xtreg D.growth petro_nx_index_growth  time* if D.exconst2!=. &growth!=. &polity2<=0 &exporter==1, fe cluster(ccode)
        xtreg D.growth pos_shock  time* if D.exconst2!=. &growth!=. &polity2<=0 &exporter==1, fe cluster(ccode)
        xtreg D.growth neg_shock  time* if D.exconst2!=. &growth!=. &polity2<=0 &exporter==1, fe cluster(ccode)
        Did the same with the export dummy set to 0. I don't interact negative shocks with polity2 because I suspect nonlinear effects of polity2 or cutoff points.
        Is that reasonable?

        Now my professor asked me to check if the coefficients for the negative shocks in exporting democracies and autocracies are statistically different from each other.
        Hence my fruitless try with the lrtest.

        Comment


        • #5
          Leon:
          you may want to take a look at the community.contributed module -xtsur- (discalimer: I'm not familiar with it), as mentioned in Compare coefficients from two separate panel regressions in Stata - Cross Validated (stackexchange.com)
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #6
            given that I am not familiar with your data, it appears that neither the positive shock model nor the negative shock model is nested in the other - in that situation a likelihood ratio test is, at best, in appropriate (and not possible if the models are otherwise the same anyway)

            Comment


            • #7
              Adding to the conversation.
              Perhaps this will help.
              Its a small write up I put out there for testing split regressions with fixed effects.
              F

              Comment

              Working...
              X