*! version 1.0.6 06feb2023

Title

ardl -- Autoregressive distributed lag regression model

Syntax

ardl depvar [indepvars] [if] [in] [, options]

Model
lags(numlist) set lag lengths

ec estimate with depvar in first differences and display output in error-correction form

ec1 like option ec, but parameterizes long-run coefficients as of time t-1

exog(exogvars) exogenous variables in regression

noconstant suppress constant term

trendvar[(trendvarname)] add time trend to the model

restricted restrict constant or trend term (see Deterministic components)

regstore(storename) stores estimation results from underlying regress command as storename

perfect do not check for collinearity

Lag selection
maxlags(numlist) set maximum lag lengths

maxcombs(combnum) set maximum number of lag permutations for lag selection to combnum; default: 100000

aic use AIC as information criterion

bic use BIC as information criterion; the default

matcrit(lagcombmat) save combinations of lags across which lag selection has searched in matrix lagcombmat; includes the information criterion for each lag specification

nofast use slow method for finding the optimal lag structure

Reporting
dots display one dot for each 1% progress of optimal lag selection

noctable do not display coefficient table

noheader do not display coefficient table header

display_options control column formats, row spacing, line width, and display of omitted variables

Other
legacy_options Legacy, out-of-date options of former versions of the command that continue to work

You must tsset your data before using ardl; see [TS] tsset.

by is allowed; see [D] by.

depvar and indepvars may NOT contain time-series operators.

See ardl postestimation for features available after estimation.

Description

ardl fits a linear regression model of depvar on indepvars with lagged depvar and indepvars as additional regressors.
Information criteria are used to find the optimal lag lengths, if those are not pre-specified via option lags().
Estimation output is delivered either in levels form or in error-correction form.

Abbreviations and definitions used in the help entries of the ardl package

Abbreviations:

ARDL: auto-regressive distributed lag

CV: critical value

KS: Kripfganz and Schneider (2020)

NAR: Narayan (2005)

PSS: Pesaran, Shin, and Smith (2001)

VECM: vector error-correction model

See also the remarks section on terminology below.

Options

Model

lags(numlist) specifies the number of lags for some or all regressors.
The first number specifies the lag length for depvar that has to be larger than 0; the following numbers specify the lag lengths for the independent variables in the order they appear in indepvars.
0 lags is possible for the long-run regressor variables but never for the lag order of the dependent variable.
Missing values indicate lags that are not pre-specified.
Information criteria are used to determine them.
For example, lags(. . 4) requires the second independent variable to enter with 4 lags while the lags of the dependent variable and the first independent variable are to be determined by an information criterion.

The number of elements in numlist (positive integers or dots) must be equal to the number of variables specified in the command line (depvar + indepvars).
Alternatively, numlist may only contain one element, in which case this number applies to all variables in depvar and indepvars.

ec will estimate the model in 'first-difference' form (see the remarks section on Terminology below) and display the output in error-correction form.
Long-run coefficients are parameterized as of time t.

ec1 works like option ec but uses a parameterization of the model that writes the long-run coefficient regressors as of time t-1.
The two parameterizations will yield identical coefficient values, with the exception of the first first-difference term of each long-run regressor.

Note that it is still possible to have a lag order of zero for one or more regressors.
In this case the covariance matrix will not have full rank.
For more details on the different parameterizations, see the remarks section Long-run coefficients expressed in time t or t-1.

exog(exogvars) specifies additional variables to be tagged on to the regression.

noconstant suppresses the constant term in the model.

trendvar[(trendvarname)] lets you add a time trend term to your model.
trendvarname must exist in the data set before execution of ardl and it must be collinear with timevar, where timevar is the time variable set by tsset.
You may omit trendvarname: Specifying just trendvar is equivalent to trendvar(timevar).

restricted will restrict either the constant term or the time trend, if any of the two are specified.
See Deterministic components below.

If no deterministics are in the model, restricted will cause an error.

regstore(storename) will store the estimation results from the underlying regress command.
See estimates.

In many cases, you do not have to use option regstore() to perform model
diagnostics that relate to the underlying regress command of ardl
since that normally works immediately after ardl.
See ardl postestimation.
However, if the latter procedure fails for some reason, regstore() provides an alternative.

