A Short Introduction to Eviews

Starting EViews

Use a mouse to start like any other application. If you cannot find the EViews icon, ask a lab assistant.

Getting Help

Find the User's Guide under the Help menu. It explains all functions of Eviews step-by-step.

The Command and Programming Reference is useful when you want to write batch programs, which you will need to do for your homeworks.

Eviews Philosophy

  • You can access most of the Eviews functionality via menus. This is a good way to explore commands that are new to you.
  • Objects can be copied, saved, cut-and-pasted into other Windows programs, or used for further analysis.
  • A collection of objects can be saved together in a workfile.
Comment:
You cannot mix data series of different frequencies (annual, quarterly, monthly, weekly, daily) within the same work file page.
Comment:
Since Eviews creates new objects with everything you do, it makes sense to delete unimportant intermediate results to avoid a messy workfile.

Workfiles

Opening a workfile

Using menus:
File > Open > EViews Workfile
Using commands:

open <wfname>

Example: open c:temptemp.wf1

Comment:
upon opening the workfile, you will be presented with a table of its objects.

Creating a workfile

Using menus:

File > New > Workfile

If you have annual data from the 1800 until 2012, then

Select: “dated - regular frequency”, frequency “annual”, start date: “1800”, end date “2012”.

Using commands:

new workfile <wfname> <freq> <start> <end>

Example: workfile cpitest a 1800 2012

Comment:
upon creation of the workfile, you will find two series immediately present: c, and resid. (This stands for “coefficients” and “residuals”.) Every time you estimate something, the coefficients are stored in c and the residuals in resid.

Importing Data

We want to input data into series and group objects. (We omit for now any discussion of input into EViews matrix, vector and pool objects.)

In your courses, you are often given your data in a format ready to use with your data analysis program. The “real world” is not so coddling. Often you will get data from a CD or off the web in a format that needs to be "cleaned" before you can use it. Sometimes you will need to enter data from "hard copy" sources.

Your data may be available in a variety of forms:

  • machine readable spreadsheet,
  • a text file that you created yourself or downloaded from the World Wide Web,
  • perhaps even as hardcopy or a graphics file.

There are four basic approaches:

  1. If the data are preformatted for you, you may be able to copy and paste into EViews.
  2. If the data are not quite so well arranged, you may still be able to read them into a modern spreadsheet and then import them into EViews. Recent versions of Excel seem pretty good at importing HTML tables.
  3. You may have to clean up the data with a text editor, and then import it into EViews.
  4. In the worst case, when the data is presented as graphics instead of text or is otherwise difficult to download. If you cannot convert the format (e.g., by OCR), then you will have to copy the data observation by observation.

Entering Data by Hand

For small data sets in printed form, you may wish to enter the data by typing at the keyboard: a time consuming and error prone method of data set creation.

To open a spreadsheet window in which you will enter the data,

  1. declare your series.
  2. create a group of these series.
  3. display the sheet view of this group either by double-clicking the group name or with the sheet command.

For example:

series series1
series series2
series series3
group mygroup series1 series2 series3
mygroup.sheet

To enter the data, click on the appropriate cell and type the number. (You may need to first click the Edit +/- button.) Pressing Enter after entering a number will move you to the next cell. If you prefer, you can use the cursor keys.

Copy and Paste

You can also use the clipboard.

The following discussion involves an example using an Excel spreadsheet, but the basic principles apply to other applications.

Begin in EViews by creating an empty series or empty group, just as we did for data entry by hand. Make sure to set your sample to match the sample of the data you are importing.

Open your spreadsheet. Highlight the cells to be imported into EViews. If there are column headings containing the variable names, highlight them as well. Do not copy the date column unless you need it for some reason. Click and drag across the data you want. You should see this data highlighted. Select Edit/Copy to copy the highlighted data to the clipboard.

Make sure your EViews sample matches the sample for the data you copied, and then paste the new series into an empty series (if it is just one) or an empty group.

Comment:
If you are pasting in the series names, first click on the up arrow in the scroll bar to make room for the series names.)
Comment:
When importing data from the clipboard, EViews follows the Windows standard of tab-delimited free-format data with one observation per line. Since different applications use different whitespace a#d delimiter characters, attempting copy-and-paste from nonstandard applications may produce unanticipated results.

Example

  • Point your browser at http://www.minneapolisfed.org/community_education/teacher/calc/hist1800.cfm
  • copy the data to your clipboard
  • open Eviews, create a new workfile with the right frequency and sample,
  • declare series named, cpidate, cpi, and dlcpi, and make a group from them
  • paste the data into the sheet view of this group. (You may need to click the Edit+/- button before pasting.)

Importing Spreadsheet Files

You can also read data directly from spreadsheet files.

If you are reading data from a multi-sheet Excel workbook file, you can also enter the name of the sheet containing your data. (If you do not enter a name, EViews will read the topmost sheet in the Excel workbook.)

First, you need to tell whether the data are ordered by observation or by series. By observation means that all of the data for the first observation are followed by all of the data For the second observation, etc. By series means that all of the data for the first variable are followed by all data for the second variable, etc. That is, “by observation” means that variables are arranged in columns, while “by row” means that all of the observations for a single variable are in a single row. Next tell EViews the location of the beginning cell (upper left-hand corner) of your actual data, not including any label or date inormation.

Enter the names of the series that you wish to read. EViews reads spreadsheet data in contiguous blocks, so you should provide a name for each column or row (depending on the orientation of the data), even if you only wish to read selected rows.

If the names that you wish to use for your series are contained in the file, you can simply provide the number of series to be read. The names must be adjacent to your data. If the data are organized by row and the starting cell is B2, then the names must be in column A, beginning at cell A2. If the data are organized by column beginning in B2, then the names must be in row 1, starting in cell B1. Finally, you need to tell EViews the sample of data that you wish to import. EViews begins with the first observation in the file and assigns it to the first date in the sample for each variable. Each successive observation in the file is associated with successive observations in the sample. Thus, in an annual workfile, if you enter the sample: 1971 1975 1990 1991 the first 5 observations will be assigned to the dates 1971&ndash;1975, and the sixth and seventh observations will be assigned to the dates 1990&ndash;1991. The data in the intermediate period will be unaffected by the importing procedure. If you read into a sample which has more observations than are present in your input file, observations for which there are no corresponding inputs will be assigned missing value codes.