Announcement

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

  • I see, thank you Sebastian!

    Comment


    • I received a request as a private message that I want to answer publicly because I believe others might benefit from the answers as well:1
      I read the original paper by Pesaran and Shin (1997, http://citeseerx.ist.psu.edu/viewdoc...=rep1&type=pdf) and compared it to the information about the ARDL Stata package. There are some important questions remaining and I would be very grateful if you could help me with these issues.

      (1) In Eq. (1.1) in the PS (1997) paper, the authors define the ARDL with levels of y_t and y_t-i, however, the contemperanous effects of the explantory variables (x_t) and the first differences of the contemperanous and the lagged explanatories (last term with delta x). Where can I see this equation from PS (1997) in the Stata package? For me the Eq. (1.1) seems to be a mix of ARDL model and its error correction representation. However, y_t is not in differences, therefore it is not a fully error-correction representation? How does this fit to the Stata package?

      (2) Do you usually estimate Eq. (1.1) in one step or do you first estimate the ARDL with lagged explanatories to identify long-run effects and then afterwards in the second stage estimate the error-correction model to derive the short-run effects? So is it just one equation to be estimated or two steps?

      (3) When estimating the long-run and short-run effects, how to you derive the standard errors/t-statistics? Is it a specific method like delta method?

      (4) I read other empirical papers applying Newey-West standard errors in ARDL models. Is this appropriate? Is it possible to do Newey-West in the Stata ARDL package?
      1. Your observation is correct that equation (1.1) in PS (1997) is something in between the ARDL and EC representation. You cannot obtain this representation directly with our ardl command. The coefficients \(\phi_i\) of the lagged dependent variables and the coefficient \(\beta\) of the contemporaneous x-regressor are those that are reported in the standard levels output of ardl. The coefficients \(\beta_i^\ast\) of the contemporaneous and lagged differences of the x-regressors are those from the EC output of ardl with the option ec. Because there is a 1:1 mapping between the coefficients of these two output representations, you could separately collect the coefficients from these two representations and report them as if you had estimated equation (1.1) directly.
      2. It is just one equation with all the coefficients estimated jointly.
      3. Indeed, the standard errors are obtained with the usual delta method.
      4. That might indeed be appropriate but it is not directly possible with the ardl command. But there is a workaround, illustrated with the following example:
      Code:
      . webuse lutkepohl2
      . ardl ln_inv ln_inc ln_consump, regstore(ardl)
      . estimates restore ardl
      . local cmdline `"`e(cmdline)'"'
      . gettoken cmd cmdline : cmdline
      . newey `cmdline' lag(1)
      --
      1 In general, please post your questions publicly here on Statalist. First, your questions might be of general interest. Second, it is much easier to respond to the questions here in the forum than by e-mail due to the possibility of easily posting code and estimation output.
      https://www.kripfganz.de/stata/

      Comment


      • Hi Sebastian,

        Regarding the application of Newey-West, I tried your code:

        Code:
        webuse lutkepohl2
        ardl ln_inv ln_inc ln_consump, regstore(ardl)
        estimates restore ardl
        local cmdline `"`e(cmdline)'"'
        gettoken cmd cmdline : cmdline
        newey `cmdline' lag(1)
        However, I recognized that when I apply this on the ec regression:

        Code:
        ardl ln_inv ln_inc ln_consump, ec regstore(ardl_ec)
        estimates restore ardl_ec
        local cmdline `"`e(cmdline)'"'
        gettoken cmd cmdline : cmdline
        newey `cmdline' lag(1)
        ...then also the coefficients (and not just the standard errors) of the long-run effects change after the application of the Newey-West errors. Do you know how to derive the NW errors also for the long-run coefficients?

        Thanks for your help!

        Comment


        • After the newey command, you can obtain the long-run coefficients with the corresponding delta-method standard errors by using the nlcom postestimation command. The respective formulae differ depending on whether you have used the level representation or the EC representation of ardl:
          Code:
          . webuse lutkepohl2
          
          . ardl ln_inv ln_inc ln_consump, regstore(ardl)
          . estimates restore ardl
          . local cmdline `"`e(cmdline)'"'
          . gettoken cmd cmdline : cmdline
          . newey `cmdline' lag(1)
          . nlcom (_b[ln_inc] / (1 - _b[L.ln_inv])) ((_b[ln_consump] + _b[L.ln_consump] + _b[L2.ln_consump]) / (1 - _b[L.ln_inv]))
          
          . ardl ln_inv ln_inc ln_consump, ec regstore(ardl_ec)
          . estimates restore ardl_ec
          . local cmdline `"`e(cmdline)'"'
          . gettoken cmd cmdline : cmdline
          . newey `cmdline' lag(1)
          . nlcom (_b[ln_inc] / (- _b[L.ln_inv])) (_b[ln_consump] / (- _b[L.ln_inv]))
          https://www.kripfganz.de/stata/

          Comment


          • Hi Sebastian,

            Sorry, but I have one additional question. I have an ARDL with 11 endogenous variables and 3 exogenous variables with a sample size of around 4000 daily observations. I predefined the optimal number of lags already. I estimate the model as follows

            Code:
            tsset ORDER, daily
            ardl Y X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11, trendvar(ORDER) exog(X12 X13 X14) ec lags(2,3,3,0,0,0,0,0,0,0,0,0)
            When running the model without *ec*, everything works smoothly. However, when applying error correction parametrization, I receive the following error:

            Code:
            Maximum number of iterations exceeded
            As I found out, this error arises from the *nlcom* command, which you use for the ec model.

            Is it possible to increase the number of iterations? What else can I do to make the command running?

            Thanks for your help!
            Attached Files
            Last edited by Franz Langmann; 13 Mar 2018, 09:11. Reason: Added dataset

            Comment


            • I could not replicate the problem with an artificial data set of the same dimensions. There seems to be an idiosyncratic problem with your data set. Would it be possible to share your data set with us (or any subset of the data set that can be used to replicate the problem)?
              https://www.kripfganz.de/stata/

              Comment


              • Originally posted by Sebastian Kripfganz View Post
                I could not replicate the problem with an artificial data set of the same dimensions. There seems to be an idiosyncratic problem with your data set. Would it be possible to share your data set with us (or any subset of the data set that can be used to replicate the problem)?
                Thanks for the quick response! I added the dataset to my previous post. I think it depends on some issue with including the trend variable and X14 as exogenous variable, which is a time break dummy variable.

                Comment


                • It is not primarily a problem of the X14 dummy. When you inspect the ardl level output (without option ec), you will notice that both the coefficient and the standard error of X3 are very small. These tiny estimates create numerical problems in the computation of the delta-method standard errors when using the ec option. As you have figured out already, this problem is linked to Stata's nlcom command; see for example the following old discussion: https://www.stata.com/statalist/arch.../msg01244.html

                  When you summarize the data, you will notice that the values of X3 are much larger than those of all other variables (by a magnitude of about 1000). I thus recommend to just rescale this regressor as follows:
                  Code:
                  gen X3s = X3 / 1000
                  ardl Y X1-X2 X3s X4-X11, trend(ORDER) exog(X12-X14) ec lags(2 3 3 0 0 0 0 0 0 0 0 0)
                  This should work.
                  https://www.kripfganz.de/stata/

                  Comment


                  • Hi Sebastian,

                    Amazing! Thanks for the excellent and fast help.

                    A further issue, which occurs in my model is that the number of regressors exceeds the values reported in PS(2001). Therefore, the bounds test gives me the following error:

                    Code:
                    Model has k=11 weakly exogenous variables, but
                    Pesaran/Shin/Smith (2001) critical values are only tabulated up to k=10.
                    Do you know how to indeed get the F-statistics? I guess it would be a reasonable approach to compare the F-statistic for k=11 with the last bound value (k=10) in PS (2001)?

                    Many thanks!

                    Comment


                    • Originally posted by Franz Langmann View Post
                      Code:
                      Model has k=11 weakly exogenous variables, but
                      Pesaran/Shin/Smith (2001) critical values are only tabulated up to k=10.
                      Do you know how to indeed get the F-statistics? I guess it would be a reasonable approach to compare the F-statistic for k=11 with the last bound value (k=10) in PS (2001)?
                      Please update to the latest version of our ardl command and use the new postestimation command estat ectest. It not only computes the F- and t-statistics for situations with more than 10 regressors, it also reports appropriate critical values and approximate p-values.

                      For details, please see the new Statalist topic and please ask any further questions about this new command version in this new topic (to avoid any confusion with some outdated comments above):
                      ARDL: updated Stata command for the estimation of autoregressive distributed lag and error correction models
                      https://www.kripfganz.de/stata/

                      Comment


                      • Hi everyone,
                        I am running an ARDL model with only 2 variables, with 35 observations, and I get the error ''maximum iterations are exceeded'' !!
                        Click image for larger version

Name:	error1.png
Views:	1
Size:	19.3 KB
ID:	1438443

                        Comment


                        • Please see my earlier comment #293 above. I recommend that you rescale you gdpdh variable (divide by 1000 or one million).

                          Please ensure that you have the latest version of our ardl command. For details, please see the following new Statalist topic and please ask any further questions about this new command version in this new topic (to avoid any confusion with some outdated comments above): ARDL: updated Stata command for the estimation of autoregressive distributed lag and error correction models
                          https://www.kripfganz.de/stata/

                          Comment


                          • it works now, thanks for your precious help.

                            Comment


                            • Dear Sebastian Kripfganz ,
                              I read somewhere that while performing the ARDL test, regardless of whether the variables are I(0) or I(1), we have to make it stationary (hence if it's of I(1), we would take first difference for the test). However, when I tried running ardl (depvar) d.(IndepVar) (IndepVar), it says "factor-variable and time-series operators not allowed". What does this mean?
                              Thank you!
                              Last edited by Adam Ng; 21 Apr 2018, 08:27.

                              Comment


                              • Assuming that you are referring to the bounds test for the existence of a level relationship, you do not have to take first differences of the variables in the first place. Otherwise, I do not know what you mean by "ARDL test".

                                The optimal lag selection performed by the ardl command would become much harder when time-series operators were allowed. For this technical reason, we do not allow time-series operators. If needed, you could generate differenced variables in a first step and then use these new variables in the specification of the ardl command.

                                Please ensure that you have the latest version of our ardl command. For details, please see the following new Statalist topic and please ask any further questions about this new command version in this new topic (to avoid any confusion with some outdated comments above): ARDL: updated Stata command for the estimation of autoregressive distributed lag and error correction models
                                https://www.kripfganz.de/stata/

                                Comment

                                Working...
                                X