0% found this document useful (0 votes)
3 views

ardl-modeling-using-r-software

This research article discusses the application of ARDL models using R software, specifically focusing on the dynamac package. It provides a step-by-step guide on utilizing the package for estimating ARDL models and highlights the benefits of using R over proprietary software. The paper also covers cointegration tests and the dynamics of autoregressive distributed lag models.

Uploaded by

munjunga
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

ardl-modeling-using-r-software

This research article discusses the application of ARDL models using R software, specifically focusing on the dynamac package. It provides a step-by-step guide on utilizing the package for estimating ARDL models and highlights the benefits of using R over proprietary software. The paper also covers cointegration tests and the dynamics of autoregressive distributed lag models.

Uploaded by

munjunga
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

ISSN: 2836-8495

Research Article Journal of Current Trends in Computer Science Research


ARDL Modeling Using R Software

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
The goal of this paper is helping to apply ARDL models using the R software. We will cover its benefits, show how to use the
packages and will make interesting recommendations for estimating models ARDL using R.

This paper presents the dynamac package for the statistical language R, demonstrating its main functionalities in a step by
step guide.

JEL codes: C15, C88

Keywords: R Software, ARDL, Cointegration Test.

1. Introduction program is dynardl, a flexible program designed to dynamically


Pesaran et al. (2001) introduced the bounds test for cointegration simulate and plot a variety of types of autoregressive distributed
based on the previous work of Pesaran and Shin (1999) using lag models, including error-correction models.
the ARDL model as a platform for the test. Since then, the
ARDL framework and the bounds test areThe usedresearch
constantly paper
by The is research
organized paperasis follows:
organized We as follows:
provide WeAutoRegressive
provide Auto Di
practitioners who seem to adopt every new advancement of Regressive Distributed Lag models in Section 2. Section 3
Lag models in Section 2. Section 3 presents Cointegration
the initial framework. A recent example combining various presents Cointegration test. In section 4, we apply the model.
test. In section 4,
the bootstrap
techniques, is Wu et al. (2022) who applied model. ARDL And with
finally,And
wefinally,
conclude in section
we conclude 5. 5.
in section
a Fourier function. This paper provides a smooth introduction to
the dynamac package in R and its main features and capabilities. 2. Auto Regressive Distributed Lag models
2 AutoRegressive Distributed Lag models
Auto Regressive Distributed Lag models (ARDL), are dynamic
Regarding proprietary software like EViews, although they are models which involve variables lagged over time unlike static
generally considered more user-friendly, they lack flexibility
AutoRegressive models.Lag
Distributed These models(ARDL),
models have the areparticularity
dynamic of models
consideringwhich inv
compared to programming languages such as R. Additionally, temporal dynamics (adjustment time, expectations, etc.) in
ables lagged over time unlike static models.
these software platforms are often slow to adopt the latest the explanation of a variable (time series), thus improving the
advancements in research and can beThese models
prohibitively have the forecasts
expensive particularity of takingofinto
and effectiveness account
policies temporal
(decisions, actions,dynamics
etc.), (ad
for many users. time, expectations, etc.) in the explanation of a variable (time
unlike the simple (nondynamic) model whose instantaneous series), thus i
the forecasts and effectiveness explanation of (immediate
policies (decisions,
effect or notactions, etc.),
spread over unlike
time) only the sim
On the other hand, open-source software does not provide restores part of the variation in the
dynamic) model whose instantaneous explanation (immediate effect or not sp variable to explain.
any guarantees regarding the quality of results, and it is the
time) only restores part of the variation in the variable to explain.
responsibility of the user to verify the code. The problem lies In ARDL models we find, among the explanatory variables (Xt
in the fact that not everyone is an expert inInthe
ARDL models
field, making it we find,
), the among
lagged the explanatory
dependent variables
variable (Yt-p) and the past(X t ), of
values thethelagged d
variable (Y )
challenging to technically validate the code’s implementation.
t−p and the past values of the independent variable
independent variable (Xt-q). They have the following general (X t−q ). They
Many practitioners simply seek reliablefollowing
software they can trust.
general form::form::
Yt = f (Xt , Yt−p , Xt−q )
Dynamac is a suite of programs in R designed to assist users in
In its general
modeling and visualizing the effects of autoregressive (explicit)Inform,
distributed an ARDL
its general (explicit)model
form, is
an written as follows:
ARDL model is written as
lag models, as well as testing for cointegration. The core follows:
Yt = a0 + a1 Yt−1 + · · · + ap Yt−p + b0 Xt + + · · · + bq Xt−q + εt
p q
 
