0% found this document useful (0 votes)
247 views40 pages

Overview of Eviews

The document provides an overview of using EViews software for econometric analysis. It discusses opening the EViews window, creating a workfile to store data, importing data into EViews from Excel, viewing and plotting data, generating new variables, running simple regressions, and performing regression tests. The document serves as a tutorial for getting started with the basic functions of EViews.

Uploaded by

Johnson Asiama
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
247 views40 pages

Overview of Eviews

The document provides an overview of using EViews software for econometric analysis. It discusses opening the EViews window, creating a workfile to store data, importing data into EViews from Excel, viewing and plotting data, generating new variables, running simple regressions, and performing regression tests. The document serves as a tutorial for getting started with the basic functions of EViews.

Uploaded by

Johnson Asiama
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

EVIEWS TUTORIALS

Johnson P. Asiama (Dr.)

6/28/2011

Econometric Software
Software packages for econometric analyses:
Autobox - Automatic Box-Jenkins (ARIMA and Transfer Function Modeling) EViews - Econometric Views GAUSS (software) gretl - Gnu Regression, Econometrics and Time-series Library OxMetrics - Ox Based Econometrics PcGive, see OxMetrics RATS - Regression Analysis of Time Series Stata - all purpose package SAS System - all purpose tool TSP - Time Series Processor, econometric package and programming language TSM (Time Series Modeling)
6/28/2011 2

EVIEWS - Getting Started


Eviews window Creating a workfile Importing data View and plot data Run simple regression Performing basic tests Generate new variables Working with Commands
3

6/28/2011

1. Open Eviews Window


Click on the Eviews icon
Main Eviews window:
title bar: at the top, inlcluding menus such as File, Edit, etc. command window: immediately below the title bar. You can execute

commands either by clicking on command buttons or by typing equivalent command into the command window. status line: at the bottom, providing additional information on the status of various settings of the program. work area: between the command window and the status line, where the results of operations will be displayed.

6/28/2011

Eviews Window

6/28/2011

The Main Menu

6/28/2011

The Command Window


Below the menu bar is an area called the command window. EViews commands may be typed in this window. The vertical bar in the command window is called the insertion point. It shows where the letters that you type on the keyboard will be placed.
6/28/2011 7

The Status Line


At the very bottom of the window is a status line which is divided into several sections. The left section will sometimes contain status messages sent to you by EViews. These status messages can be cleared manually by clicking on the box at the far left of the status line
6/28/2011 8

The Work Area


The area in the middle of the window is the work area where EViews will display the various object windows that it creates. Think of these windows as similar to the sheets of paper you might place on your desk as you work. The windows will overlap each other with the foremost window being in focus or active. Only the active window has a darkened titlebar. 9

6/28/2011

2. Creating a Workfile


1)

Workfile: The most important object container in Eviews, which can be used to store data and results. Create a workfile:
Click on the File menu, then on New, and on Workfile In the window appeared:
2)
Choose the type of your data. For example, you can select Dated-regular frequency for time-series data; Input the start and end dates of your data; entering dates June 1997 to September 2010 will be entered as 1997:2 or 2010:3. First quarter of 1999 to June 2006 will be entered as 1999:1 2006:2, etc. Name the workfile (optional). Click OK.
10

3) 4)
6/28/2011

2. Creating a Workfile contd


The workfile now contains two entries: c constant, where Eviews saves the intercept of the regression. resid residuals, where Eviews saves the residuals of last regression You can then import data into this workfile.

6/28/2011

11

2. Creating a Workfile contd


Workfile
Central place to keep all of your work

Objects

6/28/2011

Series (Numeric or Alpha) Equations Graphs Groups

*Always comes with series for a constant, c, and residuals, resid

12

2. Creating a Workfile Contd


Creating a Workfile
File New Workfile

Data Structure
Time Series Dated/Regular Frequency + Date Range Cross-Sectional Undated/Unstructured # of observations Panel Balanced Panel

Save & Name New Pages


By clicking on the New Page label at the bottom of the Workfile you can create new pages
6/28/2011 13

Exercise #1
Open the Excel file Waifemtrial.csv. The file contains data on a number of macroeconomic variables of a country.
Create a new Workfile in Eviews We now want to get the data into Eviews

6/28/2011

14

3. Importing Data
Import from excel file:
Simply copy/cut and paste into EVIEWS, or Open the file, make sure the observations for different variables are arranged in columns, with names on top. Copy the names of the variables, and remember the Upper left data cell (location of first data, i.e., A2), then close the spreadsheet. In main Eviews window, after creating the workfile, click File, Import , then Read Text-Lotus-Excel, and specify the location of data file. In the opened dialog box, fill in the Upper left data cell, then paste the names of the variables, click OK.
6/28/2011 15

3. Importing Data contd


Enter data manually:
click on Quick in the title bar, and then on Empty

Group (Edit Series). Next enter the variables, starting with the name, in the grey box to the immediate right of obs.

Import ASCII data from a textfile:


Make sure the observations for different variables are arranged in columns, with names on top. In the Eviews workfile window, click Procs, and Read Text-Lotus-Excel, then browse for location the text file. In the dialog box, select from a range of input options.

6/28/2011

16

3. Importing Data contd


Edit data: click the Edit+/- button on the series toolbar, move to the observation in question, enter the correct value, and press Enter. Paste data into word file: click freeze, then you can copy and paste. Print data: click Print button. Save data:
Save an entire workfile: click Save in the workfile toolbar,

or click on File and then SaveAs in the main menu. Store individual series: click Store in the workfile toolbar. If you need to retrieve the series, you can simply click on 6/28/2011 Fetch in the workfile toolbar. 17

