You are on page 1of 4

# How to apply panel ARDL using EVIEWS.

you can perform this test easily with the help of few steps following are eviews
steps while in following section you will find theory about panel ardl and how to
run panel ARDL using stata 14,Further panel ARDL have two estimators ,means
we can run ARDL with two methods but EVIEWS only one estimator known as
PMG while stata haive both PMG and MG
Go to quick and select estimate equation
Select from drop down button/combo box or from method tab below equation
specification PMG/ARDL
Now in equation specification tab write your equation like co2 fdi gdp here you
can see first i write dependent variable which is co2 and after this all
independent variable and don't include "C" means constant
Now select fixed or automatic lags its all up to but if you choose automatic lags
you can assign different lag to dependent and independent variables ,like its upto you, mean i can assign maximum 7 lags to dependent variable, while 4 to
independent variable, eviews automatically choose optimal lags even you assign
7 ,eviews can select 2 as optimal,but if choose fixed lags option then assign
same maximum lags both to dependent and independent variable.
When you will OK results will be produce
Now if you want to see individual effect for different companies or country, go to
view of you resulted window and click on view and select cross option and OK.
Theory of panel ARDL
Preconditions regarding sationarity of panel ardl
We can run ardl model in three cases
When all variables are stationary at level
When all variables are stationary at first difference
Or when variables are stationary at level and first difference means in mixture
nature of sationarity
Suppose I have 6 variables suppose 3 stationary at level and 3 at first difference
so I can go now for ARDL model
Remember we cant run ardl when we have second difference variable.
PANEL ARDL
Pooled Mean Group (PMG) model
The main characteristic of PMG is that it allows short-run coefficients, including
the intercepts, the speed of adjustment to the long-run equilibrium values, and
error variances to be heterogeneous country by country, while the long-run slope
coefficients are restricted to be homogeneous across countries. This is
particularly useful when there are reasons to expect that the long-run equilibrium
relationship between the variables is similar across countries or, at least, a sub-

## set of them. The shortrun adjustment is allowed to be country-specific, due to

the widely different impact of the vulnerability to financial crises and external
shocks, stabilization policies, monetary policy and so on. However, there are
several requirements for the validity, consistency and efficiency of this
methodology. First, the existence of a long-run relationship among the variables
of interest requires the coefficient on the errorcorrection term to be negative
and not lower than -2. Second, an important assumption for the consistency of
the ARDL model is that the resulting residual of the error-correction model be
serially uncorrelated and the explanatory variables can be treated as exogenous.
Such conditions can be fulfilled by including the ARDL (p,q) lags for the
dependent (p) and independent variables (q) in error correction form. Third, the
relative size of T and N is crucial, since when both of them are large this allows
us to use the dynamic panel technique, which helps to avoid the bias in the
average estimators and resolves the issue of heterogeneity. Eberhardt and Teal
(2010) argue that the treatment of heterogeneity is central to understanding the
growth process. Therefore, failing to fulfil these conditions will produce
inconsistent estimation in PMG.
The PMG estimator constrains the long term coefficients to be the same across
countries and allows only the short-term coefficients to vary.
Mean Group (MG) estimator
The second technique (MG) introduced by Pesaran and Smith, (1995) calls for
estimating separate regressions for each country and calculating the coefficients
as unweight means of the estimated coefficients for the individual countries. This
does not impose any restrictions. It allows for all coefficients to vary and be
heterogeneous in the long-run and short-run. However, the necessary condition
for the consistency and validity of this approach is to have a sufficiently large
time-series dimension of the data. The cross-country dimension should also be
large (to include about 20 to 30 countries). Additionally, for small N the average
estimators (MG) in this approach are quite sensitive to outliers and small model
permutations (see Favara, 2003).
Dynamic Fixed Effects (DFE) model
Finally, the dynamic fixed effects estimator (DFE) is very similar to the PMG
estimator and imposes restrictions on the slope coefficient and error variances to
be equal across all countries in the long run. The DFE model further restricts the
speed of adjustment coefficient and the short-run coefficient to be equal too.
However, the model features country-specific intercepts. DFE has cluster option
to estimate intra-group correlation with the standard error (Blackburne and
Frank, 2007). Nevertheless, Baltagi, Gri, and Xiong (2000) point out that this
model is subject to a simultaneous equation bias due to the endogeneity
between the error term and the lagged dependent variable in case of small
sample size.
How to perform PANEL ARDL using stata
1) import your data file into stata

2) now create a pool or simple stata give codes to each cross section or entity
like if you have different countries data or companies the u have to give specific
code all countries or companies, further if you have assign code by yourself
suppose u did not write company name like nestles but you indicated nestle
with 111 now u see you have already given the code but if you have simple right
the name of company then u need to give also code
egen country1=group( country) (note: if you have countries data)
egen Company1=group( Company) (note: if you have companies data)
3) 3.now set time which is most important
4) xtset Company1 year, yearly (note: hear I have yearly data and company1 is
new variable which I genrate in step 2)
here we shall Run MG (average):
5) First of all install this package to run PANEL ARDL ssc install xtpmg, replace
6) Suppose you think you have installed this package but still you are not sure
then type in command bar type xtpmg
7) If u see message of no found then install otherwise you have already install it.
8) here we shall Run PMG (average):
xtpmg d.CO2 d.energy d.gdp , lr(l.CO2 energy gdp ) ec(ECT) replace pmg
10) here we shall Run PMG (individual):
(The main characteristic of PMG is that it allows short-run coefficients, including
the intercepts, the speed of adjustment to the long-run equilibrium values, and
error variances to be heterogeneous country by country, while the long-run slope
coefficients are restricted to be homogeneous across countries.)
xtpmg d.CO2 d.energy d.gdp , lr(l.CO2 energy gdp ) ec(ECT) replace full pmg
here we shall Run MG (average):
xtpmg d.CO2 d.energy d.gdp , lr(l.CO2 energy gdp ) ec(ECT) replace mg
(It allows for all coefficients to vary and be heterogeneous in the long-run and
short-run. However, the necessary condition for the consistency and validity of
this approach is to have a sufficiently large time-series dimension of the data.)
here we shall Run MG (Individual):
xtpmg d.CO2 d.energy d.gdp , lr(l.CO2 energy gdp ) ec(ECT) replace full mg
to select between PMG AND MG run housman test following is command
hausman mg pmg, sigmamore
Now if our probability value comes more than 5% we run PMG
If our probability value comes less than 5% we run MG
Running DFE:
xtpmg d.CO2 d.energy d.gdp , lr(l.CO2 energy gdp ) ec(ECT) replace dfe
* Running Hausman test to choose between MG and DFE:
hausman mg DFE, sigmamore Note:
Suppose you want to run all these tests on your data, so simple just import your
data into stata and copy command from here into stata command bar and
replace my variables name with yours.
Good luck.

## Which one: MG vs DFE? Hausman-type test is applied to the difference between

the MG and the Differenced Fixed Effects (DFE). If p-value > 0.05, we conclude
that the DFE model is preferred over the MG model.

## If p-value >5%, then use DFE

If p-value <5%, then use MG