Announcement

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

  • Sebastian Kripfganz
    replied
    Dear Nazib,
    This ardl command is not suitable for panel data but only for a single time series.

    My other command, xtdpdqml, implements a specific quasi-maximum likelihood (QML) estimator for dynamic panel data models with a short time horizon. You are right that in this context the OLS estimator is biased and inconsistent (under fixed T). Currently, xtdpdqml only allows for a single lag of the dependent variable and it does not automatically select the optimal number of lags for the other regressors. Please see the following topic for more information:
    XTDPDQML: new Stata command for quasi-maximum likelihood estimation of linear dynamic panel models

    The QML estimator underlying the xtdpdqml command is only one possible approach to tackle the bias of the OLS estimator. Others include bias-corrected estimators (see for example the user-written command xtlsdvc), GMM estimators (see for example the user-written command xtabond2), or full-information maximum likelihood / structural equation modelling (see for example the user-written command xtdpdml [note the missing q in the command name compared to my command]). This list is not exhaustive.

    When the time dimension is large (and tends to infinity), OLS estimation can be consistent. In such a situation, mean-group or pooled mean-group estimation (see for example the user-written command xtpmg) might be appropriate. This depends very much on your particular context but should not be further discussed in this topic here. If you have any follow-up query about these other estimators, please post it in existing Statalist topics dealing with these commands or start a new topic. Other people might be more able to advise on them. As a first step, I suggest that you make yourself familiar with the literature in particular in your area of research to find out which estimators are used by others in similar situations and what are the pros and cons of these estimators.

    [Disclaimer: I am not associated with any of these commands other than ardl and xtdpdqml. Please employ a Stata, Statalist, or google search to find out more about them.]
    Last edited by Sebastian Kripfganz; 16 Dec 2015, 10:54.

    Leave a comment:


  • Sebastian Kripfganz
    replied
    Dear Valérie,
    Thanks for following up on this issue. It took me some time to understand what you mean but I think I got it. Essentially, the variable LNX is treated as an exogenous regressor. In principle, the ardl command has the option exog() that can be used for this purpose. However, the ardl command would then no longer report a long-run coefficient for this regressor as it is essentially left out from the long-run relationship. This is just a matter of how the results are presented and does not affect the estimation or testing.

    However, I just realized that the current version of our ardl package does not accept the situation, where there is no regressor other than the lagged dependent variable included in the long-run relationship. In other words, the situation of k=0 is currently not supported. We may have to put this on our to-do list for potential improvements.

    Thank you very much again for raising this issue.

    Leave a comment:


  • Nazib Lee
    replied
    Hi sebastian,

    Can I apply this ardl command in panel data ardl? or I can simply use xtdpdqml to estimate ardl in stata?
    as far as I know, ols estimator cannot obtain consisten estimate on dynamic panel data

    Leave a comment:


  • valérie orozco
    replied
    In my message on the 23rd of Nov, I pasted results obtained from some colleagues with Microfit (F-statistic of 11.8907 and same upper and lower bounds). I told you (message on the 24th of november) that I succeed in obtaining same coefficients (both with the ardl command of Stata and with Microfit) than those of my colleagues except the F statistic (I obtained 6.9345 with Microfit and 6.395 with Stata).

    I 've just discovered how my colleagues obtained a different F test (but same coefficients). They force the lnY variable to not appear in lagged form. So we can say it is a k=0 model (Microfit output indicates ARDL(2) instead of ARDL(2,0) I obtained). The estimated coefficients are exactly the same. I don't understand how it can be possible to have exactly the same coefficients, with some X coefficients (and so for me it is not a k=0 case) and not the same F test.

    In fact, in their case it seems for me that the F test only tests L.lnY=0 whereas in my ARDL(2,0) estimation I test (L.lnY=0 and L.lnX=0). As in the LR term we have the lnX coefficients (the ECM term can be written L.lnY- b L.lnX) I don't understand how it can be possible to consider a k=0 case...I even don't know what it means. Do you have some ideas?

    Here the results of my colleagues (with Microfit) :

    Code:
    Autoregressive Distributed Lag Estimates
                ARDL(2) selected based on Akaike Information Criterion
    *******************************************************************************
     Dependent variable is LTFP
     50 observations used for estimation from 1963 to 2012
    *******************************************************************************
     Regressor              Coefficient       Standard Error         T-Ratio[Prob]
     LNY(-1)                   .26434             .13493             1.9592[.056]
     LNY(-2)                   .31955             .12454             2.5658[.014]
     C                         1.8713             .53340             3.5082[.001]
     LNX                      .067817            .020605             3.2913[.002]
    *******************************************************************************
     R-Squared                     .98785   R-Bar-Squared                   .98706
     S.E. of Regression           .026446   F-Stat.    F(3,46)      1246.4[.000]
     Mean of Dependent Variable    5.1312   S.D. of Dependent Variable      .23244
     Residual Sum of Squares      .032173   Equation Log-likelihood       112.7696
     Akaike Info. Criterion      108.7696   Schwarz Bayesian Criterion    104.9456
     DW-statistic                  2.0606
    *******************************************************************************
             Error Correction Representation for the Selected ARDL Model
                ARDL(2) selected based on Akaike Information Criterion
    *******************************************************************************
     Dependent variable is dLTFP
     50 observations used for estimation from 1963 to 2012
    *******************************************************************************
     Regressor              Coefficient       Standard Error         T-Ratio[Prob]
     dLNY1                    -.31955             .12454            -2.5658[.014]
     dLNX                  .067817            .020605             3.2913[.002]
     ecm(-1)                   -.41611             .12067            -3.4483[.001]
    *******************************************************************************
     List of additional temporary variables created:
     dLTFP = LTFP-LTFP(-1)
     dLTFP1 = LTFP(-1)-LTFP(-2)
     dLKFRS25 = LKFRS25-LKFRS25(-1)
     ecm = LTFP   -4.4971*INPT   -.16298*LKFRS25
    *******************************************************************************
     R-Squared                     .39903   R-Bar-Squared                   .35984
     S.E. of Regression           .026446   F-Stat.    F(3,46)     10.1810[.000]
     Mean of Dependent Variable   .014236   S.D. of Dependent Variable     .033054
     Residual Sum of Squares      .032173   Equation Log-likelihood       112.7696
     Akaike Info. Criterion      108.7696   Schwarz Bayesian Criterion    104.9456
     DW-statistic                  2.0606
    Estimated Long Run Coefficients using the ARDL Approach
                ARDL(2) selected based on Akaike Information Criterion
    *******************************************************************************
     Dependent variable is LTFP
     50 observations used for estimation from 1963 to 2012
    *******************************************************************************
     Regressor              Coefficient       Standard Error         T-Ratio[Prob]
     C                       4.4971            .036804           122.1924[.000]
     LNX                     .16298           .0068402            23.8264[.000]
    *******************************************************************************
    
    Testing for existence of a level relationship among the variables in the ARDL model
    *******************************************************************************
     F-statistic  95% Lower Bound  95% Upper Bound  90% Lower Bound  90% Upper Bound
       11.8907         12.6082         12.6082         10.3543         10.3543
    
     W-statistic  95% Lower Bound  95% Upper Bound  90% Lower Bound  90% Upper Bound
       11.8907         12.6082         12.6082         10.3543         10.3543
    *******************************************************************************

    Leave a comment:


  • Georg Neuschaeffer
    replied
    Thank you very much Sebastian. This is a great help!

    Leave a comment:


  • Sebastian Kripfganz
    replied
    1) What Microfit refers to as ecm(-1) is the coefficient of the 1-period-lagged error-correction term. That is the same as the "adjustment coefficient" in the Stata output.

    2) You do not want to save the coefficient as a variable because this coefficient is just a constant. Instead you want to save the error-correction term itself as a new variable (see my earlier post about the distinction). Based on Valérie's Stata output you could do this as follows:
    Code:
    /* ECM ARDL (restriction on the constant) */
    ardl lnY lnX, ec restricted aic
    gen ect = lnY - _b[LR:lnX] * lnX - _b[LR:_cons]
    
    /* ECM ARDL (without any restriction) */
    ardl lnY lnX, ec aic
    gen ect = lnY - _b[LR:lnX] * lnX
    Notice that this is the error-correction term for period t. To obtain the error-correction term for period t-1, that is \(ECT_{t-1}\) used by Narayan and Smyth (2004), you simply have to take the first lag: L.ect

    We will put the computation of the error-correction term as a new variable on our to-do list for future improvements of the ardl package. Thanks for this suggestion.

    Leave a comment:


  • Georg Neuschaeffer
    replied
    Sebastian, regarding my post about the Error Correction Term I have two questions:
    1) In Valéries output the "adjustment coefficient" of the Stata output is equal to the ecm(-1) from the Microfit output with a rounding difference. Are both having the same interpretation? I am a bit confused on this matter with regard to your earlier answer.
    2) Is it possible to save the terms of the ecm(-1)/adjustment coefficient in Stata as a variable, because I need it for a Granger Causality test. See for example Narayan and Smyth (2004).

    Leave a comment:


  • valérie orozco
    replied
    Sebastian, Georg, thank you for your answers and help. OK for the Narayan case III. For the F test, I'm still surprised they are different (I also had a look inside the ardl command and didn't find anything that strikes me). If someone has an idea...

    Leave a comment:


  • Georg Neuschaeffer
    replied
    Dear Valerie, I think you have mistakenly looked up the wrong critical bounds from the Narayan-tables. The critical bounds you referring to are the ones for Case II (Narayan 2005, p.1987). The correct ones should be from Case III (Narayan 2005, p. 1988). At 10% and for k=1 and T=50 they are 4.190 and 4.940. For 5% the bounds are 5.220 and 6.070 for the K01 T=50 case. Both bounds are quite similar to the ones from the Microfit codes.

    Leave a comment:


  • Sebastian Kripfganz
    replied
    The Microfit critical values are close to those of Narayan (2005) for case 3. You are referring to case 2 instead.

    Admittedly, I did not look at the F-statistic itself. I do not know why it differs between Microfit and Stata. I just had a brief look into the ardl code but could not find a mistake in the computation of the F-statistic. Again, I do not know how the F-statistic is computed by Microfit.

    Leave a comment:


  • valérie orozco
    replied
    Thank you Sebastian.
    I don't find the critical values of Microfit so close from Narayan (2005).
    At 10% the Microfit critical bounds are 4.2070 and 4.9431. In Narayan(2005) for k=1 and n=50 they are 3.177 and 3.653. In Pesaran and al. (2001), like in the ardl command, they are 4.04 and 4.78.
    At 5% the Microfit critical bounds are 5.2102 and 6.0627. In Narayan(2005) for k=1 and n=50 they are 3.860 and 4.440. In Pesaran and al. (2001), like in the ardl command, they are 4.94 and 5.73.
    So Microfit critical bounds are closer from Pesaran and al. (2001) than from Narayan(2005).
    And how can we explain the differences of the F-test? (here 6.395 in Stata, 6.9345 in Microfit).

    Leave a comment:


  • Sebastian Kripfganz
    replied
    Dear Valérie, the full output helps to shed some light on this matter. Indeed, it seems that your initial guess is correct that the differences in the critical values are related to Georg's comment. The critical values reported by Microfit come very close to those reported by Narayan (2005) for case 3 with 50 observations and 1 long-run forcing variable. In that respect, these small-sample critical values are probably better suited for inference than the asymptotic critical values reported by the ardl command. As mentioned earlier, we are planning to implement those finite-sample critical values as well, as time permits.

    If at some time you come across a source for the critical values displayed by Microfit, I would be happy if you could let us know.

    Leave a comment:


  • valérie orozco
    replied
    Thank you Sebastian for your answer. I'm not a Microfit specialist at all. I'm just continuing a work of some colleagues that were using it and my goal is to use Stata, which is a reproducible software (Microfit is a point and click soft). But I have to reproduce previous results and it is not very easy. The Microfit output I put in my previous message was the results obtained by my colleagues. But when I tried it, I don't obtain the same one. Here I really put what I obtain in Stata and Microfit (again F stat are different, but not so far).

    Microfit results :
    Code:
     
                       Autoregressive Distributed Lag Estimates                  
               ARDL(2,0) selected based on Akaike Information Criterion          
    *******************************************************************************
     Dependent variable is LNY
     50 observations used for estimation from 1963 to 2012
    *******************************************************************************
     Regressor              Coefficient       Standard Error         T-Ratio[Prob]
     LNY(-1)                  .26434             .13493             1.9592[.056]
     LNY(-2)                  .31955             .12454             2.5658[.014]
     LNX                     .067817            .020605             3.2913[.002]
     C                        1.8713             .53340             3.5082[.001]
    *******************************************************************************
     R-Squared                     .98785   R-Bar-Squared                   .98706
     S.E. of Regression           .026446   F-Stat.    F(3,46)      1246.4[.000]
     Mean of Dependent Variable    5.1312   S.D. of Dependent Variable      .23244
     Residual Sum of Squares      .032173   Equation Log-likelihood       112.7696
     Akaike Info. Criterion      108.7696   Schwarz Bayesian Criterion    104.9456
     DW-statistic                  2.0606
    *******************************************************************************
     
     
        Error Correction Representation for the Selected ARDL Model        
               ARDL(2,0) selected based on Akaike Information Criterion          
    *******************************************************************************
     Dependent variable is dLNY
     50 observations used for estimation from 1963 to 2012
    *******************************************************************************
     Regressor              Coefficient       Standard Error         T-Ratio[Prob]
     dLNY1                   -.31955             .12454            -2.5658[.014]
     dLNX                    .067817            .020605             3.2913[.002]
     ecm(-1)                 -.41611             .12067            -3.4483[.001]
    *******************************************************************************
     List of additional temporary variables created:
     dLNY = LNY-LNY(-1)
     dLNY1 = LNY(-1)-LNY(-2)
     dLNX = LNX-LNX(-1)
     ecm = LNY   -.16298*LNX   -4.4971*C
    *******************************************************************************
     R-Squared                     .39903   R-Bar-Squared                   .35984
     S.E. of Regression           .026446   F-Stat.    F(3,46)     10.1810[.000]
     Mean of Dependent Variable   .014236   S.D. of Dependent Variable     .033054
     Residual Sum of Squares      .032173   Equation Log-likelihood       112.7696
     Akaike Info. Criterion      108.7696   Schwarz Bayesian Criterion    104.9456
     DW-statistic                  2.0606
    *******************************************************************************
     
    Estimated Long Run Coefficients using the ARDL Approach            
               ARDL(2,0) selected based on Akaike Information Criterion          
    *******************************************************************************
     Dependent variable is LNY
     50 observations used for estimation from 1963 to 2012
    *******************************************************************************
     Regressor              Coefficient       Standard Error         T-Ratio[Prob]
     LNX                      .16298           .0068402            23.8264[.000]
     C                        4.4971            .036804           122.1924[.000]
    *******************************************************************************
     
     
     
    Testing for existence of a level relationship among the variables in the ARDL model
    *******************************************************************************
     F-statistic  95% Lower Bound  95% Upper Bound  90% Lower Bound  90% Upper Bound
        6.9345          5.2102          6.0627          4.2070          4.9431
     
     W-statistic  95% Lower Bound  95% Upper Bound  90% Lower Bound  90% Upper Bound
       13.8691         10.4204         12.1254          8.4140          9.8863
    *******************************************************************************
     If the statistic lies between the bounds, the test is inconclusive. If it is
     above the upper bound, the null hypothesis of no level effect is rejected. If
     it is below the lower bound, the null hypothesis of no level effect can't be
     rejected. The critical value bounds are computed by stochastic simulations
     using 20000 replications.
    So it is written that the critical value bounds are calculted by simulations.

    It seems it is a restricted intercept case. In Stata, I estimate ARDL in level and then the ARDL ECM form both with restriction (to check the intercept coefficient) and without restriction (I read the F-test has to be those from an unrestricted case).

    Code:
    /*level ardl*/
    ardl lnY lnX, aic
     
    ARDL regression
    Model: level
     
    Sample:       1963 -       2012
    Number of obs  = 50
    Log likelihood = 112.7696
    R-squared      = .98784778
    Adj R-squared  = .98705524
    Root MSE       = .02644628
    ------------------------------------------------------------------------------
             lnY |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
             lnY |
             L1. |   .2643447   .1349268     1.96   0.056    -.0072488    .5359382
             L2. |   .3195464   .1245427     2.57   0.014     .0688549    .5702378
                  |
             lnX |   .0678166   .0206047     3.29   0.002     .0263414    .1092918
           _cons |   1.871289   .5333987     3.51   0.001     .7976133    2.944965
    ------------------------------------------------------------------------------
     
    /*ECM ARDL (restriction on the constant)*/
    ardl lnY lnX, ec restricted    aic
     
    ARDL regression
    Model: ec
     
    Sample:       1963 -       2012
    Number of obs  = 50
    Log likelihood = 112.7696
    R-squared      = .39903176
    Adj R-squared  = .35983818
    Root MSE       = .02644628
     
    ------------------------------------------------------------------------------
         D.lnY |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    ADJ        |
            lnY |
            L1. |   -.416109    .120671    -3.45   0.001    -.6590071   -.1732108
    -------------+----------------------------------------------------------------
    LR         |
            lnX |   .1629779   .0068402    23.83   0.000     .1492092    .1767466
        _cons |   4.497114   .0368035   122.19   0.000     4.423032    4.571195
    -------------+----------------------------------------------------------------
    SR         |
            lnY |
            LD. |  -.3195464   .1245427    -2.57   0.014    -.5702378   -.0688549
    ------------------------------------------------------------------------------
     
    . ardl, noctable btest
     
    ARDL regression
    Model: ec
     
    Sample:       1963 -       2012
    Number of obs  = 50
    Log likelihood = 112.7696
    R-squared      = .39903176
    Adj R-squared  = .35983818
    Root MSE       = .02644628
     
     
    Pesaran/Shin/Smith (2001) Bounds Test
    H0: no levels relationship             F =  13.422
     
    Critical Values (0.1-0.01), F-statistic, Case 2
     
          | [I_0]   [I_1]  | [I_0]   [I_1]  | [I_0]   [I_1]  | [I_0]   [I_1]
          |    L_1     L_1 |   L_05    L_05 |  L_025   L_025 |   L_01    L_01
    ------+----------------+----------------+----------------+---------------
      k_1 |   3.02    3.51 |   3.62    4.16 |   4.18    4.79 |   4.94    5.58
    accept if F < critical value for I(0) regressors
    reject if F > critical value for I(1) regressors
     
    k: # of non-deterministic regressors in long-run relationship ARDL regression
     
    /*ECM ARDL (without any restriction)*/
    ardl lnY lnX, ec     aic
     
    ARDL regression
    Model: ec
     
    Sample:       1963 -       2012
    Number of obs  = 50
    Log likelihood = 112.7696
    R-squared      = .39903176
    Adj R-squared  = .35983818
    Root MSE       = .02644628
     
    ------------------------------------------------------------------------------
           D.lnY |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    ADJ          |
             lnY |
             L1. |   -.416109    .120671    -3.45   0.001    -.6590071   -.1732108
    -------------+----------------------------------------------------------------
    LR           |
             lnX |   .1629779   .0068402    23.83   0.000     .1492092    .1767466
    -------------+----------------------------------------------------------------
    SR          |
             lnY |
             LD. |  -.3195464   .1245427    -2.57   0.014    -.5702378   -.06885
         _cons |   1.871289   .5333987     3.51   0.001     .7976133    2.944965
    ------------------------------------------------------------------------------
      
    . ardl, noctable btest
     
    ARDL regression
    Model: ec
     
    Sample:       1963 -       2012
    Number of obs  = 50
    Log likelihood = 112.7696
    R-squared      = .39903176
    Adj R-squared  = .35983818
    Root MSE       = .02644628
     
     
    Pesaran/Shin/Smith (2001) Bounds Test
    H0: no levels relationship             F =  6.395
                                           t = -3.448
     
    Critical Values (0.1-0.01), F-statistic, Case 3
     
          | [I_0]   [I_1]  | [I_0]   [I_1]  | [I_0]   [I_1]  | [I_0]   [I_1]
          |    L_1     L_1 |   L_05    L_05 |  L_025   L_025 |   L_01    L_01
    ------+----------------+----------------+----------------+---------------
      k_1 |   4.04    4.78 |   4.94    5.73 |   5.77    6.68 |   6.84    7.84
    accept if F < critical value for I(0) regressors
    reject if F > critical value for I(1) regressors
     
    Critical Values (0.1-0.01), t-statistic, Case 3
     
          | [I_0]   [I_1]  | [I_0]   [I_1]  | [I_0]   [I_1]  | [I_0]   [I_1]
          |    L_1     L_1 |   L_05    L_05 |  L_025   L_025 |   L_01    L_01
    ------+----------------+----------------+----------------+---------------
      k_1 |  -2.57   -2.91 |  -2.86   -3.22 |  -3.13   -3.50 |  -3.43   -3.82
    accept if t > critical value for I(0) regressors
    reject if t < critical value for I(1) regressors
     
    k: # of non-deterministic regressors in long-run relationship
    So F-test in Stata is 6.395 whereas it was 6.9345 in Microfit.
    Last edited by valérie orozco; 24 Nov 2015, 06:54.

    Leave a comment:


  • Sebastian Kripfganz
    replied
    If you have the same estimated coefficients both with the ardl command and Microfit, then also the F-statistic and the corresponding asymptotic critical values should be the same. I actually do not where the critical values reported by Microfit are taken from. It would be helpful, if somebody could provide some insight about the critical values used there. The ones reported by the ardl command are taken from Pesaran, Shin, and Smith (2001). Bounds Testing Approach to the Analysis of Level Relationships. Journal of Applied Econometrics 16, 289-326.

    Did you check that the critical values from Microfit also refer to case 3 (unrestricted intercept and no trend)?

    What strikes me, though, is that your Microfit critical values are the same for the upper and lower bound. This implies that those critical values refer to a model with k=0 long-run forcing variables, while the ardl output provides critical values for k=1. That does not make sense if both models are the same. Without seeing the full estimation output I cannot say more at this point.

    Leave a comment:


  • valérie orozco
    replied
    I tried Microfit software (demo version 5.01) developped by Pesaran and tried to compare with my Stata results.I don't have the same F-stat value, neither same indicated bounds. Do you know why? Is it related to Georg' point? Or did I miss something?

    For example, for the same model (and estimated parameters are the same) in Stata :

    Code:
    Pesaran/Shin/Smith (2001) Bounds Test
    H0: no levels relationship             F =  6.395
                                           t = -3.448
    
    Critical Values (0.1-0.01), F-statistic, Case 3
    
          | [I_0]   [I_1]  | [I_0]   [I_1]  | [I_0]   [I_1]  | [I_0]   [I_1]
          |    L_1     L_1 |   L_05    L_05 |  L_025   L_025 |   L_01    L_01
    ------+----------------+----------------+----------------+---------------
      k_1 |   4.04    4.78 |   4.94    5.73 |   5.77    6.68 |   6.84    7.84
    accept if F < critical value for I(0) regressors
    reject if F > critical value for I(1) regressors
    
    Critical Values (0.1-0.01), t-statistic, Case 3
    
          | [I_0]   [I_1]  | [I_0]   [I_1]  | [I_0]   [I_1]  | [I_0]   [I_1]
          |    L_1     L_1 |   L_05    L_05 |  L_025   L_025 |   L_01    L_01
    ------+----------------+----------------+----------------+---------------
      k_1 |  -2.57   -2.91 |  -2.86   -3.22 |  -3.13   -3.50 |  -3.43   -3.82
    accept if t > critical value for I(0) regressors
    reject if t < critical value for I(1) regressors
    
    k: # of non-deterministic regressors in long-run relationship
    in Microfit :

    Code:
    Testing for existence of a level relationship among the variables in the ARDL model
    *******************************************************************************
     F-statistic  95% Lower Bound  95% Upper Bound  90% Lower Bound  90% Upper Bound
       11.8907         12.6082         12.6082         10.3543         10.3543
     
     W-statistic  95% Lower Bound  95% Upper Bound  90% Lower Bound  90% Upper Bound
       11.8907         12.6082         12.6082         10.3543         10.3543
    *******************************************************************************

    Leave a comment:

Working...
X