3. Importing Data
Copy/Paste Method
1. Open new Empty Group
Quick Empty Group Click on Cell 1 and press the Up arrow on keyboard

2. Open Excel
Make sure variable names are one constant String (no spaces!) Troubleshoot for other problems

3. Copy Data 4. Paste into Eviews Cell 1


6/28/2011 18

3. Importing Data
Import Directly
1. Count the number of variables and CLOSE Excel file 2. Proc Import Read Text-Locus-File 3. Browse for Excel file 4.

6/28/2011

19

4. View and Plot Data-1


View data
One variable double click on variable in workfile window, click on view, then spreadsheet; Multiple variables in workfile window, select the name of variables needed, right click and choose open selected/one window/open group

6/28/2011

20

4. View and Plot Data-2


Plot data
One variable double clicking on the name of the variable, then click on View /Graph/Line in the resulting series window. Multiple variables open the variables as a group, then click View /Multiple Graph/Line.

Edit: Right click on the graph or click on Options button to edit.

6/28/2011

21

5. Descriptive Statistics
Group
Stores select series together Object New Object Group Select Series Name

Descriptive Statistics
When group spreadsheet is open: View Descriptive Statistics Common Sample Covariance Correlations

6/28/2011

22

Exercise #2
Create a group of variables
Find the Standard Deviation for each variable Run a correlation matrix of independent variables to determine if you might have multicollinearity (hint: look if off-diagonal absolute values are bigger than 0.5)
6/28/2011 23

6. Generate New Variables


In the workfile window, click Genr button, then specify the new variable using equation formula. Alternatively, in the command line, use command genr to generate new variables. For example, natural logs: genr lcpi=log(cpi) genr loilpq = loilp*loilp lagged variable: genr lprice=price(-1)

6/28/2011

24

7. Run Simple Regression-1


In main Eviews window, click Quick, then Estimate Equation. Alternatively, in Workfile window, click Object, and New Object, then click Equation. Equation Speciation: write down the equation, then choose the method (usually least squares) and sample period.

6/28/2011

25

7. Run Simple Regression-2


Saving equation: using Name Option
Note: If run linear regression, you may just input the name of the variables instead of the whole formula. First is the dependent variable, then write down all independent variables. (e.g: Y c X1 X2 Xk)

6/28/2011

26

7. Run Simple Regression-3


The interpretation of the coefficients: It indicates the effect of a unit change in the relevant variable on the dependent variable, holding all other factors constant (ceteris paribus).
Exporting table of results: Save table using Freeze/Name Open table, select all, then copy and choose formatted, thus paste in word file.
6/28/2011 27

7. Run Simple Regression-4


Test: Click View/Coefficient Tests/Wald-Coefficient Restrictions.
View results in the equation window: Regression output: click View, then Estimation output Residuals: click View, then Actual, Fitted redisual

6/28/2011

28

8. Regression Tests and Fixes


Create a new Equation
In your Workfile: Object New Object Equation
Separated by spaces: *Dependent variable *Constant, c *Independent variables (or Group) Type of Regression

Sample Range
6/28/2011 29

8. Regression Tests & Fixes


Output
To Run Tests
Regression Summary Useful to Create Model Estimate: Modify Regression

This View
Coefficient Summary

SAVE!

Statistics

Name = Save to Workfile


6/28/2011 30

8. Regression Tests & Fixes


Looking at Residuals
In Equation View: View Actual, Fitted, Residual Actual, Fitted, Residual Table

Plotting Resid Vs. Fitted Values


Generate fitted values In Equation View: Forecast OK (is named variablef) In Workfile: Object New Object Graph Graph: resid variablef Options Type Scatter

6/28/2011

31

8. Regression Tests & Fixes8.


Heteroskedasticity
In Equation View: View Residual Tests Heteroskedasticity Tests Choose test Look at Chi-square value from a table

Fix: Click on Estimate


Click on Options check box for Heteroskedasticity consistent coefficient covarariance OK
6/28/2011 32

8. Regression Tests & Fixes


Normality
View Residual Tests Histogram-Normality Test Look at Jarque-Bera stat
Fix: Depending on skew, you can adjust variables (ex: square, log, etc) or add/delete variables

6/28/2011

33

8. Regression Tests & Fixes


Correlation & Multicolinearity
Create Correlation Matrix: Select Group of independent variables View Covariance Analysis
Select Correlations (unselect Covariance)

Off-diagonal values should be less than 0.5 Fix: ?

6/28/2011

34

Exercise #3
Plot fitted values vs. residuals Check for Heteroskedasticity and fix if necessary Check for Multicolinearity Check for Normality

6/28/2011

35

9. Changing/Creating Variables
Edit Mode
In Spreadsheet: Toggle Edit+/- CAREFUL! No undo

Generate new variable


In Workfile: Click on Genr Enter equation: new variable name = equation Regular math function keys 6/28/2011 Lag: variable(-1)

36

10. Commands
Top, Left-Hand Command Box

Single commands Batch (program)

6/28/2011

37

10. Commands
Frequently Used Commands:
show variable genr variable = equation sample n1 n2 n1 and n2 represent the start and end of range Or qualifiers such that: sample variable if >15

Statistical Operations:
equation name .ls(h) dependent c independent variables cor variables group variables
6/28/2011 38

Help!
For general instruction or commands:
EViews PDFs ! Start Programs EViews6

6/28/2011

39

All Done!
Practice, Practice, Practice and Practice!

6/28/2011

40

You might also like