Announcement

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

  • Trend squared

    Hi all,
    how can I show trend squared of a variable?
    Any ideas?
    Thanks!

  • #2
    What do you mean by that? Fitting a quadratic in time? Or something else?

    Comment


    • #3
      I just took my variable and did the following
      x = x^2

      It should work with that.

      Thanks a lot!

      Comment


      • #4
        As in a concurrent thread, I am unsure what that means. It seems that we have to keep you reminding please to read the Advice on asking a good question, so in this case you should show the exact code you used.

        A quadratic trend in time is for example one that needs two predictors. You should not overwrite a predictor with its square. Often say with recent economic or social data working with say

        (year - 2000)

        and its square is a better idea than working with year and its square.

        Comment


        • #5
          Thanks a lot Nick.

          I did one mistake:
          The code should be the following
          x_2 = x^2

          In my case it is the following:
          gen Webit_asset_trend_2 = Webit_asset_trend^2

          However, Stata is giving the following result and I don't know how to deal with that:
          Webit_asset_trend_2 -7.03e-05
          (0.000635)
          Hence, I have the feeling that something is wrong?

          Comment


          • #6
            You have missed out at least one command, possibly a regress command.

            In any case, I can't tell what your response or outcome is, or what kind of variable Webit_asset_trend is.

            As before, a data example helps mightily.

            Comment


            • #7
              Thanks a lot Nick.

              Comment


              • #8
                Nick Cox and others here:
                what is the meaning of trend squared? I mean, before that I had only trend, but then took the square of it. What is the meaning of that?

                Comment


                • #9
                  Abdullah:
                  in a linear regression, a squared term aims at seeking a turning point (minimum or maximum, according to the slope of the first derivative, that is the linear term of the predictor), that is a non-linear relationship between a given predictor (say, age) and the dependent variable (say, disposable income).
                  As Nick pointed out in his previous reply, it is difficult to be more helpful without taking a look at what you typed and what Stata gave you back.
                  It is also recommended that your theoretical background about regression is in line with what you want Stata to calculate, so that you can read Stata outcomes in an informative way.
                  Kind regards,
                  Carlo
                  (Stata 18.0 SE)

                  Comment


                  • #10
                    Hi Carlo Lazzaro
                    thanks a lot. This helps much more.

                    My DV is Ceo succession and I want to look how it changed over the years by running a regression with Return on Assets. Before that I took only a trend analysis (which I calculated earlier), however, now I had to take trend squared and this is where I have troubles to interpret it. I took trend and trend squared in the same regression.

                    I hope this gives more info to help me?
                    Thank you,
                    Abdullah

                    Comment


                    • #11
                      Abdullah:
                      it is difficult to be more helpful without taking a look at what you typed and what Stata gave you back.
                      Kind regards,
                      Carlo
                      (Stata 18.0 SE)

                      Comment


                      • #12
                        Hi Carlo Lazzaro ,

                        this is my regression:

                        Code:
                        probit ceo_suc Wni_asset_trend Wni_asset_trend_2 i2a_bhy_l_trend i2a_bhy_l_trend_2 ln_at_trend ln_at_trend_2 i_boardsize i_pid pred_ceo_duality founder cum_no_se yd_* id_* if sample==1, vce(cluster firm_id)
                        
                        outreg2 using time-1, nolabel excel symbol(***, **, *) drop(id_* yd_*) addstat(Pseudo R-squared, e(r2_p)) append cttop(tt2/ceo2, firm clusters)

                        And I get the following results:
                        Wni_asset_trend -0.0236
                        (0.0539)
                        Wni_asset_trend_2 -0.000652
                        (0.00355)
                        i2a_bhy_l_trend -0.0486***
                        (0.0163)
                        i2a_bhy_l_trend_2 0.00162*
                        (0.000924)
                        ln_at_trend 0.0239***
                        (0.00418)
                        ln_at_trend_2 -0.000966***
                        (0.000204)
                        i_boardsize 0.00131
                        (0.00953)
                        i_pid -0.00626***
                        (0.00138)
                        pred_ceo_duality 0.211***
                        (0.0449)
                        founder 0.115
                        (0.258)
                        cum_no_se 0.344***
                        (0.0265)
                        Constant -2.317***
                        (0.502)
                        Observations 10,192
                        Pseudo R-squared 0.0855
                        Standard errors in parentheses
                        *** p<0.01, ** p<0.05, * p<0.1

                        These are my variables:

                        DV: CEO succession
                        IV: net income/asset trend

                        Control variables
                        net income/asset trend square
                        bhy = buy hold return
                        ln_at = total assets
                        boardsize= Board size
                        pid = percentage of outsider directors
                        pred ceo duality = 1 if predecessor Ceo was ceo and chairman
                        founder = founder of firm
                        cum no se = cumulative number of successions

                        What is this telling you now? I hope more? Thank you!

                        Last edited by Abdullah Baba; 24 Jun 2018, 10:17.

                        Comment


                        • #13
                          Carlo Lazzaro Unfortunately I clicked on reply, before finishing. Now I have edited the post.

                          Comment


                          • #14
                            Abdullah:
                            you can investigate whether the turning points exist for i2a_bhy_l_trend and for ln_at_trend .
                            Taking i2a_bhy_l_trend as an example, the first derivative equals 0 at:
                            Code:
                            -b/2a=0
                            where:
                            a=0.00162
                            b=-0.0486
                            Kind regards,
                            Carlo
                            (Stata 18.0 SE)

                            Comment

                            Working...
                            X