Yt = a 0 + Yt−i + Xt−j + εt
J Curr Trends Comp Sci Res, 2024 Volume 3 | Issue 1 | 1
i=1 j=0

With ε ∼ (0, σ) error term.


b0 translates the short-term effect of Xt on Yt .
variable (Y t−p ) and the past values of the independent variable (Xt−q ). They have the
Infollowing
its generalgeneral form::
following general form::form, an ARDL
(explicit) model is written as follows:
Yt = f (Xt , Yt−p , Xt−q )
Yt = f (Xt , Yt−p , Xt−q )
In its general Y(explicit)
t = a0 + a 1 Yt−1 an
form, + ·ARDL
· · + ap Ymodel
t−p + b is0 X t + + · as
written ·· + bq Xt−q + εt
follows:
In its general (explicit) form, an ARDL model is written as follows:
p q
Yt = a0 + a1 Yt−1 + · · ·  + ap Yt−p + b0 Xt + + · · · + bq Xt−q + εt
Yt = a0 + a1 Y =+
Ytt−1 a0· + · · + apYYt−i + Xt−j + εt
t−p + b0 Xt + + · · · + bq Xt−q + εt
i=1p j=0q
 
p q
With ε ∼ (0, σ) error term. Yt = a0 +  Yt−i +  Xt−j + εt
Yt = a0 + i=1 Yt−i + j=0 Xt−j + εt
b0 translates the short-term effect of Xt on Yt .
i=1 j=0
IfWithwe consider
ε ∼ (0, σ) theerror
following
term.long-term or equilibrium relationship Yt = k + φXt + u , We
With ε ∼ (0,σ) bWith
can error term.
ε ∼ (0,the
calculate
0 translates
σ) error
the long-run term.
short-term effect
effectof X oft Xon Yt Yast . follows:
t on
b0 translates the short-term
translates
bIf0 we effect
the of X
consider the followingt
on Y
short-term t
. effect of
long-term or X on Yt .
t equilibrium
 relationship Yt = k + φXt + u , We
If we consider If the
we following
consider long-term
the or equilibrium
following relationship
long-term or Y = kbj+ φXt + urelationship
equilibrium , we can calculateYt =theklong-run
+ φXt effect
+ u ,ofWeXt on Yt
as follows: can calculate the long-run effect of Xφt = on Yt as follows:
t

with canSCR calculate


= Sums the long-run
of Squares effect of Xt on1Y
of Residuals for
−t as
thefollows:
aimodel with h delays
with SCRhh = Sums of Squares of Residuals for the model with h delays
n = Number of observations  bj
n = Number As with of
any observations
dynamic model, we willφ= use the binformation criteria (AIC, SIC and HQ)
Ln = Natural logarithm φ = 1 −  ai
j
Lnto=determineNatural logarithm
the optimal shift (p* or q*); an optimal shift is one whose estimated
These ARDL models generally suffer from 1 −erroraiautocorrelation problems, withmodel
the
As with any These
offers dynamic
Asthe ARDL
model,
minimum
with any models
we will
value
dynamic generally
use of the
one
model, ofsuffer
information
we thewill from
statedthat
use error
of Akaike
criteria.
the autocorrelation
(AIC),
These
information that of
criteria
criteria problems,
Schwarz
are:
(AIC,(SIC)
that
SICwith
and
of thatthe
of
Akaike
and Hannan
HQ)
presence
criteria (AIC, SIC and
ofHQ)
thetolagged
determine
endogenous
the optimal
variable
shift (p*
as explanatory
and Quinn (HQ).
andAkaike
Their
from values
multi-collinearity,
(AIC) are calculated
presence
(AIC), of
As that
withtheofanylagged
dynamic
Schwarz endogenous
(SIC) model,
shiftand variable
we will as the
use explanatory
information and from
is criteria multi-collinearity,
(AIC, SIC and HQ) as
or q*); anwhich
to determine
optimal complicates
shift is one
the
whose
optimal
the estimation
estimated model
(p*ofthat
or
offersthe ofparameters
q*);
the
Hannan
an optimal
follows:
and Quinn
byshift
Ordinary (HQ).
one Their
whose
Least Akaike
estimated
Squares/OLS. values
model
which to
(AIC)
offers complicates
determine
are
the the the
calculated asestimation
optimal shift
follows: (p*of theq*);
or parameters
an optimal byshift
Ordinary
is one Least
whose Squares/OLS.
estimated model
minimumHere, value heone
of ofminimum
has to
the resort value
to of one
techniques
stated criteria. These ofrobust
criteria the
are:stated criteria.
estimation These
(SUR criteria
method, are:
etc.) that
to of Akaike
overcome
Here, offers
(AIC), he the
has
thattoofresort
minimum Schwarz to techniques
value (SIC)of one and ofrobust
the
that of estimation
stated
 ofcriteria.