Another potential use for regstore() is to access the regression on which
the output for the error-correction form (option ec or ec1) is based.
The equation that is actually estimated was called the "first-difference equation"
in section terminology.
The output shown corresponds to the "error-correction equation".
Compare equations (FDF0) to (ECF0) (or equations (FDF1) to (ECF1))
in the section on long-run coefficients
to see the difference between the estimated and
presented equations for an ARDL(1,1) model.

Note that if an estimation results set called storename already exists option regstore() will overwrite it without warning.

perfect omits the check for collinearity among the regressors.

Lag selection

maxlags(numlist) specifies the maximum lag order used for optimal lag selection.
The first number specifies the maximum lag length for depvar that has to be larger than 0; the following numbers specify the maximum lag lengths for the independent variables in the order they appear in indepvars.
The default maximum lag order is 4.

Since maxlags only deals with optimal lag order selection, values for all or some of its elements are ignored if lags() indicates pre-specified lags for some or all variables.

The number of elements in numlist (positive integers or dots) must be equal to the number of variables specified in the command line (depvar + indepvars).
Alternatively, numlist may only contain one element, in which case this number applies to all variables in depvar and indepvars.

maxcombs(combnum) specifies the maximum number of lag permutations allowed for the optimal lag selection.
If the number of lag permutations required to find the optimal lag lengths exceeds combnum, ardl errors out.
The default for combnum is 100,000.
You can set combnum to higher values.
If you use option nofast, the default for combnum is 500.

If you have to specify a large number for maxcombs(), say 1,000,000, the computations will take some time.
You will always be able to hit the break key if you want to interrupt execution.

bic and aic specify which information criterion is used.

aic is used to determine the optimal lag lengths with the Akaike information criterion.

bic is used to determine the optimal lag lengths with the Bayesian information criterion.

bic is the default.
You may not use both options at the same time.

Information on the information criterion is only necessary if optimal lag order
selection is performed or if you use option matcrit().
If these options are not used, any specification
of bic and/or aic is ignored.

matcrit(lagcombmat) saves the combinations of lags across which lag selection has searched in matrix lagcombmat.
The matrix also shows the information criterion value for each lag specification.

Before version 0.7.0 of ardl, this matrix was saved automatically in e(lagcombs).
Since the necessary matrix copy operations slow down command execution noticably for large numbers of lag combinations, this has been abandoned.
You have to ask for the creation of this matrix explicitly by using option matcrit().

Potentially, lagcombmat has a large number of rows.
Note that ardl will perform its calculations and define lagcombmat regardless of what your
current size limit for Stata matrices is
(see matsize for Stata 15 and lower versions and limits for Stata 16 and higher versions).
While you will always be able to display lagcombmat, many matrix operations on it
(like matrix indexing) may result in Stata errors if its number of rows exceeds your Stata matrix limit.

nofast uses regress instead of Mata code to perform auxiliary regressions for finding the optimal lag lengths.
This is much slower but in rare cases may be more robust in terms of computer numerics.

Reporting

dots displays information on the progress of the optimal lag selection.
This is useful if the selection procedure considers higher lag orders for a larger number of regressors.
Each dot displayed represents a 1% progress in the calculation of all models considered.

noctable suppresses the display of the coefficient table.

noheader suppresses the display of the coefficient table header.

display_options:
noomitted,
vsquish,
cformat(%fmt),
pformat(%fmt),
sformat(%fmt), and (Stata 12+ only)
nolstretch;
see [R] estimation options.

Other

legacy_options consist of options of former versions of
the command. They are out-of-date but continue to work
in order to not break existing user code.
If you have not used them before, consider them irrelevant, since the current
implementation of the command provides better alternatives.

Remarks

Remarks are presented under the following headings:

Introduction
Terminology
Lag specification
Deterministic components
Long-run coefficients expressed in time t or t-1
The error-correction term
Bounds test for a level relationship
Pure autoregressive processes

Introduction

A autoregressive distributed lag (ARDL) model of order p and q, denoted ARDL(p,q) regresses the dependent variable on p of its own lags and on q lags of one or more additional regressors.
Multiple regressors are allowed to have different lag orders, in which case the model becomes an ARDL(p, q_1, ..., q_k) model, where k is the number of non-deterministic regressors.
ARDL models can, among other things, be used for the estimation and testing of level relationships.

