Announcement

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

  • Can I take log and lag on my independent variables in a regression?

    Hello,
    Please can someone answer me if it is possible to take log and lag (both at the same time) on my independent variables in a regression?
    Thank you.

    Example
    xtreg logres L1.logres err_d4 err_d3 err_d2 L2.ka_open L2.logsdebt L2.logeqty_gdp L2.logtrade , re robust

  • #2
    Yes, you can. There are no reasons why that would be incompatible. If you assume a log-log relation between your variables, and a lagged effect of independent/explanatory variables on your outcome/dependent variable, then your model specification is fine.

    Comment


    • #3
      That's great. Thank you so much.

      Comment


      • #4
        However, since you are using the lagged independent variable, consider using xtabond, xtdpdml, or one of the other programs designed for dynamic data modeling.
        -------------------------------------------
        Richard Williams, Notre Dame Dept of Sociology
        StataNow Version: 19.5 MP (2 processor)

        EMAIL: [email protected]
        WWW: https://www3.nd.edu/~rwilliam

        Comment


        • #5
          Thanks Sir,
          I have tried xtabond2 but the results of xtreg seems better.
          *I stand to be corrected.

          Please kindly look below my results. I would as well appreciate your suggestion on which regression to present as main results. Or your advice on which step to take.
          Thank you.


          # xtreg (with fixed-effects)
          (1) (2) (3)
          logres logres logres
          L.logres 0.815*** 0.815*** 0.668***
          (6.10) (6.10) (5.22)
          err_d4 -0.344 -0.344 -0.319
          (-1.58) (-1.58) (-1.77)
          err_d3 0.121 0.121 0.152
          (1.17) (1.17) (1.78)
          err_d2 0 0 0
          (.) (.) (.)
          L2.ka_open -0.545 -0.545 -0.490
          (-2.04) (-2.04) (-1.22)
          L2.logsdebt 0.0624 0.0624 0.0524
          (1.99) (1.99) (1.69)
          L2.logeqty_gdp -0.0277 -0.0277 -0.0249
          (-1.23) (-1.23) (-1.02)
          L2.logtrade 0.106 0.106 0.209
          (0.38) (0.38) (0.59)
          _cons 0.0161 0.0161 0.229
          (0.02) (0.02) (0.24)
          Year-effect no no yes
          Country-effect no yes no
          N 109 109 109
          R-sq 0.665 0.665 0.717



          # xtreg (with random-effects)

          logres logres logres
          L.logres 0.927*** 0.815*** 0.899***
          (24.45) (5.32) (22.19)
          err_d4 -0.0195 -0.267 0.00755
          (-0.17) (-0.80) (0.06)
          err_d3 0.181** 0.198 0.182*
          (2.70) (0.52) (2.37)
          err_d2 0.152* 0.0763 0.152*
          (2.21) (0.22) (2.01)
          L2.ka_open -0.168** -0.545 -0.141
          (-2.94) (-1.78) (-1.72)
          L2.logsdebt -0.00379 0.0624 -0.00945
          (-0.52) (1.74) (-1.18)
          L2.logeqty_gdp -0.00615 -0.0277 -0.00894
          (-0.97) (-1.07) (-1.04)
          L2.logtrade 0.190* 0.106 0.208*
          (2.26) (0.33) (2.31)
          _cons -0.697* -0.609 -0.664
          (-2.42) (-0.63) (-1.89)
          Year-effect no no yes
          Country-effect no yes no




          #And the xtabond2 (I just tried)

          Dynamic panel-data estimation, one-step system GMM
          Group variable: ccode Number of obs = 109
          Time variable : year Number of groups = 25
          Number of instruments = 57 Obs per group: min = 1
          F(8, 24) = 2005.58 avg = 4.36
          Prob > F = 0.000 max = 9
          Robust
          logres Coef. Std. Err. t P>t [95% Conf. Interval]
          logres
          L1. .9632041 .0499732 19.27 0.000 .8600645 1.066344
          err_d4 .0332534 .1422133 0.23 0.817 -.2602606 .3267673
          err_d3 .204235 .1612294 1.27 0.217 -.1285261 .536996
          err_d2 .078498 .1248907 0.63 0.536 -.1792637 .3362598
          ka_open
          L2. -.2502539 .1131818 -2.21 0.037 -.4838496 -.0166582
          logsdebt
          L2. .0031773 .0116287 0.27 0.787 -.0208232 .0271778
          logeqty_gdp
          L2. -.0004218 .0086298 -0.05 0.961 -.0182328 .0173892
          logtrade
          L2. .1374197 .1377279 1.00 0.328 -.1468366 .4216761
          _cons -.5263714 .5030866 -1.05 0.306 -1.564691 .5119484

          Comment


          • #6
            It's not legitimate to say you will use a procedure because you like the results better. Unless your T is large, the fixed effects estimates can be badly biased. If T is "large," you can get away with fixed effects. But how large is enough depends on several factors.

            JW

            Edit: I see that T = 25. This is likely enough to justify FE estimation. The bias should be relatively small. As another comment, you should really have both time and country effects if you want your findings to be most convincing.
            Last edited by Jeff Wooldridge; 24 Jun 2019, 14:19.

            Comment


            • #7
              Well noted. I will do that.
              Thanks to you all, I appreciate your responses.

              But please I realized that the p-values of the xtabond regression are not significant. Please what about that?

              And please @JW, do you mean I can justify Fe and use as main results or use xtabond2? Because I see T=25 at the xtabond regression. Thanks.
              Last edited by Emma Obed; 24 Jun 2019, 17:09.

              Comment


              • #8
                Please I still welcome comments from everyone. Thank you.

                Comment

                Working...
                X