Hannan  (SUR
and These
Quinn method,
criteria
(HQ). etc.)
are:
Their to overcome
that of Akaike
Akaike
these problems. Also, with
we noteh =
SCR Sums
that theof Squares
variables Residuals
consideredfor the model
in with
these h delays
models mustvalues
be
these (AIC),
(AIC) problems. Also, we
thatcalculated
are of Schwarz n note and
as (SIC)
= Number
follows: that that
of the of
observationsvariables
Hannanconsidered
SCR h and Quinnin(HQ).
2h these Their
models mustvalues
Akaike be
stationary to avoid spurious regressions.
Ln = Natural AIC (h) = The
Ln ARDL model
+ makes
logarithmThe ARDL model makes it possible to estimate it possible to estimate
stationary
(AIC) are to calculated
avoid spurious regressions.
as follows: n n
short-term dynamics and These long-termARDL modelseffectsgenerally
forcointegrated
sufferfrom errorseries or even integrated
autocorrelation at the
problems, with
short-term dynamics and long-term
presence of the effects
lagged forcointegrated
endogenous SCR h  as2h
variable series or even
explanatory and integrated
from at
multi-collinearity,
with SCRdifferent
= Sums oforders.Squares of Residuals for the AICmodel (h)with= Lnfor cointegrated
SCR +series
2h or even integrated at different orders.
h delays different
h
orders. which complicates
AIC (h) the=estimation
Ln of
n the parameters
h
+ n by Ordinary Least Squares/OLS.
Here, he has to resort to techniquesnrobust estimation n (SUR method, etc.) to overcome
n = Number of observations 3.
2 Cointegration Test
these problems. Also, we note that the variables considered in these models must be
3
3 Cointegration
Ln = Natural logarithm
Cointegration test
test
stationary
When we have several integrated variables of different orders
to avoid spurious regressions. The ARDL model makes it possible to estimate
(I(0), I(1)), we can use the cointegration test of Pesaran et al.
short-term dynamics and long-term effects for cointegrated series or even integrated at
These ARDL models generally suffer from autocorrelation (2001)
errororders. 2 called “bounds test to cointegration”, initially developed
When
problems,When
we
with thewe
have
presence
several integrated
different variables of different
2Pesaran and
variable ofbydifferent
orders (I(0), I(1)), we can use the
Shin (1999).
have of the lagged
several endogenous
integrated variables orders (I(0), I(1)), we can use the
cointegration
as explanatory test of Pesaran
and from multi-collinearity, et al.
which (2001) called “bounds test to cointegration”, initially
complicates
cointegration test of Pesaran et al. (2001) called “bounds test to cointegration”, initially
developed
the estimation by Pesaran
of the parameters 3 Shin
by and
OrdinaryCointegration
(1999).
Least Squares/ The testmodel which serves as a basis for the test of cointegration
OLS. Here,
developed by Pesaran and Shin (1999). by staggered lags (test of Pesaran et al. (2001)) is (test
the following
Thehe model
has to resort
whichto serves
techniques arobust
as we basis estimation
for the test of cointegration by staggered lags
The etc.)
(SUR method, modelto which serves
overcome these Whenas a basis
problems. Also, for note
have several
we the test
integrated of cointegration
variables
cointegrated of different by
ARDL staggered
orders
specification (I(0), I(1)),lags
(it takes the (test
we can
form use the
of an error
of Pesaran et al. (2001)) is the following
cointegration cointegrated
test of Pesaran et al. (2001)ARDL specification
called “bounds (it takes the
test to cointegration”, initially
of Pesaran
that the variables et al.
considered (2001))
in these models is must
the befollowing
stationarycointegrated ARDL
correction model or a specification
VECM), when we (it study
takesthethedynamics
form
to avoid form
of an
spurious
error correction
regressions. The ARDL
model
developed by or
model
a VECM),
Pesaran and Shinwhen(1999).we study the dynamics between two
it as between two series
of an error correction The model
model ormakes
which a serves
VECM), a whenfor
basis we
thestudy
xt and
test of the .
ytdynamics
cointegration by between two(test
staggered lags
series
possible to and yt . dynamics and long-term effects
xt short-term
estimate
series x and y .
t t of Pesaran et al. (2001)) is the following cointegrated ARDL specification (it takes the
form of an error correction
p
 model or
a VECM), when we study the dynamics between two
q−1
p q−1
∆yt = γ1 yt−1 series x
+γ x +t and yt .  α ∆y +  β ∆x + π + π + e
∆yt = γ1 yt−1 + γ22 xt−1
t−1 + αii ∆yt−i j t−j
t−i + p βj ∆xt−j q−1 + π0 + πtt + ett
i=1 
j=0  0
∆yt =i=1
γ1 yt−1 + γ2 xt−1 +j=0 αi ∆yt−i + βj ∆xt−j + π0 + πt + et
This specification
This specification presents
presents the ARDL modelthe ARDL
which can be model
written aswhich can be written
i=1
follows:
j=0 as follows:
This specification presents the ARDL model which can be written as follows:
This specification
p
presents the ARDL
q−1
model which can be written as follows:
 p 