Key contributions in this area are Pesaran and Shin (1999) and Pesaran, Shin and Smith (1999).
For an exposition of the econometrics of ARDL models and their implementation in this command, see Kripfganz and Schneider (2022).
For a succinct exposition of ARDL models in the context of cointegration, see Hassler and Wolters (2005, 2006).

Terminology

The regression equation in the sense of the preceding paragraph is referred to as the levels equation.
This equation can be rewritten such that the differenced depvar is expressed in terms of the lagged depvar, levels of indepvars, and differenced terms of (depvar, indepvars) up to orders (p-1, q_1-1, ...,q_k-1).
This way of writing the ARDL model is referred to here as the first-difference form or equation, although this is a slight abuse of terminology since it is a mere reparameterization of the levels equation.
Dividing the coefficient for the levels regressors by the coefficient of the lagged depvar and appropriately accounting for model deterministics then yields the error-correction form.
It separates the adjustment coefficient to deviations from long-run equilibrium, long-run coefficients, and short-run coefficients.

The remarks section Long-run coefficients expressed in time t or t-1 shows the different parameterizations for the case of an ARDL(1,1) model.

ardl without option ec will run a regression of the levels equation, save the dependent variable and the regressors in the macros e(depvar) and e(regressors) and in the matrix e(b), and display a corresponding table of estimates.
If option ec (or ec1) is used, ardl will run a regression corresponding to the first-difference equation and save the dependent variable and the regressors in the macros e(depvar) and e(regressors).
The coefficient output table and e(b) will be in terms of the error-correction form.

Lag specification

Lags specified in options lags and maxlags refer to lags in the levels equation, whether option ec is used or not.
For example, if you use lags(2 4 4), the dependent variable will have two lags in the levels regression and the two independent variables will have four lags in the levels regression.
The lag length of the first differences in the first-difference equation will be one less for each variable.

In a similar fashion, any lag information saved in e() will refer to the levels equation.

Deterministic components

In the vector error-correction model (VECM) literature, it is common to distinguish five different cases of model deterministics:

casenum description

1 no constant, no trend

2 restricted constant, no trend

3 unrestricted constant, no trend

4 unrestricted constant, restricted trend

5 unrestricted constant, unrestricted trend

Rewriting the levels equation in first-difference form yields restrictions on the constant term and the linear trend.
Cases 2 and 4 impose the implied restriction.
If these restrictions are ignored (cases 3 and 5), a constant term in the first-difference equation can generate a linear trend in the levels equation.
Likewise, an unrestricted trend in the first-difference equation can generate a quadratic trend in the levels equation.
For a more detailed exposition, see for example Luetkepohl (2005), section 6.4, or [TS] vec.

Stata's vec command, which estimates VECMs, distinguishes between the same five cases through its trend option.
The following table provides a mapping between case numbers and vec syntax.

casenum vec syntax

1 trend(none)

2 trend(rconstant)

3 trend(constant)

4 trend(rtrend)

5 trend(trend)

The ardl syntax for determining the casenum is different from vec but close to standard Stata syntax for linear regressions.
A constant term can be omitted by using option noconstant.
To include a time trend, generate a separate trend variable and include it in option trendvar.
If you want to have a linear time trend and your time series variable is named timevar, you can simply use trendvar(timevar).
The table below provides a mapping between case numbers and ardl options.
Note that a constant is included in the model by default which is why the option constant below is in brackets.
It is redundant to specify this option explicitly.

casenum ardl options

1 noconstant

2 [constant] restricted

3 [constant]

4 [constant] trendvar(trendvarname) restricted

5 [constant] trendvar(trendvarname)

Whereas the specification of deterministics has considerable implications for the estimation procedures of VECMs, this is not so for ARDL models.
In the conditional ARDL modelling approach proposed by PSS, for example, cases 2 and 3 and cases 4 and 5 are based on identical linear regressions of the first-difference equation.
The distinction within each case-pair concerns the interpretation of the deterministic terms, i.e. whether they are considered to be part of the long-run relationship or not.
Accordingly, the asymptotic distribution for the test for a levels-relationship advanced in PSS is different for each case.
Kripfganz and Schneider (2022, section 2.4) discuss model deterministics
in the context of ARDL modelling.

