Announcement

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

  • Standard error for product of two coefficients from different regressions

    Hello!

    I am looking for a way to get the standard error of the result when I multiply two regression coefficients from different regressions.

    So, I run regression_1, lets say:
    y1=ax1+bx2+u

    Then, I run regression _2, lets say:
    y2=cx3+dx4+v

    Now, for the purpose of my study, I want to multiply a by c, but I would also like to get a standard error for this value.

    I have looked around and have seen things about -nlcom- and also -suest- commands but am really not sure of how to use them.
    I hope I can get a solution to this (simple?) problem.

    Many thanks!



  • #2
    You are on the right track, you need a combination of suest and nlcom
    Code:
    use http://fmwww.bc.edu/RePEc/bocode/o/oaxaca.dta
    reg lnwage age female
    est sto m1
    reg educ age female
    est sto m2
    suest m1 m2
    nlcom [m1_mean]age*[m2_mean]age
    nlcom [m1_mean]female*[m2_mean]female

    Comment


    • #3
      Hi! Thanks for your answer.

      However, I forgot to mention I am using FD notation of the sort :

      reg D.(ln_agr_prod spei_05) i.year i.country_id, vce(cluster country_id)

      Do you think your suggestion will still work? I will try tonight.

      Comment


      • #4
        you will have to use suest m1 m2, cluster(country id)
        But not sure about the other options.

        You could also just use GMM adding both models simultaneously

        Comment


        • #5
          thanks!
          However, it seems I am running into another problem.

          I forgot to mention, I am running regressions using different datasets. So I thought I could use different frames and pull the estimate stores from the frame. But it seems one cannot do that.

          To summarise again:

          So, I run regression_1, lets say:
          Using dataset1
          y1=ax1+bx2+u
          est sto m1

          then I start a new frame
          Using dataset 2
          Then, I run regression _2, lets say:
          y2=cx3+dx4+v
          est sto m2

          But -suest- will not let me use m1 from the first frame.

          ... any ideas?

          Comment


          • #6
            append both datasets together.

            Comment


            • #7
              Merging my datasets will be complicated because I have variables with same names and also different IDs.
              Is there any other way of saving estimate stores that don't get deleted when doing the -clear- when using the new dataset.

              Comment


              • #8
                UPDATE:
                I managed to append my datasets so that both regressions are using the same data.

                However, I am still getting an error= "estimation sample of the model saved under top_regression could not be restored r(198)"

                Could it be that -suest- does not work with D. (first difference) command or factor variables?

                Getting standard errors for combinations of estimates seems like a pretty simple/common thing to ask for. I don't know why this isn't working.

                Comment

                Working...
                X