Announcement

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

  • #91
    Thanks for the quick response, I'll check out the QML estimator.

    Comment


    • #92
      Hi Sebastian. I am new to econometrics and still learning ARDL.
      I found your package and used it to do a cointegration test for the following model:
      lnCO2= b0+b1lnGDP+b2lnGDP^2+b3lnEN+e

      running ardl lnco2 lngdp lngdp2 lnen, aic automatically runs the regression using the optimal lag form AIC criterion. I get a table with the variables having different lag levels, and for a certain variable there is a "--". What does this mean?
      How would I know if the variables are cointegrated? ( I know i must compare the F-stat to the Pesaran table, if it is within the bound then the variables are cointegrated. But I do not see a F-Stat)

      once they are found cointegrated, I run the ecm by typing ardl lnco2 lngdp lngdp2 lnen, aic ec regstore(ecreg)
      This gives me the SR and LR variable coefficients. Based from the table, the SR only has one independent variable indicated, the other 2 are missing. Does this mean there are no SR effects to the depvar from the other 2? but in the LR, all the variables are indicated in the table even if they are not significant.

      lastly, when I regress ecreg, how does this differ from the first table I get?

      The results are attached. I hope you could help me.

      Thank you.
      Attached Files

      Comment


      • #93
        Elisa:
        The -- below the variable name lngdp in the first column of your first output table refers to the "0-th order" lag of that variable. It is equivalent to L0.lngdp.

        To obtain the F-statistic from the bounds test, you have to estimate the model in the error-correction representation and then invoke ardl with the btest option:
        Code:
        ardl lnco2 lngdp lngdp2 lnen, aic ec btest
        or
        Code:
        ardl lnco2 lngdp lngdp2 lnen, aic ec
        ardl, btest
        As you can see from your first output table, the AIC has chosen an optimal lag order of zero for the variables lngdp2 and lnen. These variables therefore only enter the long-run relationship but do not appear in the short-run section. Conditional on the long-run relationship, there are indeed no additional short-run effects of these variables. Intuitively, if there is only one coefficient associated with these variables in the ARDL model, you cannot separately identify short-run and long-run effects. You would need additional lags in the ARDL representation of the model.

        You can get from your second-last table to the last table by multiplying all the long-run coefficients by the negative of the ADJ coefficient. Please see the ardl help file section about "Long-run coefficients expressed in time t or t-1" for some further remarks about the relation between ARDL and EC coefficients.
        Last edited by Sebastian Kripfganz; 19 Mar 2016, 07:19.
        https://twitter.com/Kripfganz

        Comment


        • #94
          Dear Adviser,
          I am using Stata 11 SE, and trying to perform a Non-linear ARDL model with stata.The non linear variables are constructed in the form:
          pos= summation(j=1 to t) max( del_lnrer_j, 0) ;neg= summation(j=1 to t) min(del_lnrer_j, 0).
          First, I want to estimate the linear ARDL model:

          ΔLnTBi;t =a0 +summation(k=1 to n) b0k ΔLnTBi;t−k +summation(k=0 to n) c0k ΔLnYUS;K+summation(k=0 to n) d0k ΔLnYi;t−k+summation(k=0 to n)e0kΔLnREXi;t−k+ λ1 LnTBi;t−1 + λ2 LnYUS;t−1+λ3 Ln Yi;t−1 + λ4LnREXi;t−1 + μt

          The command i am writing is:
          ardl del_ln_tb_t del_ln_RGDP_US_t del_ln_RGDP_BD_t del_ln_rer_t, this time i get the result,

          (1)What should i type as commands to estimate the model. Besides, i want to find"" F, ECM t-1, LM, RESET, CUSUM, CUSUM^2, R bar^2".
          to find these what are the commands?
          Then i want to estimate the non-linear ARDL model :

          ΔLnTBi;t = a0+summation(k=1 to n1)b0kΔLnTBi;t−k +summation(k=0 to n2)c0kΔLnYUSt−k+summation(k=0 to n3)d0kΔLnYit−k+summation(k=0 to n4)e0kΔPOSt−k+summation(k=0 to n5)f0kNEGt−k+θ0LnTBi;t−1+ θ1LnYUSt−1+ θ2LnYit−1+ θ3POSt−1 +θ4NEGt−1 + ξt

          The command i am writing is:
          ardl del_ln_tb_t del_ln_RGDP_US_t del_ln_RGDP_BD_t pos neg

          This time i DO NOT get the result, But after clicking enter""""# of lag permutations (2500) exceeds setting of 'maxcombs' (500)
          r(9);""", this line is shown.
          How to get rid of this problem? please help me in this regard especially.I am using time series data spanning 1986-2014.
          Please, give me some suggestions and commands to get rid of this problem.

          Regards---
          Maruf Ahmed

          Comment


          • #95
            Maruf Ahmed:
            You can use the ardl option regstore() to store the underlying estimates from regress, e.g.
            Code:
            ardl del_ln_tb_t del_ln_RGDP_US_t del_ln_RGDP_BD_t del_ln_rer_t, regstore(reg_estimates)
            estimates restore reg_estimates
            estimates replay reg_estimates
            The second line allows the subsequent use of all familiar postestimation commands that are available for regress. The last line will display the familiar regress estimation output including F-statistic, R2, adjusted R2, ...

            For CUSUM and CUSUM2 results you might want to have a look at the user-written cusum6 command:
            Code:
            ssc describe cusum6

            The error message that results with your second model could potentially be avoided by using ardl with the maxcombs(#) option, where # should be a number larger than 500, or by restricting the maximum number of lags with the maxlags() option.

            The error-correction representation can be obtained with the ec option, potentially combined with the option minlag1 to obtain the ECM in period t-1.

            Please consult the help file of ardl regarding all of these options.
            https://twitter.com/Kripfganz

            Comment


            • #96
              Dear Adviser,
              Thank you for your response.It was really helpful.
              I am using 4 variables: dependent variable:lnTB_t and independent variables:lnREX_t, lnRGDP_us_t,lnRGDP_BD_t.First, i want to estimate the following model with Pearsen's(2001) LINEAR ARDL or bounds testing approach:

              ΔLnTBi;t =a0 +summation(k=1 to n)b0k ΔLnTBi;t−k +summation(k=0 to n)c0k ΔLnYUS;K+summation(k=0 to n)d0k ΔLnYi;t−k+summation(k=0 to n)e0kΔLnREXi;t−k+ λ1 LnTBi;t−1 + λ2 LnYUS;t−1+λ3 Ln Yi;t−1 + λ4LnREXi;t−1 + μt

              I want to impose a maximum of eight lags on each first differenced variable and use Akaike's Information Criteria(AIC) to select the optimum lags. Explicitly, i want to find the short-run coefficient estimates, long-run estimate and diagnostic statistics that include: F, ECM_t-1, LM, RESET, CUSM, CUSM^2, Rbar^2

              1))) Please give me the stata codes with which i can carry out the tests and find the results.

              Secondly, i want to decompose the real rexchange rate variable lnREX_t as partial sum as: lnREX_t= lnRER_0+ pos+ neg, where pos=summation( J=1 to t) max(ΔLnREXj, 0) ;;; neg=summation( J=1 to t) min(ΔLnREXj, 0)
              2))) what are the commands of generating these variables?
              Followig Shin et. al (2013) , i replace lnREX_t by pos and neg variables and estimate the following NON-LINEAR ARDL model:

              ΔLnTBi;t = a0+summation(k=1 to n1)b0kΔLnTBi;t−k +summation(k=0 to n2)c0kΔLnYUSt−k+summation(k=0 to n3)d0kΔLnYit−k+summation(k=0 to n4)e0kΔPOSt−k+summation(k=0 to n5)f0kNEGt−k+θ0LnTBi;t−1+ θ1LnYUSt−1+ θ2LnYit−1+ θ3POSt−1 +θ4NEGt−1 + ξt

              I want to impose a maximum of eight lags on each first differenced variable and use Akaike's Information Criteria(AIC) to select the optimum lags. Explicitly, i want to find the short-run coefficient estimates, long-run estimate and diagnostic statistics that include: F, ECM_t-1, LM, RESET, CUSM, CUSM^2, Rbar^2.
              3)))Please give me these stata codes explicitly with which i can carry out the tests and find the results ( I have no idea how to carry out this part)
              please help me in this regard especially.I am using time series data spanning 1986-2014. It will be a great help if you provide me with the codes. Grateful to you.

              Regards---
              Maruf Ahmed

              Comment


              • #97
                Maruf Ahmed:
                Please understand that I do not have the time to give such detailed individual advice. Please consult the ardl help file which contains a lot of information about how to use the command and the available options.
                https://twitter.com/Kripfganz

                Comment


                • #98
                  Dear Advisers,

                  I found the package of ARDL model in STATA very useful to my research. Just have a small question relating to running ardl with the optional of max lag length.

                  Particularly, with large number of max lag length and variables (for ex: I have 6 variables and choose the maximum lag length of 8), the STATA takes too long to find out the optimal lag length (the lag permutations is approx 400,000). In fact, I let it run a whole day but it has never responded. I do try many times by using different laptops and desktops, but unfortunately it's still not working.

                  However, when I use Eviews, it just takes few seconds to give me a result.

                  So I do not understand why ARDL package cannot work with large number of lag permutations? And what should I do to fix this problem? I prefer using STATA to Eviews, since STATA has more functions which I need.

                  Many thanks for your consideration!

                  Best,
                  Ngan

                  Comment


                  • #99
                    Ngan:
                    We are aware that the current version of the ardl command is not well suited for the estimation of large models with "many" variables and high lag orders. It is mainly a memory problem. Stata slows down considerably the more memory it requires and eventually it may not respond any more.

                    For the moment, all I can suggest is to reduce the number of maximum lags or to fix the lag order for some of your variables with the lags() option. We will try to implement some improvements in future versions of the ardl package.
                    https://twitter.com/Kripfganz

                    Comment


                    • We have just released a major update of the ardl package. Thanks to all the suggestions and bug reports, the new version has considerably improved functionality. Some of the highlights are as follows:

                      1. As an alternative to the option ec there is a new option ec1 which parameterizes the error-correction representation of the long-run coefficients as of period t-1. This now does work even if there are no lags of a regressor in the ARDL levels equation. (Note that the former minlag1 option that has been discussed earlier in this topic is thus no longer needed. However, the results will be different with ec1 compared to the former minlag1 option if the optimal lag order for some regressors is indeed zero. For backward compatibility, minlag1 continues to work but it is advised to now use ec1 instead.)

                      2. The optimal lag order selection for larger models has been improved. In particular, if the new option fast is specified then ardl will use Mata to do the computations which results in sizeable speed gains. (We kept it as an option because Stata's regress command that is otherwise used is computationally more robust.)

                      3. The new option dots now displays a progress bar during optimal lag order selection which can be useful in the case of large models.

                      4. The postestimation functionality has been improved. Predictions are now available in the familiar way with the predict command. In particular, predict can be used to obtain predictions of the error-correction term. Please see help ardl postestimation for details. (The former regstore() option now becomes redundant but also continues to work for backward compatibility reasons.)

                      5. The computation of the bounds test for the existence of a long-run relationship is now implemented as a postestimation feature. After the estimation of the ARDL model in error-correction form, you can now type estat btest to obtain the bounds test. See help ardl postestimation for details. (The former ardl option btest is now redundant but again continues to work.)

                      6. The new command ardlbounds has been added to the package that can be used to display critical value tables. In addition to the large-sample critical values by Pesaran, Shin, and Smith (2001, Journal of Applied Econometrics), also the small-sample critical values by Narayan (2005, Applied Economics) can be displayed. See help ardlbounds for details.

                      7. Some minor bugs have been fixed.

                      The above list of improvements is not exhaustive. Please consult help ardl for a full list of available options, their description, and remarks concerning the error-correction representation, the bounds test, and other related topics. Note that at least Stata version 11.2 is now required to run the command.

                      To update an existing version of the ardl package type
                      Code:
                      adoupdate ardl, update
                      into Stata's command window.

                      To install a fresh version of the package type
                      Code:
                      net install ardl, from(http://www.kripfganz.de/stata/)
                      into Stata's command window.
                      https://twitter.com/Kripfganz

                      Comment


                      • Hello

                        First of all thank you for your time, it is appreciated. I wanted to ask whether you could briefly explain how it was possible to estimate an error correction model which in my case is simply the reparametrization of an ARDL. How can I obtain the error correction term from the ARDL in Stata?

                        Thank you for your help!
                        Best Regards
                        Valentin

                        Comment


                        • Valentin:
                          Please see the ardl help file for the syntax and available options of the command. Please also have a look at the remarks section of the help file. In particular, the options ec or ec1 will give you the error-correction representation (with parameterization of the error-correction term in period t or t-1, respectively).
                          After having estimated the ardl model with either of the ec or ec1 option, you can obtain the error-correction term as a new variable with the ec option of the postestimation command predict. Please see help ardl postestimation for details.
                          https://twitter.com/Kripfganz

                          Comment


                          • Dear all,

                            I estimated the following ARDL model and tested whether yt and x1t are cointegrated by means of bounds testing approach :

                            Δyt = β0 + Σ βiΔyt-i + ΣγjΔx1t-j + θ0yt-1 + θ1x1t-1 + et


                            Bounds testing indicates that yt and x1t are cointegrated. When I estimated the corresponding error correction model (ECM), the coefficient of the error correction term (ϕ) lies between -1 and 0 and is statistically significant.

                            Δyt = β0 + Σ βiΔyt-i + ΣγjΔx1t-j + ϕECTt-1 + et

                            where ECTt=
                            yt-c0 -a1x1t - vt

                            However, when I introduce additional explanatory variables (z1 to z8) in the specification (ECM), the coefficient of the error correction term doesn't lie between -1 and 0 anymore. Does this mean that I should have introduced the additional explanatory variables at the beginning of the procedure (before bounds testing) already? Should I test whether yt and x1t are cointegrated while considering the additional explanatory variables as exogenous variables?

                            Thank you so much for your help.

                            Here are my results:

                            Note: the optimal lags length is 1 for y and 0 for x1.

                            Code:
                             regress d.y l.d.y d.x1 l.ect, robust
                            Code:
                            Linear regression                                      Number of obs =      42
                                                                                   F(  3,    38) =   12.69
                                                                                   Prob > F      =  0.0000
                                                                                   R-squared     =  0.5385
                                                                                   Root MSE      =  2.1817
                            
                            ------------------------------------------------------------------------------
                                         |               Robust
                            D.           |
                            y |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                            -------------+----------------------------------------------------------------
                            y |
                                     LD. |   .2215078   .1441625     1.54   0.133     -.070334    .5133496
                            x1 |
                                     D1. |  -.2948656   .0597863    -4.93   0.000    -.4158966   -.1738347
                            ect |
                                     L1. |  -.9550015   .1773393    -5.39   0.000    -1.314006   -.5959969
                                   _cons |   .4485086   .3293098     1.36   0.181    -.2181444    1.115161
                            ------------------------------------------------------------------------------


                            Code:
                             regress d.y l.d.y d.x1 l.ect d.z1 d.z2 d.z3 d.z4 d.z5 d.z6 d.z7 d.z8, robust
                            Code:
                            Linear regression                                      Number of obs =      38
                                                                                   F( 11,    26) =    8.37
                                                                                   Prob > F      =  0.0000
                                                                                   R-squared     =  0.6882
                                                                                   Root MSE      =  2.0607
                            
                            ------------------------------------------------------------------------------
                                         |               Robust
                            D.           |
                            y |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                            -------------+----------------------------------------------------------------
                            y |
                                     LD. |   .1602478   .1880296     0.85   0.402    -.2262527    .5467482
                            x1 |
                                     D1. |  -.2354829    .086665    -2.72   0.012    -.4136252   -.0573405
                            ect |
                                     L1. |  -1.029924   .3138605    -3.28   0.003    -1.675074    -.384775
                            z1 |
                                     D1. |  -.0198289   .0288202    -0.69   0.498    -.0790696    .0394119
                            z2 |
                                     D1. |  -.9476361   .6397082    -1.48   0.151    -2.262575    .3673028
                            z3 |
                                     D1. |  -.1182584   .2679417    -0.44   0.663    -.6690205    .4325037
                            z4 |
                                     D1. |   1.555395   6.224749     0.25   0.805    -11.23976    14.35055
                            z5 |
                                     D1. |   1.638369   4.030418     0.41   0.688    -6.646273    9.923011
                            z6 |
                                     D1. |   .0062724   .1266548     0.05   0.961    -.2540703    .2666151
                            z7 |
                                     D1. |  -.1416688   .1269392    -1.12   0.275    -.4025961    .1192586
                            z8 |
                                     D1. |   275.7578   182.6913     1.51   0.143    -99.76966    651.2852
                                   _cons |   .6476965   .5997187     1.08   0.290     -.585043    1.880436
                            ------------------------------------------------------------------------------









                            Comment


                            • There is nothing that guarantees that the coefficient of your error-correction term falls into the interval [-1, 0] even though this is indeed the only meaningful range. Moreover, your coefficient is not statistically significantly different from -1 in either model, so you should not overemphasize the observation that it slightly falls outside of this range in your second model.

                              That said, your second model imposes the restriction that all your variables z1 to z8 do not enter the long-run relationship but only affect the short-run dynamics. There is nothing wrong with that per se if you have a good reason for justifying this assumption given your particular application, but the inclusion of these additional variables will of course affect the estimates of the other coefficients including that of the error-correction term.

                              Personally, I advise against estimating the error-correction term in separate regression first and then including it in a second step as a generated regressor in the error-correction model. This is a very inefficient and error-prone way of doing it. Instead, my suggestion would be to estimate all the coefficients jointly in an ARDL / EC model. You might want to have a look at the help file for the ardl command that has been discussed extensively in this topic.
                              https://twitter.com/Kripfganz

                              Comment


                              • Dear Sebastian,

                                Thank you so much for your reply and your help.

                                Kind regards

                                Comment

                                Working...
                                X