q−1p
∆yt = π0 + πt +  αi ∆yt−i +  β ∆xt−j + q−1
 λεt−1 + et
∆yt = π0 + πt + ∆y αti ∆y
= πt−i
0+π +t + βαjji∆x
∆yt−i
t−j+ + λε
βj ∆x ++etλεt−1 + et
t−1t−j
i=1 j=0
i=1 j=0
i=1 j=0
Whereù λWhereù
is the errorλcorrection
is the errorterm,correction
adjustment
Whereù λ iscoefficient
term,
the or note
erroradjustment
correction
et al.from the
willcritical
coefficient
term,
We note or
adjustment values that
restoring
coefficient
from the therestoring
or
critical upper
valuesbound
force. that takes
force. up the
the upper bound tak
restoring Whereù
force. we
we conclude
λ is theà error
conclude the correction
existence
we
à the existence  of
conclude
 of a a
term,
à the adjustment
cointegration
existence
cointegration values
of
for a coefficient
for
relation
which which
cointegration
the the
between
or restoring
variables
relation
variables are
x are
between
and
integrated
y xforce.
integrated
t and
ifofand
y of
order
t order
if and
only
1 I 1 I
only
if
(1)and(1)and
if the lower bo
relation between

we conclude
xt and yt ifàand
theonly
existence
if 0 ≺  λ  of

≺ 1aand cointegration
and rejection
rejection Hthe : λrelation
lower
= 0. boundbetween
concern the
t t
and yt Iif(0).
xt variables and only if
 0 variables I (0).
