How to perform panel data analysis in E-Views?

By Divya Narang & Priya Chetty on July 8, 2019
Image by

E- Views offer an impressive toolkit that involves the series or the group of series that allows estimating panel data analysis ranging from the simplest to the complex types.  Performing data analysis in E-views is easier to understand as all the necessary statistical modelling can be performed by estimating the regression equation.  In addition to this, E-views allows the work files or the database from MS Excel, SAS, SPSS, STATA and Text file.  These work files can be used to perform a variety of statistical E-views including unit root test for checking stationarity, GARCH tests for heteroscedasticity, autocorrelation LM test, Granger causality test and least square test for performing the linear regression as steps in panel data analysis.

Importing work file in E-views for panel data analysis

The E-views desktop is divided into three sections including the object window, command window and the main menu.  In order to import the data file, follow these steps:

  1. Click on file option in the main menu.
  2. Select ‘ Open’.
  3. Select E-views work file’.
Importing the work file in E-views
Importing the work file in E-views

A browser window will open up through which the work file can be selected and select the type of file as shown in the below figure. After selecting the file from the browser window, a dialogue box opens up which highlights the basic information about the data type. Select the type of data including the character, number or date. It is very important to select the appropriate type of data.

For instance, if a particular column represents the year then select the data type as the date for that particular column. Then define the list of objects in the work file as shown in the figure below.

Selecting the type of Work File
Selecting the type of Work File

The figure below highlights the lists of objects in a work file. This work file includes the data for the variables for the period of 1992-2017 as highlighted in the sample. The yellow colour icons show the data objects and the green colour icons are the views objects such as the tables, graphs.  Double-clicking on any of the objects will open up its own menu that displays the data for each of the objects.

Objects in the Work file
Objects in the Work file

Unit Root Test in E-views

The next step for the panel data analysis is to check the stationarity of the variables used in the regression analysis. Stationarity test is important to establish the validity of the hypothesis test and about the regression parameters (Diebold & Kilian, 2000). Stationarity of the objects is established using at the level, 1st difference and the 2nd difference. For conducting the unit root test in E-views, follow the steps below:

  1. Select the variable for which the Unit root test has to conduct. The data for the selected variable will open up in a separate window.
  2. Go to view and select the unit root test. A new dialogue box would open up. Select the level of differentiation and trend or interception to be included  in the model

The below figure shows the results from the Augmented Dickey fuller unit root test ‘at level’ for the current account balance for the period of 1992-2017. Figure 4 shown below clearly indicates that the null hypothesis for this test is that the current account balance has a unit root. The criteria for accepting or rejecting the null hypothesis are the probability value that must be less than 0.05 for the null hypothesis to be rejected. However, in the case of current account balance, the probability value is 0.006 which is less than the threshold value of 0.05. Hence, the null hypothesis is rejected at 5% level of significance. This means that the variable current account balance is stationary. However, if the variable is non-stationary, take further differentiation of that variable.

Unit Root Test (At level)
Unit Root Test (At level)

Estimating the equation

Estimating the regression equation is important for conducting examining the relationship between the independent and dependent variables using the least squares. For estimating the regression equation, follow the step below:

  1.  Click on the ‘Quick’ option in the menu bar.
  2. Select ‘Estimate equation’ as shown in the figure below.  A new window will open up, in which equation will be specified.
  3. Write the regression equation in the following form.

In this equation, CAB which is the current account balance is the dependent variable and the set of independent variables are:

  • Foreign direct investment,
  • exchange rate dollar,
  • inflation rate,
  • foreign exchange reserves (FER) and,
  • the broad money supply.
Estimating the Equation
Estimating the Equation

Least squares estimates

Least square estimators are used to examine the extent of the impact of the independent variables on the dependent variables. The method of least squares is used to estimate the parameters by minimizing the discrepancies in the observed data (Eagle, 2000). After estimating the equation, specify the model by selecting the least square method from the estimation settings as shown in the figure below.

Model Specification
Model Specification

The type of coefficient matrix and the weights assigned to each of the variables can also be chosen from the options. The results of the least square estimation are shown in the below figure. The results clearly indicate that the broad money supply and the inflation rate significantly impact the current account balance. In addition to this, the R square is about 0.67 and the adjusted R square is about 0.58 indicating that the independent variables explain about 58% variation in the dependent variable. 

Least Square Estimation
Least Square Estimation

Generalized autoregressive conditional heteroscedasticity test

GARCH test used for examining the pattern of error in the statistical model as a step in panel data analysis. This test remains used for confirming that there is no irregular pattern of variation in the error term (Hansen & Peterhansenbrownedu, 2001). In order to conduct the GARCH test, select the estimation method as the Autoregressive Conditional Heteroskedasticity test and select the lag order of the GARCH model. The model by default uses the lag length of order 1 and the uses the method of moments to estimate the model. The results of the GARCH model are shown in the below figure.

The results clearly indicate that among the set of independent variables, only inflation is significant at 5 % level of significance. This means that the variable ‘inflation’ suffers from the problem of heteroscedasticity. Furthermore, the R square and the adjusted R square are 0.65 and 0.56 indicating the independent variables explain about 56% variation in the dependent variable. Lastly, the value of the Durbin Watson is 1.4 which is less than 2 indicating that there is positive autocorrelation.


Granger causality test in panel data analysis

The Granger causality test used for examining the cause and effect relationship among two sets of variables of the panel data analysis. This approach is widely used in experimental and non-experimental fields that involve dynamic econometric time series and methodologies. For conducting the Granger causality test, follow these steps:

  1. Select the quick option in the menu bar.
  2. Select the group statistics and click on the Granger causality option, a new dialogue box opens up.
  3. In this dialogue box, select the number of lag  values and the variables which have to be used in the Granger causality test

The figure shown below highlights the results of the Granger causality test using the lag value of 2. The results clearly indicate that the null hypothesis that ‘CAB does not Granger cause DOLLAR’ is rejected as the p-value less than 0.05 This means that current account balance has an impact on the exchange rate (dollar). In addition to this, FDI does not Granger cause FER’ is also rejected indicating that the amount of foreign direct investments in an economy significantly impacts the level of foreign exchange reserves. 

Granger Causality Test
Granger Causality Test


Priya is the co-founder and Managing Partner of Project Guru, a research and analytics firm based in Gurgaon. She is responsible for the human resource planning and operations functions. Her expertise in analytics has been used in a number of service-based industries like education and financial services.

Her foundational educational is from St. Xaviers High School (Mumbai). She also holds MBA degree in Marketing and Finance from the Indian Institute of Planning and Management, Delhi (2008).

Some of the notable projects she has worked on include:

  • Using systems thinking to improve sustainability in operations: A study carried out in Malaysia in partnership with Universiti Kuala Lumpur.
  • Assessing customer satisfaction with in-house doctors of Jiva Ayurveda (a project executed for the company)
  • Predicting the potential impact of green hydrogen microgirds (A project executed for the Government of South Africa)

She is a key contributor to the in-house research platform Knowledge Tank.

She currently holds over 300 citations from her contributions to the platform.

She has also been a guest speaker at various institutes such as JIMS (Delhi), BPIT (Delhi), and SVU (Tirupati).



2 thoughts on “How to perform panel data analysis in E-Views?”