Announcement

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

  • Quadratic term and concave relationship threshold

    Hello everyone,

    I am exploring whether the hypothesis that above a certain threshold financial depth yields negative results for economic growth. For this purpose, I take the quadratic term of my variable of interest, namely bank credit to the private sector. First I estimate the simple OLS with robust standard errors, which shows that there is indeed a quadratic relationship and that upon a certain threshold financial depth has a negative impact on growth.

    reg gr linitial prcreditBI prcreditBI2 log_trade log_govsize log_school log_infl , robust

    Linear regression Number of obs = 64
    F(7, 56) = 8.36
    Prob > F = 0.0000
    R-squared = 0.5037
    Root MSE = 1.1029

    ------------------------------------------------------------------------------
    | Robust
    gr | Coef. Std. Err. t P>|t| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    linitial | -.9851453 .335963 -2.93 0.005 -1.65816 -.3121306
    prcreditBI | 6.026801 2.051998 2.94 0.005 1.916155 10.13745
    prcreditBI2 | -3.052359 .9509696 -3.21 0.002 -4.95738 -1.147338
    log_trade | -.001041 .2636371 -0.00 0.997 -.5291696 .5270876
    log_govsize | -1.297607 .5570733 -2.33 0.023 -2.413559 -.1816553
    log_school | 2.171247 .8182169 2.65 0.010 .532161 3.810332
    log_infl | .0640021 .1290749 0.50 0.622 -.1945661 .3225703
    _cons | 7.712365 1.98893 3.88 0.000 3.72806 11.69667

    As you can see the coefficient of prcreditBI2 becomes negative. Nevertheless, I do not know how to find the exact threshold when bank credit to the private sector starts yielding a negative effect on growth (e.g credit to the private sector starts yielding negative effects on growth when it reaches 80%of GDP). Can somebody help me with this?

    Thank you!

  • #2
    Guest:
    the first issue is to find out the turning point.
    Starting from the traditional notation:
    Code:
    y=ax2+bx+c
    The first derivative is:
    Code:
    y'=2ax+b
    Hence the requested x is given by the following:
    Code:
    x=b/-2a
    In your case, what above boils down to:
    Code:
    di -(6.026801/(2*-3.052359 ))
    .98723659
    As your turning point is a maximum, to the left of it the slope is positive, whereas it becomes negative to the right.
    For the future, please use -fvvarlist- notation for creating categorical variables and interactions. Thanks.
    Last edited by sladmin; 19 Jul 2021, 14:32. Reason: anonymize original poster
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thank you Carlo! I do understand mathematically how you get that number, however, I am not entirely sure how to get to it in terms of coding. I tried the following:

      dydx gr prcreditB, generate (dgr)

      Then to see the threshold and also the confidence intervals I typed mean

      mean dgr

      Mean estimation Number of obs = 68

      --------------------------------------------------------------
      | Mean Std. Err. [95% Conf. Interval]
      -------------+------------------------------------------------
      dgr | 97.58306 105.7878 -113.5702 308.7364


      Nevertheless, this is not correct and the confidence interval is showing negative values. My goal is not simply to find the threshold, but also to find the confidence intervals (e.g 0.70 - 1.10 would show that below 70%of GDP the marginal effect of financial depth is both positive and statistically significant). Moreover, I wanted to illustrate this in terms of countries (e.g. 70% of the countries in the dataset are below the 98.72% threshold and 30% of countries are below the threshold where the marginal effect of financial depth is both positive and statistically significant.

      I would really appreciate your help in this.

      Thank you !

      Comment


      • #4
        a better way is to use -nlcom- directly after estimating the regression; you don't show your command and your results are hard to read (please use CODE blocks - see the FAQ); here is an example using the auto data set (note that the number in the "Coef." column is the max/min):
        Code:
        . sysuse auto
        (1978 Automobile Data)
        
        . regress price c.weight##c.weight
        
              Source |       SS           df       MS      Number of obs   =        74
        -------------+----------------------------------   F(2, 71)        =     23.09
               Model |   250285462         2   125142731   Prob > F        =    0.0000
            Residual |   384779934        71  5419435.69   R-squared       =    0.3941
        -------------+----------------------------------   Adj R-squared   =    0.3770
               Total |   635065396        73  8699525.97   Root MSE        =      2328
        
        ------------------------------------------------------------------------------
               price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
              weight |  -7.273097   2.691747    -2.70   0.009    -12.64029   -1.905906
                     |
            c.weight#|
            c.weight |   .0015142   .0004337     3.49   0.001     .0006494     .002379
                     |
               _cons |    13418.8   3997.822     3.36   0.001     5447.372    21390.23
        ------------------------------------------------------------------------------
        
        . nlcom -_b[weight]/(2*_b[c.weight#c.weight])
        
               _nl_1:  -_b[weight]/(2*_b[c.weight#c.weight])
        
        ------------------------------------------------------------------------------
               price |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
               _nl_1 |   2401.655   225.3482    10.66   0.000     1959.981     2843.33
        ------------------------------------------------------------------------------

        Comment


        • #5
          Thank you, but I do not understand the interaction term that you have here. Moreover, it does not show how to display the number of countries below or above the Conf. Interval. I believe that there should be a straightforward command or commands that can get me the results that I expect (based on what I wrote above). Any help would be highly appreciated

          Comment


          • #6
            Guest:
            in your case:
            Code:
            c.weight##c.weight
            reads

            Code:
            c.prcreditBI##c.prcreditBI
            Last edited by sladmin; 19 Jul 2021, 14:31. Reason: anonymize original poster
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              Dear Carlo and Rich,

              Many thanks to you both. Now I obtained the confidence intervals. However, - getting back to my second message in this post - this still does not tell me how many countries are above or below these thresholds and whether the marginal effect of financial depth on growth is positive/negative and statistically significant/insignificant in each of the thresholds. Is there any command that can show what I described?

              reg gr linitial c.prcreditBI##c.prcreditBI log_trade log_govsize log_school log_infl , robust

              Linear regression Number of obs = 64
              F(7, 56) = 8.36
              Prob > F = 0.0000
              R-squared = 0.5037
              Root MSE = 1.1029

              -------------------------------------------------------------------------------------------
              | Robust
              gr | Coef. Std. Err. t P>|t| [95% Conf. Interval]
              --------------------------+----------------------------------------------------------------
              linitial | -.9851453 .335963 -2.93 0.005 -1.65816 -.3121306
              prcreditBI | 6.026801 2.051998 2.94 0.005 1.916155 10.13745
              |
              c.prcreditBI#c.prcreditBI | -3.052359 .9509696 -3.21 0.002 -4.95738 -1.147338
              |
              log_trade | -.001041 .2636371 -0.00 0.997 -.5291695 .5270876
              log_govsize | -1.297607 .5570733 -2.33 0.023 -2.413559 -.1816553
              log_school | 2.171247 .8182169 2.65 0.010 .532161 3.810332
              log_infl | .0640021 .1290749 0.50 0.622 -.1945661 .3225703
              _cons | 7.712365 1.98893 3.88 0.000 3.72806 11.69667

              nlcom -_b[prcreditBI]/(2*_b[c.prcreditBI#c.prcreditBI ])

              _nl_1: -_b[prcreditBI]/(2*_b[c.prcreditBI#c.prcreditBI ])

              ------------------------------------------------------------------------------
              gr | Coef. Std. Err. z P>|z| [95% Conf. Interval]
              -------------+----------------------------------------------------------------
              _nl_1 | .9872367 .0922769 10.70 0.000 .8063773 1.168096
              Last edited by sladmin; 19 Jul 2021, 14:31. Reason: anonymize original poster

              Comment


              • #8
                your output is still hard to read - please read and act on the advice in the FAQ

                I don't think I understand your remaining question; maybe someone else can help (or you can clarify which will mean, at the minimum, posting a data example using -dataex-)

                Comment


                • #9
                  The output is showing that bank credit to the private sector has a negative effect on growth when it reaches 98.72% of GDP. The confidence intervals 0.80-1.16 show that below 80% of GDP bank credit to the private sector has a positive effect on growth, between 80%-116% both positive and negative. I want to show how many countries are there in each of these thresholds as shown by the "-nlcom-" command. An example of the table that I want to create is attached here.

                  Thank you!

                  Attached Files

                  Comment


                  • #10
                    Guest:
                    the 95% CI of the turning point is telling you something different: if you draw from the same population 100 samples of the same size of the one that you investigated and repeat the same regression on them, 95 out of the 100 95% CIs for -c.prcreditBI#c.prcreditBI- will include the true, fixed and unknown value of that parameter.
                    Hence, it is not true that below 80% the quadratic function has a positive slope that become negative after 116%, as the sample estimate of quadratic term is still .9872367.
                    To answer your question, you can create a categorical variable that goes like this:
                    Code:
                    gen wanted=1 if prcreditBI>.9872367
                    replace wanted=0 if prcreditBI<=.9872367
                    Last edited by sladmin; 19 Jul 2021, 14:31. Reason: anonymize original poster
                    Kind regards,
                    Carlo
                    (Stata 19.0)

                    Comment


                    • #11
                      Thank you Carlo for your explanation. However, the code that you suggest will show me which and how many countries are below and above the threshold. It will still not tell me for which countries above or below the threshold the bank credit to the private sector has a significant/insignificant effect on economic growth (as illustrated in the attachment above).

                      Comment


                      • #12
                        Guest:
                        Thanks for clarifying.
                        Then you should probably replicate the same regression code for each country:
                        Code:
                        bysort country: <yourpreviousregressioncode>
                        Last edited by sladmin; 19 Jul 2021, 14:31. Reason: anonymize original poster
                        Kind regards,
                        Carlo
                        (Stata 19.0)

                        Comment


                        • #13
                          I do not think this is the code because I have averaged the data by making it cross-sectional (one observation per country). Made there is another way?

                          bysort Country_: reg gr linitial c.prcreditBI##c.prcreditBI log_trade log_govsize log_school log_infl , robust

                          -----------------------------------------------------------------------------------------------------------
                          -> Country_ = Australia
                          insufficient observations

                          -----------------------------------------------------------------------------------------------------------
                          -> Country_ = Austria
                          insufficient observations

                          -----------------------------------------------------------------------------------------------------------
                          -> Country_ = Barbados
                          insufficient observations

                          -----------------------------------------------------------------------------------------------------------
                          -> Country_ = Belgium
                          insufficient observations

                          -----------------------------------------------------------------------------------------------------------
                          -> Country_ = Cyprus
                          insufficient observations

                          Comment


                          • #14
                            at a guess, your table in #17 just counts those units that are "inside" or "outside" the CI limits - but my guesses are often wrong and if I am right in this case, I disagree with what they did; how did they compute "statistical significance"?

                            Comment


                            • #15
                              Dear Akim, You might want to consider (ssc install) utest (a formal test of U or Inverted-U shape), apart from the endogeneity of financial depth variable. Please also have a look at https://link.springer.com/article/10...a-d68e59687d4a.
                              Last edited by River Huang; 28 Feb 2021, 03:13.
                              Ho-Chuan (River) Huang
                              Stata 19.0, MP(4)

                              Comment

                              Working...
                              X