Announcement

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

  • Testing equality of two coefficients from two regressions within the same sample

    Hi everyone,

    This is a query regarding the test of equality of coefficients from different regressions within the same sample.
    Simply put, the dependent variables are different while the independent variables are the same.
    This is estimated using a theoretically justified gravity model which includes country-year fixed effects.
    I use the ppml command for estimation as the data has a substantial share of zero values

    For eg:

    Xijt = a0 + a1RTAijt + Pij + Eit + Ijt + error
    Yijt = b0 + b1RTAijt + Pij + Eit + Ijt + error

    Where RTAijt is any form of trade agreements between the country pairs at time t.
    I would like to test whether a1=b1. I know the standard t-test is to be used for this.
    However, how do I execute this in STATA? Using which command?

    Thanking you all,




  • #2
    Hi everyone,

    In continuation with the above query, is there a way by which we could store a specific coefficient from a result?
    est store 'name' command stores the whole result while I want to store only a specific coefficient from a particular regression. And do the same for the next regression and then test for their equality.

    Any lead is highly appreciated

    Comment


    • #3
      re: #1, see
      Code:
      help suest
      re: #2, all the results are kept in the returned "r(table)'; since this is temporary you can save it as another matrix and then use what you want; saving as another matrix can be done, eg.,
      Code:
      matrix new = r(table)
      see
      Code:
      help matrix
      for dealing with matrices

      if you only want,e.g., ne coefficient it can be stored as a local macro easily enough
      Code:
      local new = _b[]
      where you put the name of the variable for which you want the coefficient between the square brackets

      Comment


      • #4
        Dear Goldstein,

        Thank you for the lead.

        I tried to use the SUEST command. But since I am estimating the model with PPML, the suest command shows an error that 'the variable is estimated with nonstandard vce". It makes the test of equality impossible. Is there a way I could execute the suest command while using the PPML estimator?
        And, from whatever you advised me to do, I understand that to store only one coefficient I have to execute the code for the local macro, and need not use the matrix command for that.

        Thank you

        Comment


        • #5
          sorry, but I know nothing about PPML

          your understanding is correct (your last sentence)

          Comment

          Working...
          X