Announcement

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

  • Simon Suleiman
    replied
    Thank you Sebastian.

    Leave a comment:


  • Sebastian Kripfganz
    replied
    Originally posted by Simon Suleiman View Post
    I would like to know how can I generate and compute the error term (ECM t-1)?
    Please see the help file for ardl, in particular the remarks section on "The error-correction term".
    Code:
    webuse lutkepohl2
    ardl ln_consump ln_inc, ec
    predict ecterm, ec

    Leave a comment:


  • Simon Suleiman
    replied

    ardl lnM lnY π lnEX, ec1 lags(2 4 1 1) regstore(ecreg)

    ARDL regression
    Model: ec

    Sample: 2001q1 - 2015q4
    Number of obs = 60
    Log likelihood = 68.247426
    R-squared = .61706315
    Adj R-squared = .52930678
    Root MSE = .08674141

    ------------------------------------------------------------------------------
    D.lnM | Coef. Std. Err. t P>|t| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    ADJ |
    lnM |
    L1. | -.3756424 .1177529 -3.19 0.003 -.6124004 -.1388845
    -------------+----------------------------------------------------------------
    LR |
    lnY |
    L1. | 2.046759 .2340766 8.74 0.000 1.576116 2.517401
    |
    π |
    L1. | -.0746791 .0324809 -2.30 0.026 -.1399863 -.0093719
    |
    lnEX |
    L1. | .629879 .4384167 1.44 0.157 -.2516169 1.511375
    -------------+----------------------------------------------------------------
    SR |
    lnM |
    LD. | -.1253645 .1352892 -0.93 0.359 -.3973816 .1466526
    |
    lnY |
    D1. | 1.402742 .3396997 4.13 0.000 .7197298 2.085754
    LD. | .6953933 .3693675 1.88 0.066 -.0472697 1.438056
    L2D. | .3779132 .3489156 1.08 0.284 -.3236286 1.079455
    L3D. | -.0649744 .2872861 -0.23 0.822 -.6426018 .512653
    |
    π |
    D1. | -.0137279 .0039108 -3.51 0.001 -.021591 -.0058648
    |
    lnEX |
    D1. | -.5099346 .3896824 -1.31 0.197 -1.293444 .2735745
    |
    _cons | -8.565543 2.564517 -3.34 0.002 -13.72185 -3.409237
    ------------------------------------------------------------------------------

    Hello everyone. These are the results of ARDL model. Bounds Test showed that there is a long run relationship between variables. I would like to know how can I generate and compute the error term (ECM t-1)?

    Leave a comment:


  • Sebastian Kripfganz
    replied
    The following example is taken from the ardl help file:
    Code:
    webuse lutkepohl2
    ardl ln_inv ln_inc ln_consump, lags(. . 4) maxlag(3 3 3)
    The first two arguments (dots) of the option lags(. . 4) specify that the number of lags for the dependent ("Y") and the first of the regressors ("X variables") should be chosen automatically. The last element imposes 4 lags on the second regressor. The maxlag(3 3 3) option specifies a maximum of 3 lags for each of these variables when lags are chosen automatically. Notice that the last argument of the maxlag(3 3 3) option is ignored because we have specified a specific lag order for the last variable with the lags(. . 4) option.

    Leave a comment:


  • Kyla Antonio
    replied
    Hello. So far, I've only been able to run the ardl command in stata with Y lags. I was wondering if there is a certain ardl command format that includes lagged X variables in the ardl model in stata.

    Leave a comment:


  • Babacar Mbengue
    replied
    Sebastian Kripfganz
    Thanks for your help, I will not have a such progression in my work without your relevant advices. If I find a way to do the cusum6 test I will contact you. One again, thanks to you

    Leave a comment:


  • Sebastian Kripfganz
    replied
    Your approach to combine the AIC/BIC with economic arguments sounds good. Regarding cusum6, I am afraid that I cannot be of any further help because I am not familiar with that command and it is not directly related to the ardl command. Good luck with your work!

    Leave a comment:


  • Babacar Mbengue
    replied
    Sebastian Kripfganz

    ​​​​​​​I think about your last post and I beleave you are right. Like you said I must use the bic or aic criterias to select the best model. Therefore, I redo my estimation with the command below
    [CODE]. ardl lfbcf_priv ltxx lfbcf_pub lide ldebt_ext ldef_fbcf_priv lcb , ///
    trendvar(timevar) maxlag(2 3 2 2 1 1 1) maxcombs(1500000) regstore(regress_res) //
    /CODE]

    I select the values in the lags max by refering to the economic theory for exemple I suppose that a growth rate recorded over 3 years ago can not affect the investment behaviour that's why I put a lag max of 3 at the second column. A other supposition I have done is that according to the accelerator theory we can have adjustment cost in the private investment that why I put a maxlag of 2 in the first column. At the beginning, I don't know that I have the possibility to choose for each variable a specific lagmax. Finally the models (ardl & ECM) I obtain pass all diagnostic tests and are better than the others even for the bound test. Here below you can find my result

    Click image for larger version

Name:	res6.png
Views:	1
Size:	34.0 KB
ID:	1363176


    Click image for larger version