Long-run coefficients expressed in time t or t-1

It is possible to write the error-correction form with levels regressors expressed in time t or in time t-1.
These are just different parameterizations.
We show the two parameterizations for an ARDL(1,1) model.
Equations shown refer to the different forms explained in the remarks section on Terminology.
In the equation labels below, read "LE" as "levels equation", "FDF" as "first-difference form", and
"ECF" as "error-correction" form.
Equations (FDF0)-(ECF0) and (FDF1)-(ECF1) express the regressors in the long-run relationship in time t and in time t-1, respectively.
The long-run relationship term appears in brackets.

(LE) y(t) = c + a_1 * y(t-1) + b_0 * x(t) + b_1 * x(t-1) + e(t)

(FDF0) dy(t) = c + (a_1 - 1) * y(t-1) + (b_0 + b_1) * x(t) - b_1 * dx(t) + e(t)

(ECF0) dy(t) = c - (1 - a_1) * [y(t-1) - (b_0 + b_1) / (1 - a_1) * x(t) ] - b_1 * dx(t) + e(t)

(FDF1) dy(t) = c + (a_1 - 1) * y(t-1) + (b_0 + b_1) * x(t-1) + b_0 * dx(t) + e(t)

(ECF1) dy(t) = c - (1 - a_1) * [y(t-1) - (b_0 + b_1) / (1 - a_1) * x(t-1)] + b_0 * dx(t) + e(t)

You can estimate (ECF0) using option ec and (ECF1) using option ec1.
Note that (ECF0) and (ECF1) feature identical coefficient expressions in the long-run relationship.

Note that it is possible to estimate a model with zero lag regressors and express it in (ECF1).
The resulting covariance matrix of the estimates is singular, however.
With a lag order of zero for the x-regressor (ARDL(1,0)), the above equations become:

(FDF0b) dy(t) = c + (a_1 - 1) * y(t-1) + b_0 * x(t) + e(t)

(ECF0b) dy(t) = c - (1 - a_1) * [y(t-1) - b_0 / (1 - a_1) * x(t)] + e(t)

(FDF1b) dy(t) = c + (a_1 - 1) * y(t-1) + b_0 * x(t-1) + b_0 * dx(t) + e(t)

(ECF1b) dy(t) = c - (1 - a_1) * [y(t-1) - b_0 / (1 - a_1) * x(t-1)] + b_0 * dx(t) + e(t)

(FDF0b) and (FDF1b) are identical equations since b_0 * x(t) = b_0 * x(t-1) + b_0 * x(t) - b_0 * x(t-1) = b_0 * x(t-1) + b_0 * dx(t).

Presenting a model in error-correction form (options ec or ec1) takes virtually no
computational time, except for the case of equations like (ECF1b), i.e., when using the
error-correction form with the long-run coefficients expressed in time t-1 (option ec1)
and when there is at least one zero-lag regressor. The internal reformulation of (FDF0b) as (FDF1b)
currently carries some computational cost for models with many regressors and lags.

The error-correction term

The error-correction term or long-run relationship is the term in brackets in equations (ECF0) (or (ECF1)) of the previous section.
The signs of the long-run coefficients in the regression output table, however, are inverted with respect to (ECF0) (or (ECF1)).
That is, they follow the convention of showing the long-run relation as a separate equation:

from (ECF0): [y(t-1) = (b_0 + b_1) / (1 - a_1) * x(t)]

from (ECF1): [y(t-1) = (b_0 + b_1) / (1 - a_1) * x(t-1)]

For example, look at:

. webuse lutkepohl2

. ardl ln_consump ln_inc , lags(1) ec

(output omitted)
---------------------------------------------------------------
D.ln_consump | Coef. Std. Err. t P>|t| [95% Conf. Int]
-------------+-------------------------------------------------
ADJ |
ln_consump |
L1. |-0.297 0.058 -5.099 0.000 -0.412 -0.181
-------------+-------------------------------------------------
LR |
ln_inc |
--. | 0.964 0.006 168.227 0.000 0.952 0.975
-------------+-------------------------------------------------
(output omitted)

