+ All Categories
Home > Documents > Overview of Eviews

Overview of Eviews

Date post: 28-Nov-2014
Category:
Upload: johnson-asiama
View: 33 times
Download: 0 times
Share this document with a friend
Popular Tags:
40
EVIEWS TUTORIALS Johnson P. Asiama (Dr.) 6/28/2011 1
Transcript
Page 1: Overview of Eviews

EVIEWS TUTORIALS Johnson P. Asiama (Dr.)

6/28/2011 1

Page 2: Overview of Eviews

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

Page 3: Overview of Eviews

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 6/28/2011 3

Page 4: Overview of Eviews

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 4

Page 5: Overview of Eviews

Eviews Window

6/28/2011 5

Page 6: Overview of Eviews

The Main Menu

6/28/2011 6

Page 7: Overview of Eviews

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

Page 8: Overview of Eviews

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

Page 9: Overview of Eviews

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.

6/28/2011 9

Page 10: Overview of Eviews

2. Creating a Workfile • 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: 1) Choose the type of your data. For example, you can select

“Dated-regular frequency” for time-series data; 2) 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.

3) Name the workfile (optional). 4) Click OK.

6/28/2011 10

Page 11: Overview of Eviews

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

Page 12: Overview of Eviews

2. Creating a Workfile contd • Workfile

Central place to keep

all of your work

• Objects

– Series (Numeric or Alpha)

– Equations

– Graphs

– Groups

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

6/28/2011 12

Page 13: Overview of Eviews

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

Page 14: Overview of Eviews

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

Page 15: Overview of Eviews

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

Page 16: Overview of Eviews

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

Page 17: Overview of Eviews

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 Fetch in the workfile toolbar.

6/28/2011 17

Page 18: Overview of Eviews

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

Page 19: Overview of Eviews

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

Page 20: Overview of Eviews

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

Page 21: Overview of Eviews

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

Page 22: Overview of Eviews

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

Page 23: Overview of Eviews

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

Page 24: Overview of Eviews

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

Page 25: Overview of Eviews

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

Page 26: Overview of Eviews

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

Page 27: Overview of Eviews

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

Page 28: Overview of Eviews

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

Page 29: Overview of Eviews

• Create a new Equation

– In your Workfile:

– Object → New Object → Equation

Separated by spaces: *Dependent variable *Constant, c *Independent variables (or Group)

8. Regression Tests and Fixes

Sample Range

Type of Regression

6/28/2011 29

Page 30: Overview of Eviews

• Output

• Name = Save to Workfile

8. Regression Tests & Fixes

Estimate: Modify Regression

This View

Useful to Create Model

To Run Tests

Regression Summary

Coefficient Summary

Statistics

SAVE!

6/28/2011 30

Page 31: Overview of Eviews

• 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 “variable”f)

– In Workfile: Object → New Object → Graph

• Graph: resid “variable”f

• Options → Type → Scatter

8. Regression Tests & Fixes

6/28/2011 31

Page 32: Overview of Eviews

• 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

8. Regression Tests & Fixes8.

6/28/2011 32

Page 33: Overview of Eviews

• 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

8. Regression Tests & Fixes

6/28/2011 33

Page 34: Overview of Eviews

• 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: ?

8. Regression Tests & Fixes

6/28/2011 34

Page 35: Overview of Eviews

Exercise #3

• Plot fitted values vs. residuals

• Check for Heteroskedasticity and fix if necessary

• Check for Multicolinearity

• Check for Normality

6/28/2011 35

Page 36: Overview of Eviews

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

• Lag: variable(-1)

6/28/2011 36

Page 37: Overview of Eviews

10. Commands

• Top, Left-Hand “Command Box”

• Single commands

• Batch (program)

6/28/2011 37

Page 38: Overview of Eviews

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

Page 39: Overview of Eviews

Help!

• For general instruction or commands:

– EViews PDFs !

– Start → Programs → EViews6

6/28/2011 39

Page 40: Overview of Eviews

All Done! Practice, Practice, Practice and Practice!

6/28/2011 40


Recommended