Name:	res7.png
Views:	1
Size:	52.4 KB
ID:	1363177


    Hope, this time, my modelisation is more scientific.

    Now I am tring to find a why to do the cusum test after a ardl command. It's seem it impossible to that for the moment (see cusum6 reference). I am waiting for your opinion.

    Leave a comment:


  • Babacar Mbengue
    replied
    Sebastian Kripfganz
    I know that it's not very scientific, but if I take those criteria I will have some problems of specification or Heterokesdasticity. In fact, the computer tries to fit the model that the maximun of information of the dependant variable but I don't have enough observations so I must ajust the model to validate the tests of diagnostic. The ardl and ec have both passed those tests. Moreover, the model I get is not so far from the recommanded one given by computer, I had a problem of Heterokedasticity so I must reduce the lags of a variable that I decide to diminue the lag of a variable which have not a significant coefficient.
    For the cusum command I have seen your recommand in your previous comment, but to run this command I must write the regression form and I don't know how extract the regression

    Leave a comment:


  • Sebastian Kripfganz
    replied
    What you are doing sounds very much as if you are changing the model until you get your a priori desired results from the bounds test. That is not a very scientific approach. I still recommend to choose the lag orders with the aic or bic (in combination with maxlags()) which is automatically done by the ardl command if you do not use the lags() option.

    Regarding the CUSUM test, Stata's official cusum command is not what you are looking for. Instead, you probably want to have a look at the user-written cusum6 command that is available from SSC:
    Code:
    ssc describe cusum6
    (I cannot give any further comment about cusum6 because I have never used it.)

    Leave a comment:


  • Babacar Mbengue
    replied
    Sebastian Kripfganz

    The new results already look much better given that the speed-of-adjustment coefficient now falls into the [-1, 0] range. In any case, you should not expect to get very reliable results from your model given your small sample size. That will remain a limiting factor in any case, and there will be no "perfect" or "right" model.

    How did you choose the number of lags for your model, lags(2 2 2 3 0 1 0)? Overall, you still tend to have too many coefficients to be estimated relative to your sample size. I would probably restrict the maximum lag order to maxlags(1) or maxlags(2) and let the AIC or BIC choose the "optimal" lag order given that restriction. It is true that in principle we would like to be less conservative with the choice of the lag orders to make sure that there is no remaining serial correlation in the error term because the latter invalidates the bounds test. However, given your sample size you have to take this risk.

    In addition, you might want to consider removing some regressors from the model which will also help to free up some degrees of freedom. In particular, ldef_fbcf_priv is highly statistically insignificant in your most recent results.
    I think I finally get a more acceptable model with ardl( 2 3 2 2 0 1 0). To obtain this form I compute many time the ardl command with a maxlag(1), maxlag(2) maxlag(3) and I regard the evolution of lags for every variables. I remark somethimes some lags never change. It's that's lags are robust. Subqunetly, I vary the other lags by myself with the lag() in goal to satisfy all tests. While changing the lags, I observe the variation of the bound test to see if the F-statisitic or the t-statistic go up or they go down. After that, I constat that existe a bound of lags which make converge the model . I get this result below
    Click image for larger version

Name:	res1.png
Views:	1
Size:	51.4 KB
ID:	1363153

    I want now to run the cusum test, but when I use this command after the ardl'one below I got a error
    Code:
    estimates store ardl_res
    estimates restore regress_res  
    cusum regress_res

    Leave a comment:


  • Sebastian Kripfganz
    replied
    The new results already look much better given that the speed-of-adjustment coefficient now falls into the [-1, 0] range. In any case, you should not expect to get very reliable results from your model given your small sample size. That will remain a limiting factor in any case, and there will be no "perfect" or "right" model.

    How did you choose the number of lags for your model, lags(2 2 2 3 0 1 0)? Overall, you still tend to have too many coefficients to be estimated relative to your sample size. I would probably restrict the maximum lag order to maxlags(1) or maxlags(2) and let the AIC or BIC choose the "optimal" lag order given that restriction. It is true that in principle we would like to be less conservative with the choice of the lag orders to make sure that there is no remaining serial correlation in the error term because the latter invalidates the bounds test. However, given your sample size you have to take this risk.

    In addition, you might want to consider removing some regressors from the model which will also help to free up some degrees of freedom. In particular, ldef_fbcf_priv is highly statistically insignificant in your most recent results.
    Last edited by Sebastian Kripfganz; 06 Nov 2016, 04:45.

    Leave a comment:


  • Babacar Mbengue
    replied
    Sebastian Kripfganz

    No, you cannot. What you have in mind is essentially the bounds test for the t-statistic. A positive t-statistic implies that the model is explosive.
    I do new regressions and I have this result for the moment. It's not perfect but I think I am close to the right model. I need your advices to perfect my model.
    Click image for larger version

Name:	res5.png
Views:	1
Size:	57.5 KB
ID:	1363126

    Last edited by Babacar Mbengue; 06 Nov 2016, 03:00.

    Leave a comment:


  • Sebastian Kripfganz
    replied
    Originally posted by Babacar Mbengue View Post
    Can we use the "vecstable" command in stata after the ECM model? I tried it but the software signaled me a error.
    No, you cannot. What you have in mind is essentially the bounds test for the t-statistic. A positive t-statistic implies that the model is explosive.

    Leave a comment:


  • Babacar Mbengue
    replied
    Sebastian Kripfganz
    First and foremost, you need to reduce the number of lags in your model either with the option lags() or the option maxlags(). Given the small number of observations and the relatively large number of regressors, you cannot have a model with 4 lags of each of the regressors. This just results in too many parameters relative to the sample size. The EC model is just a reformulation of the ARDL model. If you correct one, the other is automatically corrected as well.

    The bounds test critical values for the t-statistic are only tabulated for the cases with unrestricted deterministic components, i.e. without the ardl option restricted. But actually, the restriction does not matter for the t-statistic. For case 2 you could just use the critical values for the t-statistic from case 3, and similarly for case 4 you can use the critical values from case 5.
    I will try to reduce the lags in my variables. Can we use the "vecstable" command in stata after the ECM model? I tried it but the software signaled me a error.

    Leave a comment:

Working...
X