The regression table displays the long-run relationship L.ln_consump = 0.964 * ln_inc.
Option ec of predict, by contrast, calculates L.ln_consump - 0.964 * ln_inc.
See ardl postestimation.
The adjustment term in this example is (a_1 - 1) = -(1 - a_1) = -0.297

Bounds test for a level relationship

For testing using critical values and approximate p-values based on response surface regressions from
KS for the PSS bounds testing procedure, use estat ectest;
see ardl postestimation.
Kripfganz and Schneider (2022, section 2.4) provide a discussion
and step-by-step guide for the bounds test.

The superseded command estat btest displays CVs using tabulations
from PSS and NAR.
See ardl legacy.

Pure autoregressive processes

You may omit the specification of indepvars, in which case the process reduces to a pure autoregressive one.
Consequently, you can use ardl for the optimal lag selection of pure autoregressive processes.
See Stata's varsoc for an alternative way of doing this. Furthermore, after the estimation of a pure
autoregressive process with ardl and using the option ec,
you can run the estat ectest postestimation command in order to perform an
augmented Dickey and Fuller (1979) unit-root test with the improved, accurate finite-sample
Kripfganz and Schneider (2020) critical values and corresponding approximate p-values.
The F-statistic in this situation is the square of the t-statistic.
Below is a short illustration of the two approaches.

. webuse lutkepohl2

. ardl ln_inv, ec trend aic maxlag(8)

. estat ectest

Before we can compare results to dfuller, we have to determine the optimal lag order using varsoc.
In ardl this was done automatically.

. varsoc ln_inv, exog(qtr) maxlag(8)

. dfuller ln_inv if e(sample), trend lags(4) regress

The regression results and the value of the t-statistic are identical.
The critical values and approximate p-values are very similar.

Note that for pure autoregressive processes the critical values returned
by estat ectest should be identical for the I(0) and I(1) cases.
Since these values are currently based on separate response surface regressions,
slight deviations may occur.

Examples

Besides this example section, you may also refer to Kripfganz and Schneider (2022)
who discuss the empirical example given in PSS by re-estimating it using ardl.

Here we use Stata's example data set 'lutkepohl2' that contains quarterly data for German aggregate income,
investment, and consumption. We estimate an ARDL model in levels-form using the optimal number of lags according to BIC.

. webuse lutkepohl2

. ardl ln_inv ln_inc ln_consump, lags(. . 4) maxlag(3 3 3)

Lags for ln_inv and ln_inc are optimally selected.
ln_consump is pre-specified to receive a lag order of 4.
Here the maxlag setting of 3 is ignored.
The lags chosen are indicated in the output table header and also saved as a matrix.

. matrix list e(lags)

For the next model estimates, we do not specify the maxlag() option, so the default of a maximum lag of 4 applies to all regressors.
Since we also do not specify the lags() option, lags are selected optimally for all regressors.

. ardl ln_inv ln_inc ln_consump

To estimate the error-correction coefficients, use option ec.

. ardl ln_inv ln_inc ln_consump, ec

predict works as usual:

. predict yhat if e(sample), xb

Since we have used option ec in the ardl estimation, the predicted values refer to the first difference of ln_inv, not to the level:

. tsline yhat d.ln_inv

To give an example which is more meaningful from an economic perspective, we now want to examine a potential levels relationship between consumption and income.
The unrestricted constant in the model below is capable of generating the upward drift in the variables that is visible from their time-series graphs.

. ardl ln_consump ln_inc, lags(4) ec

The long-run coefficient on income is close to 1 and has a tight confidence intervall.
To check whether a long-run relationship between consumption and income can be statistically confirmed, we use the postestimation command estat ectest, which displays results of the PSS bounds testing procedure.

. estat ectest

The output shows that we cannot confirm the existence of a levels relationship.
Neither the F-statistic nor the t-statistic reject the null hypothesis of no levels relationship.

Saved results

ardl saves the following in e():

Scalars

e(N) number of observations

e(df_m) model degrees of freedom

e(df_r) residual degrees of freedom

e(mss) model sum of squares

e(rss) residual sum of squares

e(rmse) root mean squared error

e(r2) R-squared

e(r2_a) adjusted R-squared

e(ll) log likelihood under additional assumption of i.i.d. normal errors

e(N_gaps) number of gaps in sample (note: not number of missings)

e(tmin) first time period in sample