0 ≺ λ  ≺ 1 and
H0 : λ = 0.0 ≺  λ  ≺ 1 and rejectionrejection H
There 0 : λ = 0. Thus: Cointegration exists test, namely: the de-
Hare: λtwo=à0.steps to follow
0 to apply
Fc  the
B Pesaran
sup
cointegration
There are two à steps to follow to
termination apply
of the the Pesaran
eoptimal calibration cointegration
Fc ≺ B inf Cointegration
above all (AIC,does test,
notand
SIC) namely:
exist the de-
uses the Fisher test to
There
There are terminationare two
two à steps to followà steps
to apply to
the follow
Pesaran
verify the to apply the
cointegration
hypotheses: Pesaran
B inf
≺ F ≺cointegration
B sup
There is notest, namely: the de-
conclusion
of the eoptimal calibration above all (AIC, SIC) and uses the Fisher test to
c
termination
test, namely: of the
the determination eoptimal
of the H0 : α1calibration
eoptimal calibration above
above
= α2 = 0 existence of aall (AIC, SIC)
cointegration and uses the Fisher test to
relation
verify
all (AIC, SIC)
the
andthe
hypotheses:
useshypotheses:
the Fisher test to 1verify1 the2hypotheses:
absence of 4. Application
a cointegration relation
verify H : α 
= α 
= 0
4 illustrate
Application
H0 : α1 = αH = :α
0 0 1 = α2 of
existence existence relation
=a 0cointegration of a cointegrationWe relation the process autoregressive distributed lag modeling,
H0 : α1 = α2 = 0 existence
2 of a cointegration relation
H1 : α1 6=H α216=
: α01absence
= α2 = absence Theof
of a0 cointegration a cointegration
test procedure is suchrelation
relation that wefor
testing
We
must compare the
cointegration
illustrate the processwith
Fisher values obtained
pssbounds,
autoregressive
with the of
and interpretation
distributed lag modeling,
testin
H1 : α1 = α2 = 0 absence of avalues
critical cointegration relation
(bounds) simulated for several cases and different thresholds
X through stochastic simulations using data originally by Pesaran from
tion with pssbounds, and interpretation of X through stochastic simula
The test procedure
The testisprocedure
such that weis must
suchcompare
that we the must
Fisher compare
Wright (2017)
originally from
the onWright
publicvalues
Fisher concern
(2017) on about
publicinequality
obtained concern inthe
withabout the inequality
United in the
The test
values obtained with procedure is such
the critical values thatsimulated
(bounds) we must for compare
States.7 the 3 example,
Fisher values obtained with the
For our For our
example, assume assume
that public that public
concern concern
about about in the US
inequality
critical
several cases
values thresholds
and different
(bounds) simulated for several casesis and different thresholds byisgoing
Pesaran
critical values (bounds)by simulated
Pesaran et al.for
Weseveral
will inequality
cases and
cern), ainfunction
the US,ofConcern
different share(concern),
the thresholds
of income a function
by Pesaran of the
to the top ten percent
J Curr Trends Comp Sci Res, 2024 (incshare10). We also hypothesize thatVolume the unemployment
3 | Issue 1 | 2 rate, Unemp
3 affects concern over the short-run (i.e., is not cointegrating): Before estim
3 using dynamac, users should first check for stationarity. A variety of un
be performed using the urca package (Pfaff et al., 2016). These sugge
series are integrated of order I(1), as they appear integrated in levels b
affects concern over Fortheourshort-run
example,(i.e., is notthat
assume cointegrating):
public concern Before
about estimating
inequality anyinmodel
the US, Concern (con-
using dynamac, users cern),should first check
is a function for stationarity.
of the share of income A variety
going to of unit rootten
the top tests can Income Top 10
percent,
be performed using the urca package (Pfaff et al., 2016). These suggest
(incshare10). We also hypothesize that the unemployment rate, Unemployment (urate), that all three
series are integrated of order
affects concernI(1), as the
over they appear integrated
short-run (i.e., is not in levels but stationary
cointegrating): in
Before estimating any model
first-differences
share of income going (D),
usingshown
to the top in percent,
dynamac,
ten Table 1Income
users should
Top 10 first tests
check
can for stationarity.
be performed A urca
using the variety of [1].
package unit rootsuggest
These tests can
(incshare10). We also hypothesize that the unemployment rate, that all three series are integrated
be performed using the urca package (Pfaff et al., 2016). These suggest that all three of order I(1), as they appear
Unemployment (urate), affects concern over the short-run (i.e., is integrated in levels but stationary in first-differences (D), shown
series are integrated of order I(1), as they appear integrated in levels but stationary in
not cointegrating): Before estimating any model using dynamac, in Table 1
users should first checkfirst-differences
for stationarity. A (D),
varietyshown
of unit in Table 1
root

