Announcement

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

  • Alternative to suest to work with xtreg

    Hi All

    I am working on a panel data with, using difference in difference strategy. My analysis looks at two different outcome variables. Following are the basic econometric specification:

    y1 = beta1 post*treat + alpha1 county FE + gamma1 time FE + error

    y2 = beta2 post*treat + alpha2 county FE + gamma2 time FE + error

    standard errors are clustered at the county level

    I want to test if beta1 is significantly different from beta2. In my understanding, these are like SUR, so I intend to first run the two regressions using xtreg, store estimates, use suest and then conduct a simple t test.

    However, suest does not work with xtreg. I saw a previous post on a similar question, where it was suggested to use dummies and run OLS, instead of FE. However, I am wokring with 3000 counties and 15 time periods, so that wouldn't be feasible. Could you please suggest an alternative method to achieve what i want to.

    Thanks

  • #2
    Well, you could -reshape- your data so that the two y variables become one long variable, distinguished by their subscripts. Then you could run the regression using an interaction between the subscript and the variables of interest. So it would look something like this:

    [code]
    reshape long y, i(county time) j(subscript)
    xtreg y i.subscript##(i.post##i.treat i.time), fe
    [code]
    The test of beta1 = beta2 is then based on the coefficient of 2.subscript#1.post#1.treat.

    This assumes that your outcome variables are actually named y1 and y2. If they are not, then rename them that way. It also assumes that county and time together uniquely identify observations in your data set. If they do not, replace the specification in i() by whatever variables do.

    All of that said, unless y1 and y2 are not only measured in the same units and scaled alike, but also have effectively the same marginal distribution, a comparison of beta1 with beta2 is just meaningless. So think carefully before proceeding whether your question even makes any sense. But if it does, this seems a reasonable way to answer it.

    Comment


    • #3
      This was extremely helpful. Thanks so much.

      Comment


      • #4
        Dear Clyde,

        Thank you for your clear help. I have also done it for other data and am wondering whether I am doing the right thing.

        I have panel data of 5 countries over a period of 40 Quarters and I also want to test if coefficients are significantly different from each other.

        Code:
        xtreg y1  beta1 Index + alpha1 Country FE + gamma1 Quarter FE + error 
        
        xtreg y2 = beta2 Index + alpha2 Country FE + gamma2  Quarter FE + error
        y1 and y2 indicate the natural logarithm of the number of deals due to a strategy (strategy 1 for y1 and strategy 2 for y2).
        Index is a continous variable.

        Is it then possible to do the following?

        Code:
        reshape long y, i(Country Quarter) j(subscript)
        Code:
        xtreg y i.subscript##(c.Index i.Quarterpanel), fe
        Furthermore, how should I interpret the results?

        Kind regards,

        Iris

        Comment


        • #5
          Yes, you can do this. The question is whether it is reasonable to even compare coefficients of regressions from two different outcome variables in the first place. If that is reasonable, this method is as good as any.

          Remember that if y1 and y2 do not have identical scales and distributions, it is meaningless to compare coefficients, as differences in the coefficients may be attributable to those factors rather than reflecting differences in the associations of the predictors to the outcomes. So if y1 and y2 are the same measurements done on two different occasions or something like that, then this is a reasonable thing to do. But, in general, this kind of comparison is pointless.

          In terms of interpretation, the coefficient of 2.subscript#Index will be an estimate of the difference between beta2 and beta1. And the analogous interpretation applies to the quarter coefficients.

          Comment


          • #6
            Dear Clyde,

            Thank you for your quick response. Is this also possible with areg? To give you an idea of my analysis, I posted it already in another topic, but will give you a short explanation here. If you prefer to respond in the other topic, here is the link:
            HTML Code:
            https://www.statalist.org/forums/forum/general-stata-discussion/general/1438758-areg-comparing-coefficients-of-two-models-with-different-dependent-variables
            I have panel data consisting of 8 years and over 1000 of industries.

            I test the following:

            Code:
            areg DVdummy1 lagIV1 lagIV2 lagIV3, absorb (YEAR)
            
            areg DVdummy2 lagIV1 lagIV2 lagIV3, absorb (YEAR)
            DVdummy1 shows if there was a strategy1 deal in a certain industry in a year.
            DVdummy2 shows if there was a strategy2 deal in a certain industry in a year.
            Sometimes there are both strategy1 and strategy2 deals in a certain industry in a specific year.
            I include year-fixed effects, specified with ,absorb (YEAR).

            I want to test if the coefficients of lagIV1, lagIV2 and lagIV3 are significantly different in both models.
            Suest is not applicable to areg. What other method can I use?

            Is it possible to do the following:

            I have a variable that combines year and industry (year_industry).

            Code:
            rename DVdummy1 y1
            rename DVdummy2 y2
            reshape long y, I(year_industry) j(subscript)
            areg y i.subscript##(c.lagIV1 c.lagIV2 c.lagIV3 i.Year)
            I also test:


            Code:
            areg DV1 lagIV1 lagIV2 lagIV3, absorb (YEAR)
            areg DV2 lagIV1 lagIV2 lagIV3, absorb (YEAR)
            In this case the dependent variable is the natural logarithm of the strategy1 or strategy2 number of deals.

            Is it then still possible to do the following?

            Code:
            rename DV1 y1
            rename DV2 y2
            reshape long y, I(year_industry) j(subscript)
            areg y i.subscript##(c.lagIV1 c.lagIV2 c.lagIV3 i.Year)
            Thank you very much in advance for your help.

            Kind regards,

            Iris

            Comment


            • #7
              Dear Clyde,

              I also have a question about the interpretation of the output. I get an output for 2.subscript and for Index and all the quarters. Here is for example the output for 2.subscript and Index.
              (1)
              VARIABLES Model 1
              2.subscript 2.857335***
              (0.297425)
              Index 0.000106***
              (0.000025)
              How can I now tell that there is a significant difference (or not) between beta1 and beta2 of Index? Does the above mean that there is a significant difference between y1 and y2 and that y2 is influenced more by Index than y1 (due to the value 0.000106)?

              Thank you very much for your help. I highly appreciate it.

              Kind regards,

              Iris


              Comment

              Working...
              X