e(tmax) last time period in sample

e(rank) rank of e(V)

if optimal lag selection was performed:

e(numcombs) number of lag combinations included in the optimal lag selection procedure

if option ec or ec1 was used:

e(case) casenum for model deterministics

e(F_pss) F-statistic, bounds test for casenum

e(t_pss) t-statistic, bounds test for casenum

if option ec or ec1 was not used:

e(F) F statistic of the model

Macros

e(cmd) ardl

e(cmdline) command as typed

e(cmdversion) version of the ardl command that generated the estimates

e(model) level or ec

e(title) title in estimation output

e(estat_cmd) program used to implement estat

e(predict) program used to implement predict

e(tsfmt) format for the current time variable

e(tvar) time variable

e(tmins) formatted minimum time

e(tmaxs) formatted maximum time

e(regressors) full set of regressors in the ARDL model, as estimated by regress

e(depvar) name of dependent variable

e(properties) b V

if option ec or ec1 was used:

e(det) deterministic terms in the model, but not in the long-run relationship

e(exogvars) exogenous variables

e(srvars) short-run (differenced) regressors

e(lrdet) deterministic term in the long-run relationship

e(lrxvars) non-deterministic regressors in the long-run relationship

Matrices

e(b) coefficient vector of the linear regression model

e(V) variance-covariance matrix of the estimators in the linear regression model

e(maxlags) vector with maximum lag lengths of depvar and indepvars in the levels representation used for optimal lag selection

e(lags) vector with number of lags of depvar and indepvars in the levels representation

Functions

e(sample) marks estimation sample

Authors

Sebastian Kripfganz, University of Exeter Business School, S.Kripfganz@exeter.ac.uk

Daniel C. Schneider, Max Planck Institute for Demographic Research, schneider@demogr.mpg.de

References

Dickey, D. A. and W. A. Fuller (1979). Distribution of the estimators for autoregressive
time series with a unit root. Journal of the American Statistical Association, 74 (366), 427-431.

Hassler, U. and J. Wolters (2006): Autoregressive Distributed Lag Models and Cointegration.
Allgemeines Statistisches Archiv, 90, 59-74.

Hassler, U. and J. Wolters (2005): Autoregressive Distributed Lag Models and Cointegration.
Freie Universitaet Berlin, Working Paper No.2005/22.

Kripfganz, S. and D. Schneider (2020): Response surface regressions for critical value
bounds and approximate p-values in equilibrium correction models.
Oxford Bulletin of Economics and Statistics, 82 (6), 1456-1481. DOI: 10.1111/obes.12377

Kripfganz, S. and D. Schneider (2022) ardl: Estimating autoregressive distributed lag and equilibrium correction models. Research Center for Policy Design Discussion Paper TUPD-2022-006, Tohoku University.
Available at https://www2.econ.tohoku.ac.jp/~PDesign/dp/TUPD-2022-006.pdf

Luetkepohl, H. (2005): New Introduction to Multiple Time Series Analysis.
Berlin, Heidelberg: Springer Verlag.

MacKinnon, J. G. (1991). Critical values for cointegration tests. In: R. F. Engle and
C. W. J. Granger (Eds.): Long-Run Economic Relationships: Readings in Cointegration,
Chapter 13, pp. 267-276. Oxford, UK: Oxford University Press.

MacKinnon, J. G. (1996). Numerical distribution functions for unit root and cointegration
tests. Journal of Applied Econometrics, 11 (6), 601-618.

Narayan, P.K. (2005): The Saving and Investment Nexus for China:
Evidence from Cointegration Tests.
Applied Economics, 37 (17), 1979-1990.

Pesaran, M.H. and Y. Shin (1999): An Autoregressive Distributed Lag Modelling Approach to Cointegration Analysis.
In: Strom, S. (Ed.): Econometrics and Economic Theory in the 20th Century: The Ragnar Frisch Centennial Symposium.
Cambridge, UK: Cambridge University Press.

Pesaran, M.H., Shin, Y. and R.J. Smith (2001): Bounds Testing Approaches to the Analysis of Level Relationships.
Journal of Applied Econometrics, 16 (3), 289-326.

Also see

Help: [R] regress, [TS] vec

Other commands of the ardl package: ardlbounds