Announcement

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

  • Interpret eydx, eyex in margins, Stata

    Suppose the regression is y=beta_0+beta_1*x + epsilon. I obtain the eydx=.295 by magins eydx(x) command.

    What does Stata really do? Does Stata actually regress logy on x? If so, can I interpret the result as one unit increase in x leads to 0.295 unit increase in y?

    Stata manual suggests "proportional change in y for a change in x". Then should I interpret the result as "there is 0.295 unit proportional change in y for a change in x"?

    I also notice that eydx is semi-elasticity. So should I interpret this result as " 1 unit increase in x leads to 29.5% in y" or maybe " 0.295% increase in y"?

    Are the three interpretation equivalent?

    Another issue is if I regress y on x and obtain eyex=a, is it equivalent to regress y on lgx and obtain eydx=b? In other words, does a equal b?

  • #2
    What does Stata really do? Does Stata actually regress logy on x?
    I have not delved into the code of -margins- so I cannot be 100% certain, but it would be very surprising if Stata went to all that trouble. I imagine -margins- relies on the fact that d(log y)/dx = (1/y)*dydx and calculates the right hand side of that equation.

    If so, can I interpret the result as one unit increase in x leads to 0.295 unit increase in y?
    No. First of all, "leads to" is causal language, so the appropriateness of that depends on your study design. But in general one should not use causal language in these situations. Putting issues of causal/non causal aside, because it is eydx, it means that a unit increase in x is associated with a 0.295 increase in log y. In turn, increasing log y by 0.295 corresponds to multiplying y by exp(0.295), which is approximately 1.34. So a unit increase in x is associated with a 34.3% relative increase in y.

    I also notice that eydx is semi-elasticity. So should I interpret this result as " 1 unit increase in x leads to 29.5% in y" or maybe " 0.295% increase in y"?
    This is the general idea, but as I showed in the preceding paragraph, the actual percent increase is 34.3, not 29.5 When the number is small, the two will be very close. So if you had eydx = 0.10, exp(0.10_ = 1.105, so that there would be a 10.5% increase. For values up to about 0.10, the elasticity and the corresponding percentage increase are nearly identical. But as the elasticity gets larger, they start to diverge.

    Another issue is if I regress y on x and obtain eyex=a, is it equivalent to regress y on lgx and obtain eydx=b? In other words, does a equal b?
    No. To the extent that something like this would be true it would be "sort of" equivalent to regress log y on log x and expect that to approximate eyex calculated after regressing y on x. But the values will only be approximately equal because the modeling of error in the two regressions is different, and because at least one of the models y = b0 + b1*x and log y = c0 + c1* x must be a mis-specification of the x-y relationship. In particular, if the linear model y = b0 + b1*x + epsilon is correct, then the relationship between log y and log x is not linear and the elasticity ey/ex actually varies with the value of x. When you use -margins- to get ey/ex, if you do not specify the value of x that you want to get the elasticity at (using the -at()- option), then -margins- gives you an averaged value.

    Comment


    • #3
      Hi Clyde, thank you for the wonderful reply.

      Comment


      • #4
        Thank you for your topics Ding Li.
        Thank you for your answer Clyde Schechter.

        I ran multinomial logit model mlogit y x1 x2 ..., baseoutcome() and then obtained margins, dydx(*).

        For example for continous variables, margins, dydx(age) pr(outcome(1)) is 0.64. How can I interpret the meaning of 0.64? Is it true if I say that an increase of the age 1 year old is associated with the increase in probability of choosing outcome 1 of 64%?


        For example for discrete factor variables,
        margins, dydx(marital_status) pr(outcome(1))
        reference category is single.
        Maried --> 0.033
        Others --> -0.012

        How can I interpret the meaning of 0.033 and -0.012 ? Is it true if I say that married people are more likely (3.3%) to choose outcome 1 than single people who also choose outcome 1, and widowed/ divorced/ seperated people are less likely (1.2%) to choose outcome 1 than single people?

        Thank you in advance.

        Comment


        • #5
          Basically you have it right. You just have to be careful about your wording. To see 3.3% more likely is understood to mean a relative multiplicative increase of 3.3%. That is, if the base rate is 5%, 3.3% more likely means 5.17% (= 5% * 1.033). This is not what the margins you have gotten mean.

          What the margins you have gotten mean is an absolute additive increase of 3.3 percentage points. That is, what your -margins- output says is that if the base rate is 5%, the rate among the married is 8.3% (= 5% + 3.3%). To be completely clear about the distinction, additive changes in percentages should always be referred to as percentage points; the use of the term percent or percentage without the word "point(s)" is the terminology for a multiplicative change.

          Yes, it's confusing. All the more reason it is crucial to use exactly the right wording.

          Comment


          • #6
            Cross-posted and answered at CV. Please note the policy on this!

            Comment


            • #7
              Hi,
              I have a few relevant questions:

              I ran a linear mixed-effects model (xtmixed) in which my dependent variable (pedtrips) is not log-transformed, but some of my independent variables are log-transformed. Then, I ran the margins command with eyex option (for non-transformed independent variables) and the eydx (for log-transformed independent variables) to get elasticities. Considering that elasticities show the percentage change in the dependent variable as a result of a 1% change in the independent variable, I am a bit confused as to how to interpret Stata's ey/ex and ey/dx results.

              Here are some of my codes and results:

              original model code: xtmixed pedtrips hhsiz hhstu lnaveblarf ws lndismiles tod || tazfinal:, var

              elasticity code for independent variable "hhsiz": margins, eyex (hhsiz) atmeans

              which gives me a ey/ex for "hhsiz" = -.172466

              Question 1: considering that neither the dependent variable (pedtrips) and nor the independent variable "hhsiz" are log-transformed, how can the estimate of "-.172466 " for ey/ex (elasticity) be interpreted? Is it interpreted as :

              a) a 1% increase in "hhsiz" is associated with -0.17% decrease in " pedtrips"; or :
              b) a 1% increase in "hhsiz" is associated with - 17% decrease in " pedtrips"

              semi-elasticity code for independent variable " lndismiles ": margins,eydx(lndismiles) atmeans

              which gives me a ey/dx = -.2566162

              Question 2 : considering that the dependent variable (pedtrips) is not log-transformed, but the independent variable " lndismiles " is a log-transformed variable (of the "dismiles" variable), how can the estimate of ey/dx = -.2566162 be interpreted? Is it interpreted as :

              c) a 1% increase in "dismiles" (and not the " lndismiles" ) is associated with -0.26% decrease in " pedtrips"; or
              d) a 1% increase in "dismiles" (and not the "" lndismiles" ) is associated with - 26% decrease in " pedtrips"

              Question 3: is it correct to interpret the ey/dx results in terms of the original form of the variable (e.g., "dismiles" ) and not the log-transformed form of the variable (e.g., " lndismiles") like I did in c) and d) of Question 2 above?

              Any help is much appreciated.



              Comment


              • #8
                Question 1: None of the above.
                You can say that it is associated with a 0.17% decrease (N.B. no minus sign), or you can say that it is associated with a -0.17% change. A -0.17% decrease would actually be a 0.17% increase.

                Question 2: Again, none of the above, and for the same reason. A 1% increase in dismiles is associated with a 0.26% decrease (N.B. no minus sign) in pedtrips.

                Question 3: Yes and no. All of these statements (including my responses to Questions 1 and 2) are strictly incorrect and represent only approximations. In this case, because the elasticities are small, the approximation is a very good one. So, no harm, no foul. In general, when presenting to, or writing for, non-technical audiences, it is better to refer to variables in their natural units and avoid mention of logarithms--to avoid scaring them off.

                Comment


                • #9
                  Thank you for your very helpful answers, Clyde. Based on your answers (and considering that all of these interpretations are approximate as you noted), I am assuming that:

                  a) in Cases 2 and 3 above: the semi-elasticity of "lndismiles" variable (which is a log-transformed form of the variable "dismiles") on the non-transformed dependent variable of "pedtrips" can be approximately interpreted as: A 1% increase in "dismiles" (the original form of the variable and not the log-transformed form of it) is associated with a 0.26% decrease in "pedtrips."; and

                  b) in all cases: the interpretation of the percentage of the independent variable associated with a 1% change in the dependent variable (i.e., pedtrips) should be made with the actual estimate and not multiplied by 100. For example and in this case, the approximate interpretation should be: a 1% change in "dismiles" is associated with 0.26% (and not 26%) change in "pedtrips".

                  Thank you again.

                  Comment


                  • #10
                    a) looks correct.

                    For b) I think you mean the percentage difference of the dependent variable associated with a 1% difference in the independent variable... But the point about not multiplying by 100 is correct.

                    Comment


                    • #11
                      Clyde,
                      This was very helpful. Thank you so much for taking the time to read and confirm. I hope this conversation also helps others who are confused about the interpretation of Stata's ey/ex and ey/dx results like I was.
                      Thanks again!

                      Comment

                      Working...
                      X