Given that all series appear to be I(1), we proceed with estimating a model in dy-
nardl in error correction form, and then Table testing for Root
1: Unit cointegration
Tests between concern about
inequality and the share of income of the top 10 percent. In general, we suggest using
Given that all series appear to be I(1), we proceed with estimating income of the top 10 percent. In general, we suggest using this
athis strategy
model in dynardloutlined in Philips
Given
in error correction that (2018)
all
form, along
andseries
then with
appear
testing for alternative
tostrategy
be I(1), tests
we in
outlined for cointegration.
proceed
Philips along Our
with estimating
(2018) a model
with alternative in dy-
tests
error-correction model
cointegration between concern appears
nardl about
in error as:
correction
inequality and the form,
share ofandforthen testing Our
cointegration. for error-correction
cointegrationmodel
between concern
appears as: about
inequality and the share of income of the top 10 percent. In general, we suggest using
∆Concernt = a0+φ 1 Concern
this strategyt−1 +∆1 IncomeT
outlined in Philips op10 t−1 +βalong
(2018) 1 ∆IncomeT op10t +β2 ∆U
with alternative nemployment
tests t +t
for cointegration. Our
error-correction model appears as:
where we assume t ∼ N (0, σ 2 ).
dynardl
dynardl is simply is simply
an engine an engine but
for regression, for regression, butusers
one that allows users to focus on the- rather than technical
∆Concernt = a0+φ1one that allows
Concern to focus on theoretical specification
t−1 +∆1 IncomeT op10t−1 +β1 ∆IncomeT op10t +β2 ∆U nemploym
oretical specification rather than technical
coding. All variables in the model are entered into the formula. coding. All variables in the model are entered
In this sense, dynardl can be used in any ARDL context, not just
into the
4be used
ones in which the formula.
user is also Inexpecting
this sense, dynardl can
cointegration testing in any ARDL
2 or dynamic context,estimate
simulations.We not justour
ones in
example model shown in
Equation which the user
using dynardl
where alsowe
as isfollows:
assume res1
expecting t ∼<-Ndynardl(concern
(0, σtesting
data(ineq)cointegration
). or∼dynamic
incshare10 simulations.We estimate
+ urate, data = ineq, lags = list("concern" = 1,
"incshare10"
our =example
1), diffs =model
c("incshare10",
shown in "urate"),
Equation using dynardl as follows:
ec = TRUE, simulate = FALSE )summary(res1)
data(ineq) 4
res1 <- dynardl(concern ∼ incshare10 + urate, data = ineq,
As shownlags
from=the regression results,
list("concern" = 1,dynardl has included
"incshare10" a constant, the lagged dependent variable, l.1.concern, the first difference
= 1),
of the twodiffs
regressors (Income Top 10 and
= c("incshare10", "urate"), Unemployment), as well as the lag of Income Top 10.
ec = TRUE, simulate = FALSE )
While changes in Income Top 10 affect changes in Concern in the short-run, changes in Unemployment do not have a statistically
summary(res1)
significant effect in the short-run. The lag of Income Top 10 is negative and statistically significant.

J Curr Trends Comp Sci Res, 2024 Volume 3 | Issue 1 | 3


dependent variable, l.1.concern, the first difference of the two regressors (Income Top 10
and Unemployment), as well as the lagTable of Income
2: Top 10.
While changes in Income Top 10 affect changes in Concern in the short-run, changes in
As shown from the regression results, dynardl has included a constant, the lagged
As shown from Unemployment do notdynardl
the regression results, have ahas statistically
included significant
the residuals effect
frominanytheARDL
short-run. Theare
estimation lagwhite
of noise. One
a constant, the Income
lagged dependent variable, and
Top 10 is negative l.1.concern, the significant.
statistically symptom of residual autocorrelation in the presence of a lagged
first difference of the two the
Moreover, regressors
parameter(Income
on theToplagged
10 and dependent variable (where f1 6= 0) is that OLS will result in
5 dependent variable is negative, between 0 and -1,
Unemployment),and as well as the lag of
statistically Income Topgiving
significant, 10. us cursory biased and inconsistent
evidence estimates.process
of a cointegrating Autocorrelation
taking is especially
place; we use a statistical test for this below.pernicious when using the ARDLbounds cointegration test,
While changes in Income Top 10 affect
An essential changes in of
component Concern
ARDL in the since istheensuring
modeling test reliesthat
on thetheassumption
residuals of, serially
from any uncorrelated
short-run, changes in Unemployment do not have a statistically errors for the validity
ARDL estimation are white noise. One symptom of residual autocorrelation in the pres- of the bound’s tests.
significant effect ence
in theofshort-run.
a laggedThe lag of Income
dependent variableTop(where
10 is f1 6= 0) is that OLS will result in biased and
negative and statistically significant. To assist users in model selection and residual testing, we offer
inconsistent estimates. Autocorrelation is especially pernicious when using the ARDL-
dynardl.auto.correlated. This function takes the residuals from
bounds cointegration test, since the test relies on the assumption of, serially uncorrelated
Moreover, the parameter on the lagged dependent variable is an ARDL model estimated by dynardl and conducts two tests
negative, betweenerrors0 andfor
-1, the
and validity of the
statistically boundsgiving
significant, tests. for autocorrelation the Shaprio-Wilk test for normality and the
us cursory evidence To ofassist users in model
a cointegrating processselection and we
taking place; residual testing, we offer
Breusch-Godfrey dynardl.auto.correlated.
test for higher-order serial correlation as well
This function
use a statistical test for this below. takes the residuals from an ARDL model estimated by
as calculates the fit statistics dynardl and conducts
for the Akaike information criterion
two tests for autocorrelation the Shaprio-Wilk test for normality and the Breusch-Godfrey
(AIC), Bayesian information criterion (BIC), and log-likelihood.
test for higher-order
An essential component of ARDL modeling serial correlation
is ensuring as thatwell as calculates the fit statistics for the Akaike
information criterion (AIC), Bayesian information criterion (BIC), and log-likelihood.

