JCTCSR-published
JCTCSR-published
net/publication/357802745
CITATIONS READS
0 6,191
1 author:
Sami Mestiri
Faculté des Sciences Économiques et de Gestion de Mahdia
70 PUBLICATIONS 181 CITATIONS
SEE PROFILE
All content following this page was uploaded by Sami Mestiri on 21 February 2024.
Sami Mestiri*
University of Monastir, Tunisia. Rue Ibn Sina Hiboun, *
Corresponding Author
Mahdia Tunisia. Sami Mestiri, University of Monastir, Tunisia. Rue Ibn Sina Hiboun,
Mahdia Tunisia.
Submitted: 2023, Dec 12; Accepted: 2024, Jan 09; Published: 2024, Feb 13
Citation: Mestiri, S. (2024). ARDL Modeling Using R Software. J Curr Trends Comp Sci Res, 3(1), 01-05.
Abstract
AutoRegressive Distributed Lag models (ARDL) are dynamic models which involve variables lagged over time unlike static
models. The paper aims is present how to apply ARDL models using the R software and show how to use the package
dynamac and will make interesting recommendations for estimating models ARDL using R. Then in this paper, i present the
benefit of dynamac package for the statistical language R, demonstrating its main functionalities in a step by step guide.
1. Introduction
Pesaran et al. (2001) introduced the bounds test for of types of autoregressive distributed lag models, including
cointegration based on the previous work of Pesaran and error-correction models.
Shin (1999) using the ARDL model as a platform for the
The research paper is organized as follows: We provide
test. Since then, the ARDL framework and the bounds test
AutoRegressive Distributed Lag models in Section 2. Section 3
are used constantly by practitioners who seem to adopt
presents Cointegration test. In section 4, we apply the model.
every new advancement of the initial framework. A recent
And finally, we conclude in section 5.
example combining various techniques, is Wu et al. (2022)
who applied bootstrap ARDL with a Fourier function. This
2. Auto Regressive Distributed Lag models
paper provides a smooth introduction to the dynamac
package in R (R Core Team, 2023) and its main features and
AutoRegressive Distributed Lag models (ARDL), are dynamic
capabilities. models which involve variables lagged over time unlike static
Regarding proprietary software like EViews, although they models. These models have the particularity of taking into account
are generally considered more user-friendly, they lack temporal dynamics (adjustment time, expectations, etc.) in the
flexibility compared to programming languages such as R explanation of a variable (time series), thus improving the
(Mestiri (2019 ) ). Additionally, these software platforms are forecasts and effectiveness of policies (decisions, actions, etc.),
often slow to adopt the latest advancements in research and unlike the simple (non-dynamic) model whose instantaneous
can be prohibitively expensive for many users. explanation (immediate effect or not spread over time) only
restores part of the variation in the variable to explain
On the other hand, open-source software do not provide any
guarantees regarding the quality of results, and it is the
In ARDL models we find, among the explanatory variables (𝑋𝑡 ),
responsibility of the user to verify the code. The problem
the lagged dependent variable (𝑌𝑡−𝑝 ) and the past values of the
lies in the fact that not everyone is an expert in the field,
making it challenging to technically validate the code’s independent variable (𝑋𝑡−𝑞 ). They have the following general
implementation. Many practitioners simply seek reliable form:
software they can trust.
𝑌𝑡 = 𝑓(𝑋𝑡 , 𝑌𝑡−𝑝 , 𝑋𝑡−𝑞 )
The dynamac package is a suite of programs in R designed
to assist users in modeling and visualizing the effects of
autoregressive distributed lag models, as well as testing for
cointegration. The core program is dynardl, a flexible
program designed to dynamically simulate and plot a variety
In its general (explicit) form, an ARDL model is written as 𝛥𝑦𝑡 = 𝛾1 𝑦𝑡−1 + 𝛾2 𝑥𝑡−1 + ∑ 𝛼𝑖 𝛥𝑦𝑡−𝑖 + ∑ 𝛽𝑗 𝛥𝑥𝑡−𝑗 + 𝜋0 + 𝜋𝑡
𝑖=1 𝑗=0
follows:
+ 𝑒𝑡
dynardl is simply an engine for regression, but one that allows 𝐼𝑛𝑐𝑜𝑚𝑒𝑡−1 -0.068028 0.031834 -2.137 0.0383∗
users to focus on theoretical specification rather than technical
coding. All variables in the model are entered into the formula.
In this sense, dynardl can be used in any ARDL context, not just
ones in which the user is also expecting cointegration testing or As shown from the Table 2, dynardl has included a constant, the
dynamic simulations.We estimate our example model shown in lagged dependent variable, concern, the first difference of the
Equation 1 using the following R script: two regressors (Income and Unemployment), as well as the lag of
Income.
res1 <- dynardl(concern ∼ Income + Unemployment, data =
ineq, While changes in Income affect changes in Concern in the short-
lags = list("concern" = 1, "Income " = 1), run, changes in Unemployment do not have a statistically
diffs = c("Income ", "Unemployment"), significant effect in the short-run. The lag of Income is negative
ec = TRUE, simulate = FALSE ) and statistically significant
summary(res1) .
Moreover, the parameter on the lagged dependent variable is
negative, between 0 and -1, and statistically significant, giving us
cursory evidence of a cointegrating process taking place; we use
a statistical test for this below.
F-statistic 12.204
5-Conclusions