Announcement

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

  • Interpretation of β in case of Log-Lin model

    Hi,

    In many papers, the dependent variable is transformed by taking natural log. For instance, consider the following model:

    Code:
    log(Y) = α + β X1 + ε
    I understand that the interpretation of β is the percentage change in Y for a given unit change in X. However, some papers comment on the direction of relationship between X and Y (and not Log (Y)) on the basis of sign of β.

    Through a simple simulation exercise, I have found out that it may be erroneous to comment on the direction of relationship between Y and X on the basis of sign of β in the above equation. Specifically, the signs of Cov (X,Y) and Cov (X, Log (Y)) may be different.

    Please let me know if my finding is correct.

  • #2
    That does not sound right. Can you tell us more about the simulation? It is hard to spot the error in your code without seeing the code...
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Sure Maarten Buis. PFA an excel sheet in this regard. Request you to press Shift/Fn + F9 to simulate the data. You should get the concerned case with a different sign for relationship between Y and X as compared to the sign of relationship between Log(Y) and X.

      Thanks. Waiting for your reply!
      Attached Files

      Comment


      • #4
        Cross-posted at https://stats.stackexchange.com/ques...etween-x-and-y

        Please note our policy on cross-posting, which is explicit in the FAQ Advice: You are asked to tell us about it.

        Comment


        • #5
          Originally posted by Nick Cox View Post
          Cross-posted at https://stats.stackexchange.com/ques...etween-x-and-y

          Please note our policy on cross-posting, which is explicit in the FAQ Advice: You are asked to tell us about it.
          Apologies for the same, Nick Cox. I shall be careful in the future.

          Comment


          • #6
            In your simulation the real relationship in the population is 0. That in combination with the small size of your dataset, means that small changes can shift the sign. In essence what you are seeing in your simulation is just random noise.

            Here is a translation of your simulation to Stata (I don't think that this is the best simulation for this problem, but this is as close to the original simulation as possible):

            Code:
            clear all
            
            program define sim, rclass
                drop _all
                set obs 17
                gen double y = runiform()
                gen double lny = ln(y)
                gen double x = rnormal(100,10)
            
                tempname b1 b2
                reg y x
                scalar `b1' = _b[x]
                reg lny x
                scalar `b2' = _b[x]
                return scalar normal = `b1'
                return scalar ln     = `b2'
            end
            
            simulate ln=r(ln) normal=r(normal), reps(1000) : sim
            count if sign(ln) != sign(normal)
            list if sign(ln) != sign(normal)
            Last edited by Maarten Buis; 18 Dec 2018, 08:23.
            ---------------------------------
            Maarten L. Buis
            University of Konstanz
            Department of history and sociology
            box 40
            78457 Konstanz
            Germany
            http://www.maartenbuis.nl
            ---------------------------------

            Comment


            • #7
              I added another answer on Cross Validated, mostly to correct a misleading answer there (not Maarten's!);.

              Comment


              • #8
                Originally posted by Nick Cox View Post
                I added another answer on Cross Validated, mostly to correct a misleading answer there (not Maarten's!);.
                Looked at your answer, Nick. Agree with the points made by you. I have added a comment to your answer on Cross Validated.

                Comment

                Working...
                X