Table 3:

In our example, since the value of the F-statistic exceeds the 6Since the t-statistic of -3.684 falls below the 5% critical value
critical value at the upper I(1) bound of the test at the 1% I(1) threshold, this lends further support for cointegration. Taken
level, we may conclude that Income Top 10 and Concern about together, these findings indicate that there is a cointegrating
inequality are in a cointegrating relationship. As an auxiliary relationship between concern about inequality and the income
test, pssbounds displays a one-sided test on the t-statistic on the share of the top 10 percent, and that Equation 6 is appropriately
lagged dependent variable. specified.

J Curr Trends Comp Sci Res, 2024 Volume 3 | Issue 1 | 4


5. Conclusions 3. Mestiri, S. (2020). Using R software to applied econometrics
This paper serves as a comprehensive step-by-step guide, 4. Mestiri, S. (2019) How to use the R software. University of
showcasing the core functionalities of the dynamac package, Monastir Press. DOI 10.13140/RG.2.2.18152.83206
a versatile tool developed in the R language. In addition to 5. Mestiri, S., & Farhat, A. (2021). Using non-parametric
explaining the package capabilities, we provide simple examples count model for credit scoring. Journal of Quantitative
that end-users can readily adopt and tailor to suit their unique Economics, 19, 39-49.
research requirements. 6. Mestiri, S. (2021). Bayesian Structural Var Approch To
Tunisian Monetary Policy Farmework. Journal of Smart
Throughout the illustrative examples, we highlight the user- Economic Growth, 6(2), 67-77.
friendly dynamac package, which enables effortless estimation 7. Pesaran, M. H., Shin, Y., & Smith, R. J. (2001). Bounds
of even the most intricate models. The package flexibility testing approaches to the analysis of level relationships.
becomes evident as it easily accommodates the calculation of Journal of applied econometrics, 16(3), 289-326.
complex designs, making it a valuable asset for researchers 8. Pesaran, M. H., & Shin, Y. (1995). An autoregressive
seeking reliable and robust results [2-10]. distributed lag modelling approach to cointegration
analysis (Vol. 9514). Cambridge, UK: Department of
References Applied Economics, University of Cambridge.
1. Pfaff, B., Zivot, E., Stigler, M., & Pfaff, M. B. (2016). 9. Zeileis, A., & Zeileis, M. A. (2019). Package ‘dynlm’.
Package ‘urca’. Unit root and cointegration tests for time 10. Wright, G. (2018). The political implications of American
series data. R package version, 1-2. concerns about economic inequality. Political Behavior, 40,
2. Jordan, S., Philips, A. Q. (2022). Dynamac: Dynamic 321-343.
simulation and testing for single-equation ARDL models.

Copyright: ©2024 Sami Mestiri. This is an open-access article


distributed under the terms of the Creative Commons Attribution
License, which permits unrestricted use, distribution, and reproduction
in any medium, provided the original author and source are credited.

J Curr Trends Comp Sci Res, 2024 https://opastpublishers.com Volume 3 | Issue 1 | 5

You might also like