You are on page 1of 124

EViews 5.

1 Update
EViews 5.1 Update
Copyright © 1994–2005 Quantitative Micro Software, LLC
All Rights Reserved
Printed in the United States of America

This software product, including program code and manual, is copyrighted, and all rights
are reserved by Quantitative Micro Software, LLC. The distribution and sale of this product
are intended for the use of the original purchaser only. Except as permitted under the
United States Copyright Act of 1976, no part of this product may be reproduced or distrib-
uted in any form or by any means, or stored in a database or retrieval system, without the
prior written permission of Quantitative Micro Software.

Disclaimer
The authors and Quantitative Micro Software assume no responsibility for any errors that
may appear in this manual or the EViews program. The user assumes all responsibility for
the selection of the program to achieve intended results, and for the installation, use, and
results obtained from the program.

Trademarks
Windows, Windows 95/98/2000/NT/Me/XP, and Microsoft Excel are trademarks of
Microsoft Corporation. PostScript is a trademark of Adobe Corporation. X11.2 and X12-
ARIMA Version 0.2.7 are seasonal adjustment programs developed by the U. S. Census
Bureau. Tramo/Seats is copyright by Agustin Maravall and Victor Gomez. All other product
names mentioned in this manual may be trademarks or registered trademarks of their
respective companies.

Quantitative Micro Software, LLC


4521 Campus Drive, #336, Irvine CA, 92612-2621
Telephone: (949) 856-3368
Fax: (949) 856-2044
e-mail: sales@eviews.com
web: www.eviews.com
March 17, 2005
Table of Contents

EVIEWS 5.1 UPDATE OVERVIEW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1


Overview of EViews 5.1 New Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

CHAPTER 1. EVIEWS 5.1 ENHANCED GRAPH CUSTOMIZATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5


Basic Graph Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Adding and Editing Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Updated Graph Command Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

CHAPTER 2. EVIEWS 5.1 WORKFILE PAGE CREATION TOOLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15


Creating a New Page Using Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Updated Workfile Page Command Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

CHAPTER 3. EVIEWS 5.1 PANEL AND POOL TESTING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21


Omitted Variables Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Redundant Variables Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Fixed Effects Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Hausman Test for Correlated Random Effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Updated Panel and Pool Command Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

CHAPTER 4. EVIEWS 5.1 ECOWIN DATABASE SUPPORT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31


Interactive Graphical Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Tips for Working with EcoWin Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Updated EcoWin Command Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

CHAPTER 5. EVIEWS 5.1 MISCELLANEOUS FEATURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37


Enhanced Copy Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Equation Forecast Coefficient Uncertainty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Additional GARCH Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Global Default for Maximum Number of Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

CHAPTER 6. EVIEWS 5.1 COMMAND REFERENCE UPDATE SUMMARY . . . . . . . . . . . . . . . . . . . . . . . . 41


INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .117
ii— Table of Contents
EViews 5.1 Update Overview

We are very pleased to offer you a free upgrade from EViews 5.0 to EViews 5.1. The
upgrade, which provides several new features and improvements to the existing pro-
gram, is in part a response to user requests, and is in part a collection of features that
were not completed in time for the release of EViews 5.0.

Some of these features, like the enhanced graph customization tools and Enterprise
Edition support for EcoWin online data, represent significant improvements in the set
of tools for working with your data. Other features, such as improved support for cre-
ating workfiles from identifiers, an enhanced copy command, and expanded testing
in panel and pool estimation, are minor improvements to existing routines.

You are now looking at a self-contained PDF document which describes the new fea-
tures in the EViews 5.1 upgrade. Keep in mind that this document is isolated from
your original PDF documents, which, if dated prior to January 2005, will contain
information that is now out-of-date. Updated PDF files for both EViews manuals are
available for download from our website.

Overview of EViews 5.1 New Features


Graph Customization
EViews 5.1 features a greatly expanded set of tools for customizing graphics. These
tools allow for added control over the graph area, frame, and background, font char-
acteristics, axes, grid lines, and more. New default templates provide easy-to-use
examples of graph customization, and can be used as the basis for user template cre-
ation.

Graph Appearance Settings


EViews 5.1 provides control over a wider range of graph appearance characteristics.

• You may now select graph background color, fill color, frame color, and frame
thickness.

• Graph legends, and text object boxes, now feature user-specified fill color,
frame color, and frame thickness.

• Font face, text color, and text style (bold, italic, underline, strikeout) choice has
been extended to all text in graphs, including legend, axes, and text objects.

• Axes options allow for any combination of axes to be displayed with user-spec-
ified line widths.
28— EViews 5.1 Update Overview

• Grid line characteristics (color, width, pattern) may now be specified by the user.

• The data portion of a graph may now be indented horizontally and/or vertically
within the graph frame using user-selected increments.

• The background color in a graph may now be printed and exported with the graph.

Note that full command line support has been provided for all of the above features.

Improved Graph Template Support


Graph templates have been improved so that they control a wider range of appearance set-
tings and are easier to use:

• Template support is provided for all of the new appearance settings.

• EViews now provides a set of predefined templates illustrating the use of basic dis-
play options such as background color, fill color, line/bar coloring, graph size, and
grid line settings. The predefined templates, which include “Classic” (classic
EViews), “Modern”, “Reverse”, “Midnight”, “Spartan”, and “Monochrome”, may be
used as-is to modify the appearance of graphs, or may serve as the basis for further
customization or template creation.

• Templates may now be applied to an existing graph via the main graph dialog, and
may also be used to update graph defaults.

Enhanced Graphics Defaults


Major improvements in the setting and handling of graph defaults allow you to control the
appearance of newly created graphs:

• Global defaults have been extended to support all of the new appearance settings.

• Both global and individual graph object defaults may be updated using templates.

• Individual defaults allow you to specify the settings for new text, line, and shade
objects added to an existing graph object. For text, you may specify font options
(font name, size, style, and color), and the fill and frame color to be used when the
text is enclosed in a box. For lines or shades, you may specify color, width, and pat-
tern.

Simply customize the appearance of a single graph, then instantly update your defaults so
that new graphs will take on the desired appearance. Or, update the text and shade
defaults in an existing graph, and subsequent new text and shade objects will use those
settings.
Overview of EViews 5.1 New Features—29

Tools for Creating Workfile Pages from Identifiers


EViews 5 provides basic tools for creating a new workfile page from the unique values of
one or more identifier series in a given workfile page. EViews 5.1 extends these tools to
work with identifier series located in multiple pages, allowing you easily to create new
pages structured using the values found in series or to form pages by crossing the unique
values from two identifier series, or by crossing the unique values from a single identifier
series with a date frequency and range.

You may use these tools to create a new workfile page from: (1) the union of unique ID
values from one more more pages; (2) the intersection of unique ID values from mulitple
pages; (3) the cross of the unique values of two ID series, or (4) the cross of a single ID
series with a date range.

Panel and Pool Equation Specification Testing


EViews 5.1 provides upgraded support for specification testing in panel or pool equations
estimation. The following tests have been added in the EViews 5.1 upgrade:

• LR-type testing for omitted or redundant regressors in panel and pool equations
specified by list. The omitted variable test enables you to add a set of variables to an
existing panel or pool equation, and to ask whether the set makes a significant con-
tribution to explaining the variation in the dependent variable. The redundant vari-
ables test allows you to test for the statistical significance of a subset of the variables
included in your panel or pool equation.

• Redundant fixed effects testing for panel and pool equations estimated by ordinary
linear and nonlinear least squares evaluates the statistical significance of the esti-
mated fixed effects.

• Hausman random effects testing evaluates the restriction that the random effects are
uncorrelated with the explanatory variables. The test statistic evaluates the close-
ness of the coefficients from a random effects pool equation to the corresponding
fixed effects specification.

EcoWin Database Support


EViews 5.1 Enterprise Edition now supports direct access to on-line EcoWin databases
(www.ecowin.com). The EcoWin Economic and Financial databases contain global inter-
national macroeconomic and financial data from more than 100 countries and multina-
tional aggregates. Additional databases provide access to equities information and detailed
country-specific information on earnings estimates, equities, funds, fixed income, and
macroeconomics.

The EViews EcoWin interface provides the following features:


30— EViews 5.1 Update Overview

• An interactive graphical window attached to an EcoWin database allowing for


browsing of series in the database, selection of series, and copying/exporting of
series into an EViews workfile or another EViews database.

• A set of commands to perform tasks such as fetching a particular series by mne-


monic from a selected EcoWin database. These tools may be used interactively or
within EViews user-written programs.

EcoWin support is provided through the addition of an EcoWin database type to the list of
databases supported by EViews. Since access to EcoWin data is provided using standard
EViews database tools, most of the user interface to EcoWin data will be familiar to
EViews users.

Miscellaneous
Other features added in EViews 5.1 include:

• The copy command has been enhanced, and now supports copying objects between
named workiles and workfile pages. If copying series into a workfile page, EViews
allows for automatic frequency conversion and match merging of the data in the
series to the new workfile page frequency or structure.

• An equation forecast option allows you to ignore coefficient uncertainty when com-
puting the forecast standard error.

• ARCH equations now allow you to calculate conditional variances as well as condi-
tional standard deviations. In addition, you may now display and save the perma-
nent component of the GARCH conditional variances in component models.

• A new global option allows you to set the default maximum number of errors in pro-
gram execution.

• The @cbvnorm and @dbvnorm functions have been added, allowing you to evaluate
the cumultative distribution function and density function of the standardized
bivariate normal distribution.
Chapter 1. EViews 5.1 Enhanced Graph Customization

EViews 5.1 features a greatly expanded set of tools for customizing graphics. These
tools allow for added control over the graph area, frame, and background, font char-
acteristics, axes, grid lines, and more. New default templates provide easy-to-use
examples of graph customization, and can be used as the basis for user template cre-
ation.

The following discussion documents the use of the graph options dialog for customiz-
ing your graph. While the framework of the documentation follows the EViews 5
User’s Guide, there have been significant changes reflecting the new EViews 5.1 fea-
tures.

All of the features described below may be accessed through the main graph options
dialog. The main options dialog may be opened by clicking on the graph object or a
graph view and selecting Options... from the right mouse menu. You may also double
click anywhere in the graph window to bring up the Graph Options tabbed dialog. If
you double-click on an applicable graph element (the legend, axes, etc.), the dialog
will open to the appropriate tab.

Basic Graph Characteristics


Underlying Graph
Attributes
The Frame tab controls
basic display characteris-
tics of the graph, includ-
ing color usage, framing
style, indent position,
grid lines.

You can also use this tab


to control the aspect ratio
of your graph using the
predefined ratios, or you
can input a custom set of
dimensions. Note that
the values are displayed
in “virtual inches”.
34—Chapter 1. EViews 5.1 Enhanced Graph Customization

Bear in mind that if have previously added text in the graph with user specified (absolute)
position, changing the graph frame size may change the relative position of the text in the
graph.

To change or edit axes, select


the Axes & Scaling tab.
Depending on its type, a graph
can have up to four axes: left,
bottom, right, and top. Each
series is assigned an axis as
displayed in the upper right
listbox.

You may change the assigned


axis by first highlighting the
series and then clicking on
one of the available axis but-
tons. For example, to plot sev-
eral series with a common
scale, you should assign all
series to the same axis. To plot
two series with a dual left-right scale, assign different axes to the two series.

To edit characteristics of an axis, select the desired axis from the drop down menu at the
top of the dialog; the left/right axes may be customized for all graphs. For the Time/
Observation Plot type, you may edit the bottom axis to control how the dates/observa-
tions are labeled. Alternately, for XY graphs, the bottom/top axes may be edited to control
the appearance of the data scale.

To edit the graph legend characteristics, select the Legend tab. Note that if you place the
legend using user specified (absolute) positions, the relative position of the legend may
change when you change the graph frame size.

Data Display Attributes (Lines, Symbols, Filled Areas)


The Lines/Symbols tab provides you with control over the drawing of all lines and sym-
bols corresponding to the data in your graph.
Basic Graph Characteristics—35

You may choose to display


lines, symbols, or both, and
you can customize the color,
width, pattern, and symbol
usage. See “Use of color with
lines and filled areas” in the
Command and Programming
Reference.

The current line and symbol


settings will be displayed in the
listbox on the right hand side
of the dialog. Once you make
your choices, click on Apply to
see the effect of the new set-
tings.

The Filled Areas tab allows


you to control the display characteristics of your area, bar, or pie graph. Here, you may
customize the color, shading, and labeling of the graph elements.

Added Text, Line, and Shade Attribute Defaults


The Objects tab allows you to
control the default characteris-
tics of new text, shade, or line
drawing objects later added to
the graph (see “Adding and
Editing Text” on page 36 and
“Adding Lines and Shades” on
page 38).

You may select colors for the


shade, line, box, or text box
frame, as well as line patterns
and widths, and text fonts and
font characteristics.

By default, when you apply


these changes to the graph
object options, EViews will
update the default settings in the graph, and will use these settings when creating new
line, shade, or text objects. Any existing lines, shades or text in the graph will not be
36—Chapter 1. EViews 5.1 Enhanced Graph Customization

updated. If you wish to modify the existing to use the new settings, you must check the
Apply to existing line/shade objects and Apply to existing text objects boxes prior to
clicking on the Apply button.

Adding and Editing Text


You can customize a graph by adding one or more lines of text anywhere in the graph. This
can be useful for labeling a particular observation or period, or for adding titles or remarks
to the graph. To add new text, simply click on the AddText button in the toolbar or select
Proc/Add text…

To modify an existing text object, simply dou-


ble click on the object. The Text Labels dia-
log will be displayed.

Enter the text you wish to display in the large


edit field. Spacing and capitalization (upper
and lower case letters) will be preserved. If
you want to enter more than one line, press
the Enter key after each line.

• The Justification options determine


how multiple lines will be aligned rela-
tive to each other.

• Font allows you to select the font and


font characteristics for the text.

• Text in Box encloses the text in a box.

• Box fill color controls the color of the area inside the text box.

• Frame color controls the color of the frame of the text box.

The first four options in Position place the text at the indicated (relative) position outside
the graph. You can also place the text by specifying its coordinates. Coordinates are set in
virtual inches, with the origin at the upper left-hand corner of the graph.
Adding and Editing Text—37

The X-axis position


increases as you move to the
right of the origin, while the
Y-axis increases as you move
down from the origin. The
default sizes, which are
expressed in virtual inches,
are taken from the global
options, with the exception
of scatter diagrams always
default to 3 × 3 virtual
inches.

Consider, for example, a


graph with a size of 4 × 3
virtual inches. For this
graph, the X=4, Y=3 posi-
tion refers to the lower right
hand corner of the graph. Labels will be placed with the upper left-hand corner of the
enclosing box at the specified coordinate.

You can change the position of text added to the graph by selecting the text box and drag-
ging it to the position you choose. After dragging to the desired position, you may double
click on the text to bring up the Text Labels dialog to check the coordinates of that posi-
tion or to make changes to the text. Note that if you specify the text position using coordi-
nates, the relative position of the text may change when you change the graph frame size.

Adding Lines and Shades


You may draw lines or add a shaded area to the graph. From a graph object, click on the
Lines/Shade button in the toolbar or select Proc/Add shading…. The Lines & Shading
dialog will appear.
38—Chapter 1. EViews 5.1 Enhanced Graph Customization

Select whether you want to draw a line or add


a shaded area, and enter the appropriate infor-
mation to position the line or shaded area hori-
zontally or vertically. If you select Vertical,
EViews will prompt you to position the line or
shaded area at a given observation. If you
select Horizontal, you must provide a data
value at which to draw the line or shaded area.

You should also use this dialog to choose a line


pattern, width, and color for the line or shaded
area, using the drop down menus.

If you check the Apply color... checkbox, EViews will update all of the existing lines or
shades of the specified type in the graph.

To modify a single existing line or shaded area, simply double click on it to bring up the
dialog.

Graph Templates
Having put a lot of effort into getting a graph to look just the way you want it, you may
want to use the same options in another graph. EViews allows you to use any named graph
as a template for a new or existing graph. You may think of a template as a graph style that
can be applied to other graphs.

In addition, EViews provides a set of predefined templates that you may use to customize
the graph. These predefined templates are not associated with objects in the workfile, and
you are always available. The EViews templates provide easy-to-use examples of graph
customization that may be applied to any graph. You may also find it useful to use the pre-
defined templates as a foundation for your own graph template creation.
Adding and Editing Text—39

To update a graph using a tem-


plate, double click on the
graph area to display the
Graph Options dialog, and
click on the Template tab.
Alternatively, you may right
mouse click, and select Tem-
plate... to open the desired tab
of the dialog.

On the left-hand side of the


dialog you will first select your
template. The upper list box
contains a list of the EViews
predefined templates. The
lower list box contains a list of
all of the named graphs in the
current workfile page. Here,
we have selected the graph object GRAPH01 for use as our graph template.

If instead, you select one of the predefined templates, you will be given the choice of
applying the Bold or Wide modifiers to the base template. As the name suggests, the Bold
modifier changes the settings in the template so that lines and symbols are bolder (thicker,
and larger) and adjusts other characteristics of the graph, such as the frame, to match. The
Wide modifier changes the aspect ratio of the graph so that the horizontal to vertical ratio
is increased.

You may reset the dialog by clicking on the Undo Edits button prior to clicking on Apply.
When you click on the Apply button, EViews will immediately update all of the basic
graph settings described in “Basic Graph Characteristics” on page 34, including graph size
and aspect ratio, frame color and width, graph background color, grid line options, and
line, symbol, and filled area settings. Once applied, these changes cannot be undone auto-
matically.

In contrast to the basic graph settings which are always updated when you click on Apply,
the impact on the characteristics of existing text, line, and shade objects in the graph
(“Added Text, Line, and Shade Attribute Defaults” on page 36) is controlled by the choices
on the right-hand side of the dialog. There are three possibilities:

• Keep old settings – instructs EViews to use the text, line, and shade attributes in the
template or template graph only for the purpose of updating the default settings in
the graph. If you select this option and select Apply, subsequently added text, line,
40—Chapter 1. EViews 5.1 Enhanced Graph Customization

and shades will use the updated settings, but existing objects will retain their exist-
ing characterisitcs.

• Apply template settings to existing text & line/shade objects – will update both
the settings for existing text, line, and shade objects, and the defaults used for newly
added objects.

• Replace text & line/shade objects with those of the template graph – will first
remove any added text label, line, or shading objects in the existing graph, and then
copy to the graph any such objects in the template.

Updated Graph Command Summary


The following commands have been updated or added to support the new graph features
of EViews 5.1:

• addtext (p. 70)

• area (p. 73)

• axis (p. 75)

• bar (p. 77)

• draw (p. 87)

• drawdefault (p. 89)

• errbar (p. 91)

• hilo (p. 99)

• legend (p. 102)

• line (p. 104)

• options (p. 117)

• pie (p. 120)

• scat (p. 123)

• setelem (p. 126)

• spike (p. 130)

• template (p. 132)

• textdefault (p. 136)

• xy (p. 137)

• xyline (p. 140)


Updated Graph Command Summary—41

• xypair (p. 143)


42—Chapter 1. EViews 5.1 Enhanced Graph Customization
Chapter 2. EViews 5.1 Workfile Page Creation Tools

EViews 5.0 provides basic tools for creating a new workfile page from the unique val-
ues of one or more identifier series in a given workfile page. EViews 5.1 extends these
features in two distinct ways. First, EViews 5.1 extends these tools to work with iden-
tifier series located in multiple pages, allowing you easily to create new pages struc-
tured using the values found in series. Second, EViews 5.1 allows you to form pages
by crossing the unique values from two identifier series, or by crossing the unique
values from a single identifier series with a date frequency and range.

The following discussion describes the use of EViews tools for creating new workfile
pages using identifier series.

Creating a New Page Using Identifiers


To create a new workfile page using identifier series, click on the New Page tab in the
workfile window and select Specify by Identifier Series... EViews will open a dialog
for creating a new page using one or more identifier series.

At the top of the dialog is a combo box


labeled Method that you may use to select
between the various ways of using identifiers
to specify a new page. You may choose
between creating the page using: (1) the unique ID values from the current workfile
page, (2) the union of unique ID values from multiple pages, (3) the intersection of
unique ID values from mulitple pages, (4) and (5) the cross of the unique values of
two ID series, (6) the cross of a single ID series with a date range.

As you change the selected method, the dialog will change to provide you with differ-
ent options for specifying identifiers.

Unique values of ID series from one page


The easiest way to create a new page from identifiers is to use the unique values in
one or more series in the current workfile page.

If you select Unique values of ID series from one page in the Method combo,
EViews will prompt you for one or more identifier series which you should enter in
the Cross-section ID series and Date series edit fields.
44—Chapter 2. EViews 5.1 Workfile Page Creation Tools

EViews will take the set of series


and will identify the unique values
in the specified Sample. Note that
when multiple identifiers are speci-
fied, the unique values are defined
over the values in the set of ID
series, not over each individual
series.

The new page will contain identifier


series containing the unique values,
and EViews will structure the work-
file using this information. If Date
ID series were provided in the origi-
nal dialog, EViews will restructure the result as a dated workfile page.

Suppose, for example, that we begin


with a workfile page UNDATED that
contains 471 observations on 157
firms observed for 3 years. There is
a series FCODE identifying the firm,
and a series YEAR representing the
year.

We first wish to create a new work-


file page containing 157 observa-
tions representing the unique values
of FCODE. Simply enter FCODE in
the Cross-section ID series, set the
sample to “@ALL”, name the new
page “UNDATED1”, and click on OK.

EViews will create a new structured (undated - with identifier series) workfile page
UNDATED1 containing 157 observations. The new page will contain a series FCODE with
the 157 unique values found in the original series FCODE, and the workfile will be struc-
tured using this series.
Creating a New Page Using Identifiers—45

Similarly, we may choose to


create a new page using the
series YEAR, which identifies
the year that the firm was
observed. There are three
distinct values for YEAR in
the original workfile page
(“1987”, “1988”, “1989”).
Click on the Click on the
New Page tab and select
Specify by Identifier
Series... from the menu, and
Unique values of ID series
from one page in the
Method combo. Enter
“YEAR” in the Date ID series field, and click on OK to create a new annual page with
range 1987–1989. Note that EViews will structures the result as a dated workfile page.

Union of common ID series from multiple pages


In some cases, you may wish to create your new page using unique ID values taken from
more than one workfile page.

If you select Union of commmon ID series from multiple pages, EViews will find, for
each source page, a set of unique ID values, and will create the new workfile page using
the union of these values. Simply enter the list of identifiers in the Cross-section ID series
and Date series and edit fields, and a list of pages in which the common identifiers may be
found. When you click on OK, EViews will first make certain that each of the identifier
series is found in each page, then will create the new workfile page using the union of the
observed ID values.

We may extend our earlier example where there are three distinct values for YEAR in the
original page (“1987”, “1988”, “1989”). To make things more interesting, suppose there is
a second page in the workfile, ANNUAL, containing annual data for the years 1985–1988
and that this page contains also contains a series YEAR with those values (“1985”, “1986”,
“1987”, “1988”).

Since we want to exploit the fact that YEAR contains date information, we create a page
using the union of IDs by selecting Union of common ID series from multiple pages,
entering YEAR in the Date series field, and then entering “UNDATED” and “ANNUAL” in
the page field. When you click on OK, EViews will create a 5 observation, regular annual
frequency workfile page for 1987–1989, formed by taking the union of the unique values in
the YEAR series in the UNDATED panel page, and the YEAR series in the ANNUAL page.
46—Chapter 2. EViews 5.1 Workfile Page Creation Tools

Intersection of common ID series from multiple pages


In other cases, you may wish to create your new page using common unique ID values
taken from more than one workfile page. If you select Intersection of commmon ID series
from multiple pages, EViews willtake the specified set of series and will identify the
unique values in the specified Sample. The intersection of these sets of unique values
across the pages will then be used to create a new workfile page.

In our extended YEAR example, we


have two pages: UNDATED, with
471 observations and 3 distinct
YEAR values (“1987”, “1988”, and
“1989”); and the ANNUAL workfile
page containing annual data for four
years from 1985–1988, with corre-
sponding values for the series
YEAR.

Suppose that we enter YEAR in the


Date ID field, and tell EViews to
examine the intersection of values in
the Multiple pages UNDATED and
ANNUAL. EViews will create a new workfile page containing the intersection of the unique
values of the YEAR series across pages (“1987”, “1988”). Since YEAR was specified as a
date ID, the page will be structured as a dated annual page.

Cross of two ID series


There are two choices if you wish to create a page by taking the cross of the unique values
from two ID series: Cross of two non-date ID series creates an undated panel page using
the unique values of the two identifiers, while Cross of one date and one non-date ID
series uses the additional specification of a date ID to allow for the structuring of a dated
panel page.

Suppose for example, that you wish to create a page by crossing the 187 unique FCODE
values in the UNDATED page with the 4 unique YEAR values in the ANNUAL page
(“1985”, “1986”, “1987”, “1988”). Since the YEAR values may be used to create a dated
panel, we select Cross of one date and one non-date ID from our Method combo.
Creating a New Page Using Identifiers—47

Since we wish to use YEAR to date


structure our result, we enter
“FCODE” and “UNDATED” in the
Cross ID series and Cross page
fields, and we enter “YEAR” and
“ANNUAL” in the Date ID series
and Date page fields.

When you click on OK, EViews will


create a new page by crossing the
unique values of the two ID series.
The resulting workfile will be an
annual dated panel for 1985–1988,
with FCODE as the cross-section
identifer.

It is worth noting that had we had entered the same information in the Cross of two non-
date ID dialog, the result would be an undated panel with two identifier series.

Cross of ID Series with a date range


In our example of crossing a date ID series with a non-date ID, we were fortunate to have
an annual page to use in construting the date ID. In some cases, the dated page may not be
immediately available, and will have to be created prior to performing the crossing opera-
tion.

In cases where the page is not available, but where we wish to cross our non-date ID series
with a regular frequency range, we may skip the intermediate page creation by selecting
the Cross of ID series with a date range method.

Here, instead of specifying a date ID


series and page, we need only spec-
ify a page frequency, start, and end
dates. In this example, the resulting
annual panel page is identical to the
page specified by crossing FCODE
with the YEAR series from the
ANNUAL page.

While specifying a frequency and


range is more convenient than spec-
ifying a date ID and page, this
method is obviously more restrictive
48—Chapter 2. EViews 5.1 Workfile Page Creation Tools

since it does not allow for irregular dated data. In these latter cases, you must explicitly
specify your date ID series and page.

Updated Workfile Page Command Summary


The following commands have been updated to support the new workfile page creation
features of EViews 5.1:

• linkto (p. 106)

• pagecreate (p. 113)


Chapter 3. EViews 5.1 Panel and Pool Testing

EViews 5.1 updates panel and pool equations to provide built-in support for testing
the statistical significance of omitted and redundant variables, testing the significance
of estimated fixed effects in least squares estimation, and performing Hausman spec-
ification tests for correlated effects in a random effects setting.

The following discussion documents the new features.

Omitted Variables Test


You may perform an F-test of the joint significance of variables that are presently
omitted from a panel or pool equation estimated by list. Select View/Coefficient
Tests/Omitted Variables - Likelihood Ratio... and in the resulting dialog, enter the
names of the variables you wish to add to the default specification. If estimating in a
pool setting, you should enter the desired pool or ordinary series in the appropriate
edit box (common, cross-section specific, period specific).

When you click on OK, EViews will first estimate the unrestricted specification, then
form the usual F-test, and will display both the test results as well as the results from
the unrestricted specification in the equation or pool window.

Adapting Example 10.6 from Wooldridge (2002, p. 282) slightly, we may first estimate
a pooled sample equation for a model of the effect of job training grants on LSCRAP
using first differencing. The restricted set of explanatory variables includes a constant
and D89. The results from the restricted estimator are given by:
50—Chapter 3. EViews 5.1 Panel and Pool Testing

Dependent Variable: D(LSCRAP)


Method: Panel Least Squares
Date: 11/24/04 Time: 09:15
Sample (adjusted): 1988 1989
Cross-sections included: 54
Total panel (balanced) observations: 108

Variable Coefficient Std. Error t-Statistic Prob.

C -0.168993 0.078872 -2.142622 0.0344


D89 -0.104279 0.111542 -0.934881 0.3520

R-squared 0.008178 Mean dependent var -0.221132


Adjusted R-squared -0.001179 S.D. dependent var 0.579248
S.E. of regression 0.579589 Akaike info criterion 1.765351
Sum squared resid 35.60793 Schwarz criterion 1.815020
Log likelihood -93.32896 F-statistic 0.874003
Durbin-Watson stat 1.445487 Prob(F-statistic) 0.351974

We wish to test the significance of the first differences of the omitted job training grant
variables GRANT and GRANT_1. Click on View/Coefficient Tests/Omitted Variables -
Likelihood Ratio... and type “D(GRANT)” and “D(GRANT_1)” to enter the two variables
in differences. Click on OK to display the omitted variables test results.

The top portion of the results contains a brief description of the test, the test statistic val-
ues, and the associated significance levels:

Omitted Variables: D(GRANT) D(GRANT_1)

F-statistic 1.529525 Prob. F(2,104) 0.221471


Log likelihood ratio 3.130883 Prob. Chi-Square(2) 0.208996

Here, the test statistics do not reject, at conventional significance levels, the null hypothe-
sis that D(GRANT) and D(GRANT_1) are jointly irrelevant.

The bottom portion of the results shows the test equation which estimates under the unre-
stricted alternative:
Redundant Variables Test—51

Test Equation:
Dependent Variable: D(LSCRAP)
Method: Panel Least Squares
Date: 11/24/04 Time: 09:52
Sample: 1988 1989
Cross-sections included: 54
Total panel (balanced) observations: 108

Variable Coefficient Std. Error t-Statistic Prob.

C -0.090607 0.090970 -0.996017 0.3216


D89 -0.096208 0.125447 -0.766923 0.4449
D(GRANT) -0.222781 0.130742 -1.703970 0.0914
D(GRANT_1) -0.351246 0.235085 -1.494124 0.1382

R-squared 0.036518 Mean dependent var -0.221132


Adjusted R-squared 0.008725 S.D. dependent var 0.579248
S.E. of regression 0.576716 Akaike info criterion 1.773399
Sum squared resid 34.59049 Schwarz criterion 1.872737
Log likelihood -91.76352 F-statistic 1.313929
Durbin-Watson stat 1.498132 Prob(F-statistic) 0.273884

Note that if appropriate, the alternative specification will be estimated using the cross-sec-
tion or period GLS weights obtained from the restricted specification. If these weights were
not saved with the restricted specification and are not available, you may first be asked to
reestimate the original specification.

Redundant Variables Test


You may perform an F-test of the joint significance of variables that are presently included
in a panel or pool equation estimated by list. Select View/Coefficient Tests/Redundant
Variables - Likelihood Ratio... and in the resulting dialog, enter the names of the vari-
ables in the current specification that you wish to remove in the restricted model.

When you click on OK, EViews will estimate the restricted specification, form the usual F-
test, and will display the test results and restricted estimates. Note that if appropriate, the
alternative specification will be estimated using the cross-section or period GLS weights
obtained from the unrestricted specification. If these weights were not saved with the spec-
ification and are not available, you may first be asked to reestimate the original specifica-
tion.

To illustrate the redundant variables test, consider Example 10.4 from Wooldridge (2002, p.
262), where we test for the redundancy of GRANT and GRANT_1 in a specification esti-
mated with cross-section random effects. The top portion of the unrestricted specification
is given by:
52—Chapter 3. EViews 5.1 Panel and Pool Testing

Dependent Variable: LSCRAP


Method: Panel EGLS (Cross-section random effects)
Date: 11/24/04 Time: 11:25
Sample: 1987 1989
Cross-sections included: 54
Total panel (balanced) observations: 162
Swamy and Arora estimator of component variances

Variable Coefficient Std. Error t-Statistic Prob.

C 0.414833 0.242965 1.707379 0.0897


D88 -0.093452 0.108946 -0.857779 0.3923
D89 -0.269834 0.131397 -2.053577 0.0417
UNION 0.547802 0.409837 1.336635 0.1833
GRANT -0.214696 0.147500 -1.455565 0.1475
GRANT_1 -0.377070 0.204957 -1.839747 0.0677

Effects Specification
S.D. Rho

Cross-section random 1.390029 0.8863


Idiosyncratic random 0.497744 0.1137

Note in particular that our unrestricted model is a random effects specification using
Swamy and Arora estimators for the component variances, and that the estimates of the
cross-section and idiosyncratic random effects standard deviations are 1.390 and 0.4978,
respectively.

If we select the redundant variables test, and perform a joint test on GRANT and
GRANT_1, EViews displays the test results in the top of the results window:

Redundant Variables: GRANT GRANT_1

F-statistic 1.832264 Prob. F(2,156) 0.163478

Here we see that the statistic value of 1.832 does not lead us to reject, at conventional sig-
nificant levels, the null hypothesis that GRANT and GRANT_1 are redundant in the unre-
stricted specification.

The restricted test equation results are depicted in the bottom portion of the window. Here
we see the top portion of the results for the restricted equation:
Fixed Effects Testing—53

Test Equation:
Dependent Variable: LSCRAP
Method: Panel EGLS (Cross-section random effects)
Date: 11/24/04 Time: 11:31
Sample: 1987 1989
Cross-sections included: 54
Total panel (balanced) observations: 162
Use pre-specified random component estimates
Swamy and Arora estimator of component variances

Variable Coefficient Std. Error t-Statistic Prob.

C 0.419327 0.073162 5.731525 0.0000


D88 -0.168993 0.095791 -1.764187 0.0796
D89 -0.442265 0.095791 -4.616981 0.0000
UNION 0.534321 0.082957 6.440911 0.0000

Effects Specification
S.D. Rho

Cross-section random 1.390029 0.8863


Idiosyncratic random 0.497744 0.1137

The first thing to note is that the restricted specification removes the test variables GRANT
and GRANT_1. Note further that the output indicates that we are using existing estimates
of the random component variances (“Use pre-specified random component estimates”),
and that the displayed results for the effects match those for the unrestricted specification.

Fixed Effects Testing


EViews 5.1 provides built-in tools for testing the joint significance of the fixed effects esti-
mates in least squares specifications. To test the significance of your effects you must first
estimate the unrestricted specification that includes the effects of interest. Next, select
View/Fixed/Random Effects Testing/Redundant Fixed Effects – Likelihood Ratio.
EViews will estimate the appropriate restricted specifications, and will display the test out-
put as well as the results for the restricted specifications.

Note that where the unrestricted specification is a two-way fixed effects estimator, EViews
will test the joint significance of all of the effects as well as the joint significance of the
cross-section effects and the period effects separately.

Let us consider Example 3.6.2 in Baltagi (2001), in which we estimate a two-way fixed
effects model. The results for the unrestricted estimated gasoline demand equation are
given by:
54—Chapter 3. EViews 5.1 Panel and Pool Testing

Dependent Variable: LGASPCAR


Method: Panel Least Squares
Date: 11/24/04 Time: 11:57
Sample: 1960 1978
Cross-sections included: 18
Total panel (balanced) observations: 342

Variable Coefficient Std. Error t-Statistic Prob.

C -0.855103 0.385169 -2.220073 0.0272


LINCOMEP 0.051369 0.091386 0.562103 0.5745
LRPMG -0.192850 0.042860 -4.499545 0.0000
LCARPCAP -0.593448 0.027669 -21.44787 0.0000

Effects Specification

Cross-section fixed (dummy variables)


Period fixed (dummy variables)

R-squared 0.980564 Mean dependent var 4.296242


Adjusted R-squared 0.978126 S.D. dependent var 0.548907
S.E. of regression 0.081183 Akaike info criterion -2.077237
Sum squared resid 1.996961 Schwarz criterion -1.639934
Log likelihood 394.2075 F-statistic 402.2697
Durbin-Watson stat 0.348394 Prob(F-statistic) 0.000000

Note that the specification has both cross-section and period fixed effects. When you select
the fixed effect test from the equation menu, EViews estimates three restricted specifica-
tions: one with period fixed effects only, one with cross-section fixed effects only, and one
with only a common intercept. The test results are displayed at the top of the results win-
dow:

Redundant Fixed Effects Tests


Equation: Untitled
Test cross-section and period fixed effects

Effects Test Statistic d.f. Prob.

Cross-section F 113.351303 (17,303) 0.0000


Cross-section Chi-square 682.635958 17 0.0000
Period F 6.233849 (18,303) 0.0000
Period Chi-square 107.747064 18 0.0000
Cross-Section/Period F 55.955615 (35,303) 0.0000
Cross-Section/Period Chi-square 687.429282 35 0.0000
Hausman Test for Correlated Random Effects—55

Notice that there are three sets of tests. The first set consists of two tests that evaluate the
joint significance of the cross-section effects using sums-of-squares (F-test) and the likeli-
hod function (Chi-square test). The corresponding restricted specification is one in which
there are period effects only. The two statistic values (113.35 and 682.64) and the associ-
ated p-values strongly reject the null that the effects are redundant.

The remaining results evaluate the joint significance of the period effects, and of all of the
effects, respectively. All of the results suggest that the corresponding effects are statistically
significant.

Below the test statistic results, EViews displays the results for the test equations. In this
example, there are three distinct restricted equations so EViews shows three sets of esti-
mates.

Lastly, note that this test statistic is not currently available for instrumental variables and
GMM specifications.

Hausman Test for Correlated Random Effects


A central assumption in random effects estimation is the assumption that the random
effects are uncorrelated with the explanatory variables. One common method for testing
this assumption is to employ a Hausman (1978) test to compare the fixed and random
effects estimates of coefficients (for discussion see, for example Wooldridge (2002, p. 288),
and Baltagi (2001, p. 65)).

To perform the Hausman test, you must first estimate a model with your random effects
specification. Next, select View/Fixed/Random Effects Testing/Correlated Random
Effects - Hausman Test. EViews will automatically estimate the corresponding fixed effects
specifications, compute the test statistics, and display the results and auxiliary equations.

For example, Baltagi (2001) considers an example of Hausman testing (Example 1, p. 69),
in which the results for a Swamy-Arora random effects estimator for the Grunfeld data are
compared with those obtained from the corresponding fixed effects estimator. To perform
this test in EViews 5.1, we first estimate the random effects estimator, obtaining the
results:
56—Chapter 3. EViews 5.1 Panel and Pool Testing

Dependent Variable: I
Method: Panel EGLS (Cross-section random effects)
Date: 11/24/04 Time: 12:45
Sample: 1935 1954
Cross-sections included: 10
Total panel (balanced) observations: 200
Swamy and Arora estimator of component variances

Variable Coefficient Std. Error t-Statistic Prob.

C -57.83441 28.88930 -2.001932 0.0467


F 0.109781 0.010489 10.46615 0.0000
K 0.308113 0.017175 17.93989 0.0000

Effects Specification
S.D. Rho

Cross-section random 84.20095 0.7180


Idiosyncratic random 52.76797 0.2820

Next we select the Hausman test from the equation menu by clicking on View/Fixed/Ran-
dom Effects Testing/Hausman Test of Random vs. Fixed. EViews estimates the corre-
sponding fixed effects estimator, evaluates the test, and displays the results in the equation
window. If the original specification is a two-way random effects model, EViews will test
the two sets of effects separately as well as jointly.

There are three parts to the output. The top portion describes the test statistic and provides
a summary of the results. Here we have:

Hausman Specification Test (Random vs. Fixed Effects)


Equation: EQ263
Test for correlated cross-section random effects

Chi-Sq.
Test Summary Statistic Chi-Sq. d.f. Prob.

Cross-section random 2.131366 2 0.3445

The statistic provide little evidence against the null hypothesis that there is no misspecifi-
cation.

The next portion of output provides additional test detail, showing the coefficient esti-
mates from both the random and fixed effects estimators, along with the variance of the
difference and associated p-values for the hypothesis that there is no difference. Note that
in some cases, the estimated variances can be negative so that the probabilities cannot be
computed.
Updated Panel and Pool Command Summary—57

Cross-section random effects test comparisons:

Variable Fixed Random Var(Diff.) Prob.

F 0.110124 0.109781 0.000031 0.9506


K 0.310065 0.308113 0.000006 0.4332

The bottom portion of the output contains the results from the corresponding fixed effects
estimation:

Cross-section random effects test equation:


Dependent Variable: I
Method: Panel Least Squares
Date: 11/24/04 Time: 12:51
Sample: 1935 1954
Cross-sections included: 10
Total panel (balanced) observations: 200

Variable Coefficient Std. Error t-Statistic Prob.

C -58.74394 12.45369 -4.716990 0.0000


F 0.110124 0.011857 9.287901 0.0000
K 0.310065 0.017355 17.86656 0.0000

Effects Specification

Cross-section fixed (dummy variables)

In some cases, EViews will automatically drop non-varying variables in order to construct
the test statistic. These dropped variables will be indicated in this latter estimation output.

Updated Panel and Pool Command Summary


The following commands have been updated to support the new panel and pool equation
testing features of EViews 5.1:

• fixedtest (p. 95)

• ranhaus (p. 122)

• testadd (p. 134)

• testdrop (p. 135)


58—Chapter 3. EViews 5.1 Panel and Pool Testing
Chapter 4. EViews 5.1 EcoWin Database Support

EcoWin database support provides online access to economic and financial market
data from EcoWin. The EcoWin Economic and Financial databases contain global
international macroeconomic and financial data from more than 100 countries and
multinational aggregates. Additional databases provide access to equities information
and detailed country-specific information on earnings estimates, equities, funds, fixed
income, and macroeconomics. For further information on EcoWin data and software,
please contact EcoWin directly (http://www.ecowin.com).

EcoWin database access is only available in the Enterprise Edition of EViews 5.1.

With EViews Enterprise Edition, you can open an EViews window into an online
EcoWin database. This window allows browsing and text search of the series in the
database, selecting series, and copying/exporting series into an EViews workfile or
another EViews database. In addition, EViews provides a set of commands that may
be used to perform tasks such as fetching a particular series from a EcoWin database.

Access to EcoWin databases within EViews Enterprise Edition requires that the
EcoWin Pro software has already been installed on the local machine, and that con-
figuration of EcoWin database access using the EcoWin Database Configuration soft-
ware has already been completed outside of EViews.

Interactive Graphical Interface

To open a graphical window to an


EcoWin database, you should first open
the Database Specification dialog by
selecting File/Open/Database…from the
main EViews menu. Next, choose
EcoWin Database in the Database/File
Type combo, and enter the name of the
online database as specified in the
EcoWin Database Configuration soft-
ware, typically “DEFAULT”.

Clicking on OK will open an empty


EViews database window. To access the EcoWin data, click on the Query–Select but-
ton in the database window toolbar. EViews will open a window containing a
EcoWin Pro control for browsing and searching the online data. Note that may take a
60—Chapter 4. EViews 5.1 EcoWin Database Support

bit of time to initialize the EcoWin control. Once initialized, EViews will open the EcoWin
Query window.

The EcoWin
Query window
provides you
with two
methods for
selecting series
to be brought
into your
EViews data-
base.

First, you may


use Tree View
to browse a
directory
structure of
the online
database. You should use the tree on the left to navigate to the directory of interest, then
select series in the window on the right by clicking or control-clicking on the entry, or by
clicking on the right-mouse button and choosing Select All. Once the desired series have
been highlighted, click on OK to bring the selected data into your EViews database.

This procedure, first browsing to


find a directory containing data of
interest, selecting series, and then-
clicking on OK to bring in data,
can be performed multiple times,
until a list of all the series that you
wish to use has been accumulated
within the EViews database win-
dow. At this point the EcoWin
browse control can be closed
using the Cancel button.

In place of browsing the tree


structure of the database, you may
elect to use text search to display
a list of series in the database.
Click on the Text Search selection at the top of the dialog to change the dialog to the
Tips for Working with EcoWin Databases—61

search display, and enter the information in the appropriate fields. For example, to search
for all series in the database using the text “PETROLEUM” and “US”, we have:

Highlight the series of interest and click on OK to bring them into the database. Repeat the
tree browing or search method of adding series until the list in the database is complete,
then click on Cancel to close the query window.

Once series of interest have been included in the database window, all of the standard
EViews database tools, such as copy and paste into an existing workfile or database using
the right mouse menus, creating a new EViews workfile containing the data using the
Export button, or importing data into an existing EViews workfile using the Fetch menu
item from the workfile window, are available.

Note that after you have completed your intitial query, you may reopen the EcoWin query
window at any time. To add series to those already available in the database window, press
the Query Append Select button in the database window, then browse or search for your
series. To first clear the contents of the database window, you should press the Query
Select button instead of the Query Append Select button.

Tips for Working with EcoWin Databases


If an EcoWin database is going to be used frequently or for direct access to individual
series, you should find it useful to add an EcoWin entry in the database registry.

The EViews database registry may be accessed by choosing Options/Database Registry...


from the main EViews menu. Press Add New Entry to add a new database registry entry to
the list. The procedure for adding an EcoWin database to the registry is identical to that for
62—Chapter 4. EViews 5.1 EcoWin Database Support

opening an EcoWin database. The Database/File Type field should be set to EcoWin Data-
base and the Database Name/Path field should be filled with the name assigned to the
database in the EcoWin Database Configuration software (generally “DEFAULT”).

Once the EcoWin database has been put in the registry, it may be referred to by its alias
(short hand) name. For example, if you have assigned the EcoWin database the alias
“EW”, you can open the database with the simple command:

dbopen ew

or by using the Browse Registry button in the Database Specification dialog. The data-
base name “EW” will be added to the most recently used file list, where it may be selected
at a later time to reopen the database.

Assigning the EcoWin database a shorthand name also allows you to reference data with-
out explicitly opening the database. For example, the command

equation eq1.ls ew::usa09016 c ew:usa09016(-1) @trend

runs a regression of U.S. unemployment on an intercept, its own lagged value, and a time
trend. The series USA09016 will be accessed directly from the EcoWin servers, and does
not need to appear within acurrently open database window for this command to be used.
Other commands such as copy allow the name associated with the series to be changed
during the procedure, as well as supporting the copying of series directly from an EcoWin
database to another EViews database.

show ew::usa09016

displays a table of U. S. unemployment.

Note that series in the EcoWin “Economic” or EcoWin “Financial” databases may be refer-
enced merely by using the database shorthand and the series name. In the example above,
EViews looks for USA09016 in the two base EcoWin databases.

Series located in add-on EcoWin databases such as “Bank of England”, “Bundes-


bank”,”Bureau of Economic Analysis”, must also provide the name of the add-on database
in which the series is located. You should provide the name of the EcoWin shortcut fol-
lowed by a double colon, an EcoWin add-on database prefix, a slash, and then the series
name. For example, you can fetch the mortgage rate (LUM5WTL) in the Bank of England
database with

fetch ew::boe\lum5wtl

where we follow the datbase name with the add-on name BOE. The series will be named
“BOE\LUM5WTL” in EViews. Note that the add-on name BOE is taken from the EcoWin
name prefix (for example, LUM5WTL appears as “BOE:LUM5WTL” within EcoWin.
Updated EcoWin Command Summary—63

Updated EcoWin Command Summary


The following command has been modified to support EcoWin databases in EViews 5.1:

• dbopen (p. 86)


64—Chapter 4. EViews 5.1 EcoWin Database Support
Chapter 5. EViews 5.1 Miscellaneous Features

Other features added in EViews 5.1 include improved copying between workfile
pages, additional options in equation forecasting, additional features for the output of
GARCH estimation results, and the ability to set global defaults for the number of pro-
gram errors before stopping execution.

Enhanced Copy Command


In previous versions of EViews, it was easy to use copy-and-paste to copy objects
between workfiles and databases and between different workfile pages.

Command support for copying objects was somewhat more limited. While it has
always been easy to use the copy command to move data between workfiles and
databases, direct copying of objects between two workfile pages was not possible.
The only command method for copying objects between workfiles was first to copy/
store objects from a source workfile page to a database, then to copy/fetch the
objects into the destination workfile page.

To address this limitation, the copy command has been extended in EViews 5.1 to
support copying objects between all named object containers. You may now copy
objects between workfiles and workfile pages using a single command.

The following commands have been updated to support the new features of copy:

• copy (p. 79)

• linkto (p. 106)

Equation Forecast Coefficient Uncertainty


When forecasting from an estimated equation, EViews provides you with the option
of computing measures of the uncertainty associated with the forecast. Typically, this
undertainty is comprised of both residual uncertainty due to the error term in the
specification, as well as coefficient uncertainty reflecting the fact that the coefficients
of the specification are estimated with error.
66—Chapter 5. EViews 5.1 Miscellaneous Features

Previously, there was no way to force


EViews to ignore this second source of
variation. In EViews 5.1, a new equa-
tion forecast option allows you to
ignore coefficient uncertainty when
computing the forecast standard error.

To ignore coefficient uncertainty, sim-


ply click on the Forecast button in
your estimated equation and unselect
the checkbox labeled Coef uncer-
tainty in S.E. calc.

Note that there are some equation


specifications where EViews already ignores coefficient uncertainty when forming esti-
mates of forecast variability. For example, coefficient uncertainty is always ignored in
equations specified by expression, for example, nonlinear least squares, and equations that
include PDL (polynomial distributed lag) terms. In cases where coefficient uncertainty is
already being ignored, the option to include it will not be available.

The following commands have been updated to support the new forecast options:

• fit (p. 93)

• forecast (p. 96)

Additional GARCH Output


The output from ARCH estimation has been improved so that you may choose between
calculating and displaying conditional variances and conditional standard deviations. In
addition, when estimating a component ARCH specification, EViews 5.1 allows you to dis-
play and save the permanent components.

For example, if you wish to display a graph with one-step ahead standard deviations σ t or
2
variances σ t for each observation in the sample, simply select View/GARCH Graph and
then select Conditional Standard Deviation or Conditional Variance, as desired. If you
are working with a component specification, EViews will show estimates of the permanent
and transitory components of the standard deviations or variances.
Global Default for Maximum Number of Errors—67

.0008

.0006

.0004
.00010
.0002
.00005
.0000
.00000

-.00005

-.00010

-.00015
90 91 92 93 94 95 96 97 98 99

Conditional variance
Permanent component
Transitory component

To save conditional variances in a named series in the workfile, select Proc/Make GARCH
Variance Series...

You should provide a name for the target


conditional variance series and, if relevant,
you may provide a name for the permanent
component series. If you would like to
obtain the conditional standard deviations as
displayed in the view above, you should take
the square root of the conditional variance
series.

The following commands have been updated to support the new GARCH output options:

• garch (p. 98)

• makegarch (p. 111)

Global Default for Maximum Number of Errors


A new global option allows you to set the default maximum number of errors in program
execution.
68—Chapter 5. EViews 5.1 Miscellaneous Features

Previously, the only way to allow multiple


errors in a program before stopping was to
change the Maximum errors before halting
setting in the Run dialog or providing an
option to the run command when executing
a program. Manual changing of this setting
was required every time a program was exe-
cuted.

In EViews 5.1 you may set this parameter in


the global options. Simply select Options/
Programs... from the main EViews menu,
and change the default number of errors as
desired. Note that as before, you may override the global setting by entering a different
number in the Run dialog or as an option to the run command.
Chapter 6. EViews 5.1 Command Reference Update Summary

The following is an alphabetical listing of the commands, views, and procedures in EViews that
have undergone substantial updating for Version 5.1.

• addtext (p. 70)

• area (p. 73)

• axis (p. 75)

• bar (p. 77)

• copy (p. 79)

• dbopen (p. 86)

• draw (p. 87)

• drawdefault (p. 89)

• errbar (p. 91)

• fit (p. 93)

• fixedtest (p. 95)

• forecast (p. 96)

• garch (p. 98)

• hilo (p. 99)

• legend (p. 102)

• line (p. 104)

• linkto (p. 106)

• makegarch (p. 111)

• makemap (p. 112)

• pagecreate (p. 113)

• options (p. 117)

• pie (p. 120)

• ranhaus (p. 122)

• scat (p. 123)


70—Chapter 6. EViews 5.1 Command Reference Update Summary

• setelem (p. 126)

• spike (p. 130)

• template (p. 132)

• testadd (p. 134)

• testdrop (p. 135)

• textdefault (p. 136)

• xy (p. 137)

• xyline (p. 140)

• xypair (p. 143)

addtext Graph Proc

Place text in graphs.

Syntax
Graph Proc: graph_name.addtext(options) "text"

Follow the addtext keyword with the text to be placed in the graph, enclosed in double
quotes.

To include carriage returns in your text, use the control “\r” or “\n” to represent the
return. Since the backslash “\” is a special character in the addtext command, use a dou-
ble slash “\\” to include the literal backslash character.

Options
The following options may be provided to change the characteristics of the specified text
object. Any unspecified options will use the default text settings of the graph.

font([face], [pt], Set characteristics of text font. The font name (face),
[+/- b], [+/- i], size (pt), and characteristics are all optional. face
[+/- u], [+/- s]) should be a valid font name, enclosed in double quotes.
pt should be the font size in points. The remaining
options specify whether to turn on/off boldface (b),
italic (i), underline (u), and strikeout (s) styles.
EViews 5.1 Command Reference Update Summary—71

textcolor(arg) Sets the color of the text. arg may be one of the pre-
defined color keywords, or it may be made up of n1,
n2, n3, a set of three integers from 0 to 255, represent-
ing the RGB values of the color. For a description of the
available color keywords (“blue”, “red”, “green”,
“black”, “white”, “purple”, “orange”, “yellow”, “gray”,
“ltgray”), see setfillcolor.
fillcolor(arg) Sets the background fill color of the text box. arg may
be one of the predefined color keywords, or it may be
made up of n1, n2, n3, a set of three integers from 0 to
255, representing the RGB values of the color. For a
description of the available color keywords (“blue”,
“red”, “green”, “black”, “white”, “purple”, “orange”,
“yellow”, “gray”, “ltgray”), see setfillcolor.
framecolor(arg) Sets the color of the text box frame. arg may be one of
the predefined color keywords, or it may be made up of
n1, n2, n3, a set of three integers from 0 to 255, repre-
senting the RGB values of the color. For a description of
the available color keywords (“blue”, “red”, “green”,
“black”, “white”, “purple”, “orange”, “yellow”, “gray”,
“ltgray”), see setfillcolor.

The following options control the position of the text:

t Top (above the graph and centered).


l Left rotated.
r Right rotated.
b Below and centered.
x Enclose text in box.

The options which support the “-” may be proceeded by a “+” or “-” indicating whether
to turn on or off the option. The “+” is optional.

To place text within a graph, you can use explicit coordinates to specify the position of the
upper left corner of the text.
72—Chapter 6. EViews 5.1 Command Reference Update Summary

Coordinates are set by a pair


of numbers h, v in virtual
inches. Individual graphs are
always 4 × 3 virtual inches
(scatter diagrams are 3 × 3
virtual inches) or a user-speci-
fied size, regardless of their
current display size.

The origin of the coordinate is


the upper left hand corner of
the graph. The first number h
specifies how many virtual
inches to offset to the right
from the origin. The second
number v specifies how many
virtual inches to offset below
the origin. The upper left
hand corner of the text will be placed at the specified coordinate.

Coordinates may be used with other options, but they must be in the first two positions of
the options list. Coordinates are overridden by other options that specify location.

When addtext is used with a multiple graph, the text is applied to the whole graph, not
to each individual graph.

Examples
freeze(g1) gdp.line
g1.addtext(t) "Fig 1: Monthly GDP (78m1-95m12)"

places the text “Fig1: Monthly GDP (78m1-95m12)” centered above the graph G1.

g1.addtext(.2, .2, X) "Seasonally Adjusted"

places the text “Seasonally Adjusted” in a box within the graph, slightly indented from the
upper left corner.
g1.addtext(t, x, textcolor(red), fillcolor(128,128,128), frame-
color(black)) "Civilian\rUnemployment (First\\Last)"

adds the text “Civilian Unemployment (First\Last)” where there is a return between the
“Civilian” and “Unemployment”. The text is colored red, and is enclosed in a gray box with
a black frame.
EViews 5.1 Command Reference Update Summary—73

Cross-references
See legend (p. 102) and textdefault (p. 136).

Command || Coef View | Graph Command | Group View | Matrix View |


area Rowvector View | Series View | Sym View | Vector View

Display area graph view of the object or change existing graph object type to area graph.

Create area or filled line graph from one or more series, or from each column of a matrix
object.

Syntax
Command: area(options) arg1 [arg2 arg3 ...]
Object View: object_name.area(options)
Graph Proc: graph_name.area(options)

Options
Template and printing options
o= template Use appearance options from the specified template.
template may be a predefined template keyword
(‘default” - current global defaults, “classic”, “modern”,
“reverse”, “midnight”, “spartan”, “monochrome”) or a
graph in the workfile.
t=graph_name Use appearance options and copy text and shading from
the specified graph.
b / -b [Apply / Remove] bold modifiers of the base template
style specified using the “o=” option above.
w / -w [Apply / Remove] wide modifiers of the base template
style specified using the “o=” option above.
p Print the area graph.

Scale options
a (default) Automatic single scale.
d Dual scaling with no crossing. The first series is scaled
on the left and all other series are scaled on the right.
x Dual scaling with possible crossing. See the “d” option.
74—Chapter 6. EViews 5.1 Command Reference Update Summary

n Normalized scale (zero mean and unit standard devia-


tion). May not be used with the “s” option.
s Stacked area graph. Each area represents the cumula-
tive total of the series listed. The difference between
areas corresponds to the value of a series. May not be
used with the “l” option.
l Area graph for the first series listed and a line graph for
all subsequent series. May not be used with the “s”
option.
m Plot areas in multiple graphs (will override the “s” or
“l” options). Not for use with an existing graph object.

Panel options
The following options apply when graphing panel structured data.

panel=arg Panel data display: “stack” (stack the cross-sections),


(default taken “individual” or “1” (separate graph for each cross-sec-
from global set- tion), “combine” or “c” (combine each cross-section in
tings) single graph; one time axis), “mean” (plot means
across cross-sections), “mean1se” (plot mean and +/-
1 standard deviation summaries), “mean2sd” (plot
mean and +/- 2 s.d. summaries), “mean3sd” (plot
mean and +/- 3 s.d. summaries), “median” (plot
median across cross-sections), “med25” (plot median
and +/- .25 quantiles), “med10” (plot median and +/-
.10 quantiles), “med05” (plot median +/- .05 quan-
tiles), “med025” (plot median +/- .025 quantiles),
“med005” (plot median +/- .005 quantiles), “med-
mxmn” (plot median, max and min).

The options which support the “-” may be proceeded by a “+” or “-” indicating whether
to turn on or off the option. The “+” is optional.

Examples
group g1 ser1 ser2 ser3
g1.area(s)

defines a group G1 containing the three series SER1, SER2 and SER3, then plots a stacked
area graph of the series in the group.
EViews 5.1 Command Reference Update Summary—75

area(l, o=gra1) s1 gdp cons

creates an area graph of series S1, together with line graphs of GDP and CONS. The graph
uses options from graph GRA1 as a template.

g1.area(o=midnight, b, w)

creates an area graph of the group G1, using the settings of the predefined template “mid-
night”, applying the bold and wide modifiers.

Cross-references
See Chapter 1, “EViews 5.1 Enhanced Graph Customization”, on page 33 for a detailed dis-
cussion of graphs in EViews, and “Graph Templates” on page 38 for a discussion of graph
templates. See graph for graph declaration and other graph types.

axis Graph Proc

Sets axis display characteristics for the graph.

Syntax
Graph Proc: graph_name.axis(axis_id) options_list

The axis_id parameter identifies which of the axes the proc modifies. If no option is speci-
fied, the proc will modify all of the axes. axis_id may take on one of the following values:

left / l Left vertical axis.


right / r Right vertical axis.
bottom / b Bottom axis.
top / t Top axis.
all / a All axes.

Options
The options list may include any of the following options:

grid / -grid [Draw / Do not draw] grid lines.


zeroline / -zero- [Draw / Do not draw] a line at zero on the data scale.
line
ticksout Draw tickmarks outside the graph axes.
ticksin Draw tickmarks inside the graph axes.
76—Chapter 6. EViews 5.1 Command Reference Update Summary

ticksboth Draw tickmarks both outside and inside the graph axes.
ticksnone Do not draw tickmarks.
minor / [Allow / Do not allow] minor tick marks.
-minor
label / [Place / Do not place] labels on the axes.
-label
font([face], [pt], Set characteristics of font. The font name (face), size
[+/- b], [+/- i], (pt), and characteristics are all optional. face should be
[+/- u], [+/- s]) a valid font name, enclosed in double quotes. pt should
be the font size in points. The remaining options spec-
ify whether to turn on/off boldface (b), italic (i), under-
line (u), and strikeout (s) styles.
textcolor(arg) Sets the background color of the legend text. arg may
be one of the predefined color keywords, or it may be
made up of n1, n2, n3, a set of three integers from 0 to
255, representing the RGB values of the color. For a
description of the available color keywords (“blue”,
“red”, “green”, “black”, “white”, “purple”, “orange”,
“yellow”, “gray”, “ltgray”), see setfillcolor.
mirror / -mirror [Label / Do not label] both left and right axes with
duplicate axes (single scale graphs only).

The options which support the “-” may be proceeded by a “+” or “-” indicating whether
to turn on or off the option. The “+” is optional.

Note that the default settings are taken from the Global Defaults.

Examples
graph1.axis(r) zeroline -minor font(12)

draws a horizontal line through the graph at zero on the right axis, removes minor ticks,
and changes the font size of the right axis labels to 12 point.

graph2.axis -mirror

turns of mirroring of axes in single scale graphs.

mygra1.axis font("Times", 12, b, i) textcolor(blue)

sets the axis font to blue “Times” 12pt bold italic.


EViews 5.1 Command Reference Update Summary—77

Cross-references
See Chapter 1, “EViews 5.1 Enhanced Graph Customization”, on page 33 for a discussion
of graph options.

See also scale, datelabel, options (p. 117) and setelem (p. 126).

Command || Coef View | Graph Command | Group View | Matrix View |


bar Rowvector View | Series View | Sym View | Vector View

Display bar graph of object, or change existing graph object type to bar graph.

Create bar graph from one or more series or from each column of a matrix object.

Note: when the individual bars in a bar graph become too thin to be distinguished, the
graph will automatically be converted into an area graph (see area (p. 73)).

Syntax
Command: bar(options) arg1 [arg2 arg3 ...]
Object View: object_name.bar(options)
Graph Proc: graph_name.bar(options)

When used as a graph proc, bar changes the graph type to a bar graph.

Options
Template and printing options
o= template Use appearance options from the specified template.
template may be a predefined template keyword
(‘default” - current global defaults, “classic”, “modern”,
“reverse”, “midnight”, “spartan”, “monochrome”) or a
graph in the workfile.
t=graph_name Use appearance options and copy text and shading from
the specified graph.
b / -b [Apply / Remove] bold modifiers of the base template
style specified using the “o=” option above.
w / -w [Apply / Remove] wide modifiers of the base template
style specified using the “o=” option above.
p Print the bar graph.

The options which support the “-” may be proceeded by a “+” or “-” indicating whether
to turn on or off the option. The “+” is optional.
78—Chapter 6. EViews 5.1 Command Reference Update Summary

Scale options
a (default) Automatic single scale.
d Dual scaling with no crossing. The first series is scaled
on the left, and all other series are scaled on the right.
x Dual scaling with possible crossing. See the “d” option.
n Normalized scale (zero mean and unit standard devia-
tion). May not be used with the “s” option.
s Stacked bar graph. Each bar represents the cumulative
total of the series listed. The difference between bars
corresponds to the value of the corresponding stacked
series. May not be used with the “l” option.
l Bar graph for the first series and a line graph for all sub-
sequent series. May not be used with the “s” option.
m Plot bars in multiple graphs. Will override the “s” and
the “l” options. Not for use with an existing graph
object.

Panel options
The following options apply when graphing panel structured data:

panel=arg Panel data display: “stack” (stack the cross-sections),


(default taken “individual” or “1” (separate graph for each cross-sec-
from global set- tion), “combine” or “c” (combine each cross-section in
tings) single graph; one time axis), “mean” (plot means
across cross-sections), “mean1se” (plot mean and +/-
1 standard deviation summaries), “mean2sd” (plot
mean and +/- 2 s.d. summaries), “mean3sd” (plot
mean and +/- 3 s.d. summaries), “median” (plot
median across cross-sections), “med25” (plot median
and +/- .25 quantiles), “med10” (plot median and +/-
.10 quantiles), “med05” (plot median +/- .05 quan-
tiles), “med025” (plot median +/- .025 quantiles),
“med005” (plot median +/- .005 quantiles), “med-
mxmn” (plot median, max and min).

Examples
Plot a bar graph of POP together with line graphs of GDP and CONS:
EViews 5.1 Command Reference Update Summary—79

bar(l, x, o=mybar1) pop gdp cons

The bar graph is scaled on the left, while the line graphs are scaled on the right. The graph
uses options from graph MYBAR1 as a template.
group mygrp oldsales newsales
mygrp.bar(s)

The first line defines a group of series and the second line displays a stacked bar graph
view of the series in the group.

mygrp.bar(o=midnight, b)

creates an bar graph of the group G1, using the settings of the predefined template “mid-
night”, applying the bold modifier.

Cross-references
See “Graph Templates” on page 38 for a discussion of graph templates.

See graph for graph declaration and additional graph types.

copy Command

Copy an object, or a set of objects matching a name pattern, within and between work-
files, workfile pages, and databases. Data in series objects may be frequency converted or
match merged.

Syntax
Command: copy(options) src_spec dest_spec [src_id dest_id]
Command: copy(options) src_spec dest_spec [@src src_ids @dest dest_id]

where src_spec and dest_spec are of the form:


[ctype][container::][page\]object_name

There are three parts to the copy command: (1) a specification of the location and names
of the source objects; (2) a specification of the location and names of the destination
objects; (3) optional source and destination IDs if the copy operation involves match merg-
ing.

The source and destination objects are specified in multiple (optional) parts: (1) the con-
tainer specification is the name of a workfile or database; (2) the page specification is the
name of a page within a workfile or a subdirectory within a database; and (3) the
object_name specification is the name of an object or a wildcard pattern corresponding to
multiple objects.
80—Chapter 6. EViews 5.1 Command Reference Update Summary

The ctype specification is rarely required, but permits you to specify precisely your source
or destination in cases where a database and workfile share the same name. In this case,
ctype may be used to indicate the container to which you are referring by prefixing the con-
tainer name with “:” to indicate the workfile, or “::” to indicate the database with the com-
mon name.

When parts of the source or destination specification are not provided, EViews will fill in
default values where possible. The default container is the active workfile, unless the “::”
prefix is used in which case the default container is the default database. The default page
within a workfile is always the active page. The default name for the destination object is
the name of the object within the source container.

If ID series are not provided in the command, then EViews will perform frequency conver-
sion when copying data whenever the source and destination containers have different fre-
quencies. If ID series are provided, then EViews will perform a general match merge
between the source and destination using the specificed ID series. In the case where you
wish to copy your data using match merging with special treatment for date matching, you
must use the special keyword “@DATE” as an ID series for the source or destination. If
“@DATE” is not specified as an identifier in either the source or destination IDs, EViews
will perform an exact match merge using the given identifiers.

If ID series are not specified, but a conversion option requiring a general match merge is
used (e.g., “c=med”), “@DATE @DATE” will be appended to the list of IDs and a general
date match merge will be employed.

See linkto (p. 106) for additional discussion of the differences embodied in these
choices.

The general syntax described above covers all possible uses of the copy command. The
following paragraphs provide examples of the specific syntax used for some common cases of
the command.

Copying Within a Workfile


Copy an object within the default workfile page as a new object with a different name:

• copy(options) src_name dest_name

Copy an object from the src_page page into the default workfile page using the specified
name:

• copy(options) src_page\src_name dest_name

Copy an object from the src_page page into the dest_page page, keeping the same name:

• copy(options) src_page\src_names dest_page\


EViews 5.1 Command Reference Update Summary—81

Copy an object from the src_page page to the default workfile page, match merging any
series data using a single src_id and a single dest_id identifier series:

• copy(options) src_page\src_name dest_name src_id dest_id

Copy an object from the src_page page to the dest_page match merging any series data
using multiple source and destination identifier series:

• copy(options) src_page\src_name dest_page\dest_name @src src_id1 src_id2 ...


src_id_n @dest dest_id1 dest_id2 ... dest_id_n

Copying Between Containers (Workfiles and Databases)


Copy one or more objects from the src_page of the workfile src_workfile to the dest_page of
the workfile dest_workfile, using the name or name pattern given in src_names:

• copy(options) src_workfile::src_page\src_names dest_workfile::dest_page\

Copy an object from database src_database to the default page in the container
dest_container:

• copy(options) src_database::src_name dest_container::dest_name

Note that if both a workfile and database exist matching the name provided in
dest_container, EViews will favor the workfile unless the “::” prefix is used to specify
explicitly that the database should be used.

Options
Basic Options

overwrite / o Overwrite any existing object with the destination name


in the destination container. Error only if a non-editable
series is encountered in the destination location.
merge / m If the source object is a series, merge the data from the
source series into any existing destination series, pre-
serving any values in the destination series that are not
present in the source. For all other object types, over-
write any existing object with the source object. Error if
a non-editable series is encountered in the destination
location.
protect / p Protect objects in the destination location from over-
writing or merging. If there is an existing object in the
destination container, cancel the copy operation for that
object, but do not generate an error.
82—Chapter 6. EViews 5.1 Command Reference Update Summary

noerr Suppress errors that are generated during the copy. For
example, if the overwrite option is used, suppress any
error caused by attempting to overwrite a non-editable
series such as an index series used in the workfile struc-
ture.

Group Copy Options


When copying a group object from workfile to database:

g=arg Method for copying group objects from a workfile to


database: “s” (copy group definition and series as sepa-
rate objects), “t” (copy group definition and series as
one object), “d” (copy series only as separate objects),
“l” (copy group definition only).

When copying a group object from a database to a workfile:

g=arg Method for copying group objects from a database or


workfile to a workfile: “b” (copy both group definition
and series), “d” (copy only the series), “l” (copy only
the group definition).

Note that copying a group object containing expressions or auto-updating series between
workfiles only copies the expressions, and not the underlying series.

Frequency Conversion Options


If the copy command does not specify identifier series, EViews will perform frequency
conversion of the data contained in series objects whenever the source and destination
containers do not have the same frequency.

The following options control the frequency conversion method when copying series and
group objects into a workfile page and converting from low to high frequency:

c=arg Low to high conversion methods: “r” (constant match


average), “d” (constant match sum), “q” (quadratic
match average), “t” (quadratic match sum), “i” (linear
match last), “c” (cubic match last).

The following options control the frequency conversion method when copying series and
group objects into a workfile page and converting from high to low frequency:
EViews 5.1 Command Reference Update Summary—83

c=arg High to low conversion methods removing NAs: “a”


(average of the nonmissing observations), “s” (sum of
the nonmissing observations), “f” (first nonmissing
observation), “l” (last nonmissing observation), “x”
(maximum nonmissing observation), “m” (minimum
nonmissing observation).
High to low conversion methods propagating NAs: “an”
or “na” (average, propagating missings), “sn” or “ns”
(sum, propagating missings), “fn” or “nf” (first, propa-
gating missings), “ln” or “nl” (last, propagating miss-
ings), “xn” or “nx” (maximum, propagating missings),
“mn” or “nm” (minimum, propagating missings).

Note that if no conversion method is given in the command, the conversion method specified
within the series object will be used as the default. If the series does not contain an explicit
conversion method, the global option settings will used to determine the method.

Match Merge Options


These options are available when ID series are specified in the copy commmand.

smpl= Sample to be used when computing contractions during


smpl_spec copying using match merge. Either provide the sample
range in double quotes or specify a named sample
object. By default, EViews will use the entire workfile
sample “@ALL”.
84—Chapter 6. EViews 5.1 Command Reference Update Summary

c=arg Set the match merge contraction method.


If you are copying a numeric source series by general
match merge, the argument can be one of: “mean”,
“med” (median), “max”, “min”, “sum”, “sumsq” (sum-
of-squares), “var” (variance), “sd” (standard devia-
tion), “skew” (skewness), “kurt” (kurtosis), “quant”
(quantile, used with “quant=” option), “obs” (number
of observations), “nas” (number of NA values), “first”
(first observation in group), “last” (last observation in
group), “unique” (single unique group value, if
present), “none” (disallow contractions).
If copying an alpha series, only the non-summary meth-
ods “max”, “min”, “obs”, “nas”, first”, “last”, “unique”
and “none” are supported.
For copying of numeric series, the default contraction
method is “c=mean”; for copying of alpha series, the
default is “c=unique”.
quant=number Quantile value to be used when contracting using the
“c=quant” option (e.g, “quant=.3”).
nacat Treat “NA” values as a category when copying using
general match merge operations.

Most of the conversion options should be self-explanatory. As for the others: “first” and
“last” give the first and last non-missing observed for a given group ID; “obs” provides the
number of non-missing values for a given group; “nas” reports the number of NAs in the
group; “unique” will provide the value in the source series if it is the identical for all obser-
vations in the group, and will return NA otherwise; “none” will cause the copy to fail if
there are multiple observations in any group—this setting may be used if you wish to pro-
hibit all contractions.

On a match merge expansion, copying with match merging will repeat the value of the
source for every observation with matching identifier values in the destination. If both the
source and destination have multiple values for a given ID, EViews will first perform a con-
traction in the source (if not ruled out by “c=none”), and then perform the expansion by
replicating the contracted value in the destination.

Examples
copy good_equation best_equation

makes an exact copy of GOOD_EQUATION and names it BEST_EQUATION.


EViews 5.1 Command Reference Update Summary—85

copy graph_1 wf2::wkly\graph1

copies GRAPH_1 from the default page of the current workfile to GRAPH1 in the page
WKLY of the workfile WF2.

copy gdp usdat::

copies GDP from the current workfile to GDP in the USDAT database or workfile.

copy ::gdp macro1::gdp_us

copies GDP from the default database to either the open workfile MACRO1, or the database
named MACRO1 if there is no open workfile with that name. If there is an open workfile
MACRO1 you may use

copy ::gdp ::macro1::gdp_us

to specify explicitly that you wish to write to the MACRO1 database.

copy(smpl="1990 2000") page1\pop page2\ @src county @date @dest


county @date

copies POP data for 1990 through 2005 from PAGE1 to PAGE2, match merge using the ids
COUNTY and the date structure of the two pages.
copy(smpl="1990 2000", c=mean) panelpage\inc countypage\ county
county

copies the INC data from the PANELPAGE to the COUNTYPAGE, match merging using the
values of the COUNTY series, and contracting the panel data by computing means for each
county using the specified sample.

copy countypage\pop panelpage\ county county

match merges the POP data from the COUNTYPAGE to the PANELPAGE using the values of
the COUNTY series.
copy(c=x, merge) quarterly::page1\ser* annual::page6\*

copies all objects with names beginning with “SER” on page PAGE1 of workfile QUAR-
TERLY into page PAGE6 of workfile ANNUAL using the existing names. Series objects with
data that can be (high-to-low) frequency converted will take the maximum value within a
low-frequency period as the conversion method. If destination series already exist with the
same name as the source series, the data will be merged. If destination objects (non-series)
exist with the same name as source series, they will be overwritten.

Note that since databases are read from disk, you may provide a path for the database in
the container specification, as in:
86—Chapter 6. EViews 5.1 Command Reference Update Summary

copy "c:\my data\dba.edb::ser01" ser02

which copies the object SER01 from the database DBA.EDB located in the path “C:\MY
DATA\” to SER02 in the default workfile page.

copy gd* "c:\my data\findat::"

makes a duplicate of all objects in the default page of the current workfile with names
starting with "GD" to the database FINDAT in the root of “C:\MY DATA\”.

Cross-references
See “Copying Objects”of the User’s Guide for a discussion of copying and moving objects.

See also fetch, setconvert, store, and linkto (p. 106).

dbopen Command

Open an existing database.

Syntax
Command: dbopen(options) [path\]db_name [as shorthand_name]

Follow the dbopen keyword with the name of a database. You should include a path name
to open a database not in the default path. The opened database will become the default
database.

You may use the “as” keyword to provide an optional shorthand_name or a short text label
which is used to refer to the open database in commands and programs. If you leave this
field blank, a default shorthand_name will be assigned automatically. See “Database Short-
hands” in the User’s Guide for additional discussion.

By default, EViews will use the extension of the database file to determine type. For exam-
ple, files with the extension “.EDB” will be opened as an EViews database, while files with
the extension “.IN7” will be opened as a GiveWin database. You may use options to specify
an explicit type.

Options
type=arg, t=arg Specify the database type: AREMOS-TSD (“a”, “are-
mos”, “tsd”), DRIBase (“b”, “dribase”), EViews (“e”,
“evdb”), FAME (“f”, “fame”), GiveWin/PcGive (“g”,
“give”), Haver Analytics (“h”, “haver”), Rats Portable/
Troll (“l”, “trl”), RATS 4.x (“r”, “rats”), TSP portable
(“t”, “tsp”), EcoWin (“ecowin”).
EViews 5.1 Command Reference Update Summary—87

The following options may be required when connecting to a remote server:

s=server_ id, Server name.


server=server_id
u=user, Username.
username=user
p=pswd, Password.
password=pswd

Examples
dbopen c:\data\us1

opens a database named US1 in the C:\DATA directory. The command:

dbopen us1

opens a database in the default path. If the specified database does not exist, EViews will
issue an error message. You should use db or dbcreate to create a new database.

Cross-references
See Chapter 10, “EViews Databases” of the User’s Guide for a discussion of EViews data-
bases.

See also db and dbcreate.

draw Graph Proc

Place horizontal or vertical lines and shaded areas on the graph.

Syntax
Graph Proc: graph_name.draw(draw_type, axis_id [,options]) position1
[position2]

where draw_type may be one of the following:

line / l A line
shade A shaded area

Note that the “dashline” option has been removed (though it is supported for backward
compatibility). You should use the “pattern” option to specify whether the line is solid or
patterned.
88—Chapter 6. EViews 5.1 Command Reference Update Summary

axis_id may take the values:

left / l Draw a horizontal line or shade using the left axis to


define the drawing position
right / r Draw a horizontal line or shade using the right axis to
define the drawing position
bottom / b Draw a vertical line or shade using the bottom axis to
define the drawing position

If drawing a line, the drawing position is taken from position1. If drawing a shaded area,
you must provide a position1 and position2 to define the boundaries of the shaded region.

Line/Shade Options
The following options may be provided to change the characteristics of the specified line or
shade. Any unspecified options will use the default text settings of the graph.

color(arg) Specifies the color of the line or shade. the argument


may be made up of n1, n2, and n3, a set of three inte-
gers from 0 to 255, representing the RGB values of the
line or shade, or it may be one of the predefined color
keywords (“blue”, “red”, “green”, “black”, “white”,
“purple”, “orange”, “yellow”, “gray”, “ltgray”). For a
full description of the keywords, see setfillcolor.
The default is black for lines and gray for shades. RGB
values may be examined by calling up the color palette
in the Graph Options dialog.
pattern(index) Sets the line pattern to the type specified by index.
index can be an integer from 1 to 12 or one of the
matching keywords (“solid”, “dash1” through
“dash10”, “none”). See setelem (p. 126) for a descrip-
tion of the available patterns. The “none” keyword
turns on solid lines.
width(n1) Specify the width, where n1 is the line width in points
(used only if object_type is “line” or “dashline”). The
default is 0.5 points.

Examples
graph1.draw(line, left, rgb(0,0,127)) 5.25

draws a horizontal blue line at the value “5.25” as measured on the left axis while:
EViews 5.1 Command Reference Update Summary—89

graph1.draw(shade, right) 7.1 9.7

draws a shaded horizontal region bounded by the right axis values “7.1” and “9.7”. You
may also draw vertical regions by using the “bottom” axis_id:

graph1.draw(shade, bottom) 1980:1 1990:2

draws a shaded vertical region bounded by the dates “1980:1” and “1990:2”.

graph1.draw(line, bottom, pattern(dash1)) 1985:1

draws a vertical dashed line at “1985:1”.

Cross-references
See Chapter 1, “EViews 5.1 Enhanced Graph Customization”, on page 33 for a discussion
of graph options.

See drawdefault (p. 89) for setting defaults.

drawdefault Graph Proc

Change default settings for lines and shaded areas in the graph.

This command specifies changes in the default settings which will be applied to line and
shade objects added subsequently to the graph. If you include the “existing” option, all of
the drawing default settings will also be applied to existing line and shade objects in the
graph.

Syntax
Graph Proc: graph_name.drawdefault draw_options

where draw_options may include one or more of the following:

linecolor(arg) Sets the default color for lines. The arg value may set by
using one of the color keywords (e.g., “blue”), or by
using the RGB values (e.g., “@RGB(255, 255, 0)”). For
a description of the available color keywords (“blue”,
“red”, “green”, “black”, “white”, “purple”, “orange”,
“yellow”, “gray”, “ltgray”). For a full description of the
keywords, see setfillcolor.
90—Chapter 6. EViews 5.1 Command Reference Update Summary

shadecolor(arg) Sets the default color for shades. arg may be one of the
predefined color keywords, or it may be made up of n1,
n2, n3, a set of three integers from 0 to 255, represent-
ing the RGB values of the color. For a description of the
available color keywords (“blue”, “red”, “green”,
“black”, “white”, “purple”, “orange”, “yellow”, “gray”,
“ltgray”), see setfillcolor.
width(n1) Specify the width, where n1 is the line width in points
(used only if object_type is “line” or “dashline”). The
default is 0.5 points.
pattern(index) Sets the default line pattern to the type specified by
index. index can be an integer from 1 to 12 or one of
the matching keywords (“solid”, “dash1” through
“dash10”, “none”). See setelem (p. 126) for a descrip-
tion of the available patterns. The “none” keyword
turns on solid lines.
existing Apply the default settings to all existing line/shade
objects in the graph.

Examples
graph1.drawdefault linecolor(blue) width(.25) existing

changes the default setting for new line/shade objects. New lines added to the graph will
now be drawn in blue, with a width of 0.25 points. In addition, all existing line and shade
objects will be updated with the graph default settings. Note that in addition to the line
color and width settings specified in the command, the existing default line pattern and
shade colors will be applied to the line and shade objects in graph.

graph1.drawdefault existing

updates all line and shade objects in the graph with the currently specified default draw
object settings.

Cross-references
See Chapter 1, “EViews 5.1 Enhanced Graph Customization”, on page 33 for a discussion
of graph options. See also draw (p. 87).
EViews 5.1 Command Reference Update Summary—91

Command || Graph Command | Group View | Matrix View| Rowvector


errbar View| Sym View

Display error bar graph view of object, or change existing graph object type to error bar
(if possible).

Sets the graph type to error bar or displays an error bar view of the group. If there are two
series in the graph or group, the error bar will show the high and low values in the bar.
The optional third series will be plotted as a symbol. When used as a matrix view, the col-
umns of the matrix are used in place of series.

Syntax
Command: errbar(options) arg1 [arg2 arg3 ...]
Graph Proc: graph_name.errbar(options)
Object View: object_name.errbar(options)

Options
Template and printing options
o= template Use appearance options from the specified template.
template may be a predefined template keyword
(‘default” - current global defaults, “classic”, “modern”,
“reverse”, “midnight”, “spartan”, “monochrome”) or a
graph in the workfile.
t=graph_name Use appearance options and copy text and shading from
the specified graph.
b / -b [Apply / Remove] bold modifiers of the base template
style specified using the “o=” option above.
w / -w [Apply / Remove] wide modifiers of the base template
style specified using the “o=” option above.
p Print the error bar graph.

The options which support the “-” may be proceeded by a “+” or “-” indicating whether
to turn on or off the option. The “+” is optional.
Panel options
The following options apply when graphing panel structured data:
92—Chapter 6. EViews 5.1 Command Reference Update Summary

panel=arg Panel data display: “stack” (stack the cross-sections),


(default taken “individual” or “1” (separate graph for each cross-sec-
from global set- tion), “combine” or “c” (combine each cross-section in
tings) single graph; one time axis), “mean” (plot means
across cross-sections), “mean1se” (plot mean and +/-
1 standard deviation summaries), “mean2sd” (plot
mean and +/- 2 s.d. summaries), “mean3sd” (plot
mean and +/- 3 s.d. summaries), “median” (plot
median across cross-sections), “med25” (plot median
and +/- .25 quantiles), “med10” (plot median and +/-
.10 quantiles), “med05” (plot median +/- .05 quan-
tiles), “med025” (plot median +/- .025 quantiles),
“med005” (plot median +/- .005 quantiles), “med-
mxmn” (plot median, max and min).

Examples
The following commands:
group g1 x y
g1.errbar

display the error bar view of G1 using the X series as the high value of the bar and the Y
series as the low value.
group g2 plus2se minus2se estimate
g2.errbar

display the error bar view of G2 with the PLUS2SE series as the high value of the bar, the
MINUS2SE series as the low value, and ESTIMATE as a symbol.
group g1 x y
freeze(graph1) g1.line
graph1.errbar

first creates a graph object GRAPH1 containing a line graph of the series in G1, then
changes the graph type to an error bar.

g1.errbar(o=midnight, w)

creates an errbar bar graph of the group G1, using the settings of the predefined template
“midnight”, applying the wide modifier.
EViews 5.1 Command Reference Update Summary—93

Cross-references
See Chapter 1, “EViews 5.1 Enhanced Graph Customization”, on page 33 for details on
graph objects and types.

See also graph for graph declaration and other graph types.

fit Command || Equation Proc

Computes static forecasts or fitted values from an estimated equation.

When the regressor contains lagged dependent values or ARMA terms, fit uses the actual
values of the dependent variable instead of the lagged fitted values. You may instruct fit
to compare the forecasted data to actual data, and to compute forecast summary statistics.

Not available for equations estimated using ordered methods; use makemodel to create a
model using the ordered equation results (see example below).

Syntax
Command: fit(options) yhat [y_se]
Equation Proc: eq_name.fit(options) yhat [y_se]
ARCH Proc: eq_name.fit(options) yhat [y_se y_var]

Following the fit keyword, you should type a name for the forecast series and, optionally,
a name for the series containing the standard errors and, for ARCH specifications, a name
for the conditional variance series.

Forecast standard errors are currently not available for binary, censored, and count models.

Options
d In models with implicit dependent variables, forecast
the entire expression rather than the normalized vari-
able.
u Substitute expressions for all auto-updating series in the
equation.
g Graph the fitted values together with the ±2 standard
error bands.
e Produce the forecast evaluation table.
i Compute the fitted values of the index. Only for binary,
censored and count models.
94—Chapter 6. EViews 5.1 Command Reference Update Summary

s Ignore ARMA terms and use only the structural part of


the equation to compute the fitted values.
n Ignore coefficient uncertainty in computing forecast
standard error.
f = arg Out-of-fit-sample fill behavior: “actual” (fill observa-
(default= tions outside the fit sample with actual values for the
“actual”) fitted variable), “na” (fill observations outside the fit
sample with missing values).
p Print results.

Examples
equation eq1.ls cons c cons(-1) inc inc(-1)
eq1.fit c_hat c_se
genr c_up=c_hat+2*c_se
genr c_low=c_hat-2*c_se
line cons c_up c_low

The first line estimates a linear regression of CONS on a constant, CONS lagged once, INC,
and INC lagged once. The second line stores the static forecasts and their standard errors
as C_HAT and C_SE. The third and fourth lines compute the +/- 2 standard error bounds.
The fifth line plots the actual series together with the error bounds.
equation eq2.binary(d=l) y c wage edu
eq2.fit yf
eq2.fit(i) xbeta
genr yhat = 1-@clogit(-xbeta)

The first line estimates a logit specification for Y with a conditional mean that depends on
a constant, WAGE, and EDU. The second line computes the fitted probabilities, and the
third line computes the fitted values of the index. The fourth line computes the probabili-
ties from the fitted index using the cumulative distribution function of the logistic distribu-
tion. Note that YF and YHAT should be identical.

Note that you cannot fit values from an ordered model. You must instead solve the values
from a model. The following lines generate fitted probabilities from an ordered model:
equation eq3.ordered y c x z
eq3.makemodel(oprob1)
solve oprob1
EViews 5.1 Command Reference Update Summary—95

The first line estimates an ordered probit of Y on a constant, X, and Z. The second line
makes a model from the estimated equation with a name OPROB1. The third line solves
the model and computes the fitted probabilities that each observation falls in each cate-
gory.

Cross-references
To perform dynamic forecasting, use forecast (p. 96). See makemodel and solve for
forecasting from systems of equations or ordered equations.

See Chapter 18, “Forecasting from an Equation” of the User’s Guide for a discussion of
forecasting in EViews and Chapter 21, “Discrete and Limited Dependent Variable Models”
of the User’s Guide for forecasting from binary, censored, truncated, and count models. See
“Forecasting” of the User’s Guide for a discussion of forecasting from sspace models.

fixedtest Equation View | Pool View

Test joint significance of the fixed effects estimates.

Tests the hypothesis that the estimated fixed effects are jointly significant using F and LR
test statistics. If the estimated specification involves two-way fixed effects, three separate
tests will be performed; one for each set of effects, and one for the joint effects.

Only valid for panel or pool regression equations estimated with fixed effects. Not cur-
rently available for specifications estimated using instrumental variables.

Syntax
Object View: eq_name.fixedtest(options)

Options
p Print output from the test.

Examples
equation eq1.ls(cx=f) sales c adver lsales
eq1.fixedtest

estimates a specification with cross-section fixed effects and tests whether the fixed effects
are jointly significant.

Cross-references
See also testadd (p. 134), testdrop (p. 135), ranhaus (p. 122), and wald.
96—Chapter 6. EViews 5.1 Command Reference Update Summary

forecast Command || Equation Proc | Sspace Proc

Computes (n-period ahead) dynamic forecasts of an estimated equation or forecasts of the


signals and states for an estimated state space.

forecast computes the forecast for all observations in a specified sample. In some set-
tings, you may instruct forecast to compare the forecasted data to actual data, and to
compute summary statistics.

Syntax
Command: forecast(options) yhat [y_se]
Equation Proc: eq_name.forecast(options) yhat [y_se]
ARCH Proc: eq_name.forecast(options) yhat [y_se y_var]
Sspace Proc: ss_name.forecast(options) keyword1 names1 [keyword2 names2]
[keyword3 names3] ...

When used with an equation, you should enter a name for the forecast series and, option-
ally, a name for the series containing the standard errors and, for ARCH specifications, a
name for the conditional variance series. Forecast standard errors are currently not avail-
able for binary or censored models. forecast is not available for models estimated using
ordered methods.

When used with a sspace, you should enter a type-keyword followed by a list of names for
the target series or a wildcard expression, and if desired, additional type-keyword and tar-
get pairs. The following are valid keywords: “@STATE”, “@STATESE”, “@SIGNAL”,
“@SIGNALSE”. The first two keywords instruct EViews to forecast the state series and the
values of the state standard error series. The latter two keywords instruct EViews to fore-
cast the signal series and the values of the signal standard error series.

If a list is used to identify the targets in sspace forecasting, the number of target series
must match the number of names implied by the keyword. Note that wildcard expressions
may not be used for forecasting signal variables that contain expressions. In addition, the
“*” wildcard expression may not be used for forecasting signal variables since this would
overwrite the original data.

Options
Options for Equation forecasting
d In models with implicit dependent variables, forecast
the entire expression rather than the normalized vari-
able.
EViews 5.1 Command Reference Update Summary—97

u Substitute expressions for all auto-updating series in the


equation.
g Graph the forecasts together with the ±2 standard error
bands.
e Produce the forecast evaluation table.
i Compute the forecasts of the index. Only for binary,
censored and count models.
s Ignore ARMA terms and use only the structural part of
the equation to compute the forecasts.
n Ignore coefficient uncertainty in computing forecast
standard error.
f = arg Out-of-forecast-sample fill behavior: “actual” (fill obser-
(default= vations outside the forecast sample with actual values
“actual”) for the fitted variable), “na” (fill observations outside
the forecast sample with missing values).
p Print results.

Options for Sspace forecasting


i = arg State initialization options: “o” (one-step), “e” (dif-
(default=”o”) fuse), “u” (user-specified), “s” (smoothed).
m = arg Basic forecasting method: “n” (n-step ahead forecast-
(default=“d”) ing), “s” (smoothed forecasting), “d” (dynamic fore-
casting.
mprior = Name of state initialization (use if option “i=u” is
vector_name specified).
n = arg Number of n-step forecast periods (only relevant if n-
(default=1) step forecasting is specified using the method option).
vprior = Name of state covariance initialization (use if option
sym_name “i=u” is specified).
p Print results.

Examples
The following lines:
smpl 1970q1 1990q4
equation eq1.ls con c con(-1) inc
98—Chapter 6. EViews 5.1 Command Reference Update Summary

smpl 1991q1 1995q4


eq1.fit con_s
eq1.forecast con_d
plot con_s con_d

estimate a linear regression over the period 1970Q1–1990Q4, compute static and dynamic
forecasts for the period 1991Q1–1995Q4, and plot the two forecasts in a single graph.
equation eq1.ls m1 gdp ar(1) ma(1)
eq1.forecast m1_bj bj_se
eq1.forecast(s) m1_s s_se
plot bj_se s_se

estimates an ARMA(1,1) model, computes the forecasts and standard errors with and with-
out the ARMA terms, and plots the two forecast standard errors.

The following command performs n-step forecasting of the signals and states from a
sspace object:

ss1.forecast(m=n,n=4) @state * @signal y1f y2f

Here, we save the state forecasts in the names specified in the sspace object, and we save
the two signal forecasts in the series Y1F and Y2F.

Cross-references
To perform static forecasting with equation objects see fit. For multiple equation forecast-
ing, see makemodel, and solve.

For more information on equation forecasting in EViews, see Chapter 18, “Forecasting
from an Equation” of the User’s Guide. State space forecasting is described in Chapter 25,
“State Space Models and the Kalman Filter” of the User’s Guide. For additional discussion
of wildcards, see Appendix B, “Wildcards” of the User’s Guide.

garch Equation View

Conditional standard deviation graph of (G)ARCH equation.

Displays the conditional standard deviation or conditional variance graph of an equation


estimated by ARCH.

Syntax
Equation View: eq_name.garch(options)
EViews 5.1 Command Reference Update Summary—99

Options
v Display conditional variance graph instead of the stan-
dard deviation graph.
p Print the graph

Examples
equation eq1.arch sp500 c
eq1.garch

estimates a GARCH(1,1) model and displays the estimated conditional standard deviation
graph.

eq1.garch(v, p)

displays and prints the estimated conditional variance graph.

Cross-references
ARCH estimation is described in Chapter 20, “ARCH and GARCH Estimation” of the User’s
Guide.

See also arch and makegarch (p. 111).

hilo Command || Graph Command | Group View | Matrix View | Sym View

Display high-low[-open-close] graph view of object, or change existing graph object type
to high-low[-open-close] (if possible).

Syntax
Command: hilo(options) high_ser low_ser [close_ser]
hilo(options) high_ser low_ser open_ser close_ser
hilo(options) arg
Graph Proc: graph_name.hilo(options)
Object View: object_name.hilo(options)

For a high-low, or a high-low-close graph, follow the command name with the name of the
high series, followed by the low series, and an optional close series. If four series names
are provided, EViews will use them in the following order: high-low-open-close.

When used with a matrix or group or an existing graph, EViews will use the first series as
the high series, the second series as the low series, and if present, the third series as the
close. If there are four or more series, EViews will use them in the following order: high-
100—Chapter 6. EViews 5.1 Command Reference Update Summary

low-open-close. When used as a matrix view, the columns of the matrix are used in place
of the series.

Note that if you wish to display a high-low-open graph, you should use an “NA”-series for
the close values.

Options
Template and printing options
o= template Use appearance options from the specified template.
template may be a predefined template keyword
(‘default” - current global defaults, “classic”, “modern”,
“reverse”, “midnight”, “spartan”, “monochrome”) or a
graph in the workfile.
t=graph_name Use appearance options and copy text and shading from
the specified graph.
b / -b [Apply / Remove] bold modifiers of the base template
style specified using the “o=” option above.
w / -w [Apply / Remove] wide modifiers of the base template
style specified using the “o=” option above.
p Print the graph.

The options which support the “-” may be proceeded by a “+” or “-” indicating whether
to turn on or off the option. The “+” is optional.
Panel Options
The following options apply when graphing panel structured data.
EViews 5.1 Command Reference Update Summary—101

panel=arg Panel data display: “stack” (stack the cross-sections),


(default taken “individual” or “1” (separate graph for each cross-sec-
from global set- tion), “combine” or “c” (combine each cross-section in
tings) single graph; one time axis), “mean” (plot means
across cross-sections), “mean1se” (plot mean and +/-
1 standard deviation summaries), “mean2sd” (plot
mean and +/- 2 s.d. summaries), “mean3sd” (plot
mean and +/- 3 s.d. summaries), “median” (plot
median across cross-sections), “med25” (plot median
and +/- .25 quantiles), “med10” (plot median and +/-
.10 quantiles), “med05” (plot median +/- .05 quan-
tiles), “med025” (plot median +/- .025 quantiles),
“med005” (plot median +/- .005 quantiles), “med-
mxmn” (plot median, max and min).

Examples
hilo mshigh mslow

displays a high-low graph using the series MSHIGH and MSLOW.

hilo(p) mshigh mslow msopen msclose

plots and prints the high-low-open-close graph of the four series.


group stockprice mshigh mslow msclose
stockprice.hilo

displays the high-low-close view of the group STOCKPRICE.

stockprice.hilo(t=templt1)

creates an high-low-close graph view of the group G1, using the settings of the graph
object TEMPLT1 as a template.

Cross-references
See Chapter 1, “EViews 5.1 Enhanced Graph Customization”, on page 33 for additional
details on using graphs in EViews.

See also graph for graph declaration and other graph types.
102—Chapter 6. EViews 5.1 Command Reference Update Summary

legend Graph Proc

Set legend appearance and placement in graphs.

When legend is used with a multiple graph, the legend settings apply to all graphs. See
setelem (p. 126) for setting legends for individual graphs in a multiple graph.

Syntax
Graph Proc: graph_name.legend option_list

Note: the syntax of the legend proc has changed considerably from version 3.1 of EViews.
While not documented here, the EViews 3 options are still (for the most part) supported.
However, we do not recommend using the old options as future support is not guaranteed.

Options
columns(arg) Columns for legend: “auto” (automatically choose num-
(default=“auto”) ber of columns), int (put legend in specified number of
columns).
display/–display Display/do not display the legend.
inbox/–inbox Put legend in box/remove box around legend.
position(arg) Position for legend: “left” or ”l” (place legend on left
side of graph), “right” or “r” (place legend on right side
of graph), “botleft” or “bl” (place left-justified legend
below graph), “botcenter” or “bc” (place centered leg-
end below graph), “botright” or “br” (place right-justi-
fied legend below graph), “(h, v)” (the first number h
specifies the number of virtual inches to offset to the
right from the origin. The second number v specifies
the virtual inch offset below the origin. The origin is the
upper left hand corner of the graph).
font([face], [pt], Set characteristics of legend font. The font name (face),
[+/- b], [+/- i], size (pt), and characteristics are all optional. face
[+/- u], [+/- s]) should be a valid font name, enclosed in double quotes.
pt. should be the font size in points. The remaining
options specify whether to turn on/off boldface (b),
italic (i), underline (u), and strikeout (s) styles.
EViews 5.1 Command Reference Update Summary—103

textcolor(arg) Sets the color of the legend text. arg may be one of the
predefined color keywords, or it may be made up of n1,
n2, n3, a set of three integers from 0 to 255, represent-
ing the RGB values of the color. For a description of the
available color keywords (“blue”, “red”, “green”,
“black”, “white”, “purple”, “orange”, “yellow”, “gray”,
“ltgray”), see setfillcolor.
fillcolor(arg) Sets the background fill color of the legend box. arg
may be one of the predefined color keywords, or it may
be made up of n1, n2, n3, a set of three integers from 0
to 255, representing the RGB values of the color. For a
description of the available color keywords (“blue”,
“red”, “green”, “black”, “white”, “purple”, “orange”,
“yellow”, “gray”, “ltgray”), see setfillcolor.
framecolor(arg) Sets the color of the legend box frame. arg may be one
of the predefined color keywords, or it may be made up
of n1, n2, n3, a set of three integers from 0 to 255, rep-
resenting the RGB values of the color. For a description
of the available color keywords (“blue”, “red”, “green”,
“black”, “white”, “purple”, “orange”, “yellow”, “gray”,
“ltgray”), see setfillcolor.

The options which support the “-” may be proceeded by a “+” or “-” indicating whether
to turn on or off the option. The “+” is optional.

The default settings are taken from the global defaults.

Examples
mygra1.legend display position(l) inbox

places the legend of MYGRA1 in a box to the left of the graph.


mygra1.legend position(.2,.2) -inbox

places the legend of MYGRA1 within the graph, indented slightly from the upper left cor-
ner with no box surrounding the legend text.
mygra1.legend font("Times", 12, b, i) textcolor(red) fill-
color(blue) framecolor(blue)

sets the legend font to red “Times” 12pt bold italic, and changes both the legend fill and
frame colors to blue.
104—Chapter 6. EViews 5.1 Command Reference Update Summary

Cross-references
See Chapter 1, “EViews 5.1 Enhanced Graph Customization”, on page 33 for a discussion
of graph objects in EViews.

See addtext (p. 70) and textdefault (p. 136). See setelem (p. 126) for changing leg-
end text and other graph options.

Command || Coef View | Graph Command | Group View | Matrix View |


line Rowvector View | Series View | Sym View | Vector View

Display a line graph of object, or change existing graph object type to line plot.

The line graph view of a group plots all series in the group in a graph. The line graph view
of a matrix plots each column in the matrix in a graph.

Syntax
Command: line(options) arg1 [arg2 arg3 ...]
Object View: object_name.line(options)
Graph Proc: graph_name.line(options)

Options
Template and printing options
o= template Use appearance options from the specified template.
template may be a predefined template keyword
(‘default” - current global defaults, “classic”, “modern”,
“reverse”, “midnight”, “spartan”, “monochrome”) or a
graph in the workfile.
t=graph_name Use appearance options and copy text and shading from
the specified graph.
b / -b [Apply / Remove] bold modifiers of the base template
style specified using the “o=” option above.
w / -w [Apply / Remove] wide modifiers of the base template
style specified using the “o=” option above.
p Print the line graph.

The options which support the “-” may be proceeded by a “+” or “-” indicating whether
to turn on or off the option. The “+” is optional.
EViews 5.1 Command Reference Update Summary—105

Scale options (for multiple line views of group and matrix objects)
a (default) Automatic single scale.
d Dual scaling with no crossing. The first series is scaled
on the left and all other series are scaled on the right.
x Dual scaling with possible crossing. See the “d” option.
n Normalized scale (zero mean and unit standard devia-
tion). May not be used with the “s” option.
s Stacked line graph. Each area represents the cumulative
total of the series listed. The difference between areas
corresponds to the value of a series. May not be used
with the “l” option.
m Plot lines in multiple graphs (will override the “s” or “l”
options). Not for use with an existing graph object.

Panel options
The following options apply when graphing panel structured data:

panel=arg Panel data display: “stack” (stack the cross-sections),


(default taken “individual” or “1” (separate graph for each cross-sec-
from global set- tion), “combine” or “c” (combine each cross-section in
tings) single graph; one time axis), “mean” (plot means
across cross-sections), “mean1se” (plot mean and +/-
1 standard deviation summaries), “mean2sd” (plot
mean and +/- 2 s.d. summaries), “mean3sd” (plot
mean and +/- 3 s.d. summaries), “median” (plot
median across cross-sections), “med25” (plot median
and +/- .25 quantiles), “med10” (plot median and +/-
.10 quantiles), “med05” (plot median +/- .05 quan-
tiles), “med025” (plot median +/- .025 quantiles),
“med005” (plot median +/- .005 quantiles), “med-
mxmn” (plot median, max and min).

Examples
group g1 gdp cons m1
g1.line(d)

plots line graphs of the three series in group G1 with dual scaling (no crossing). The latter
two series will share the same scale.
106—Chapter 6. EViews 5.1 Command Reference Update Summary

matrix1.line(t=mygra)

displays line graphs of the columns of MATRIX1 using the graph object MYGRA as a tem-
plate.

line(m) gdp cons m1

creates an untitled graph object that contains three line graphs of GDP, CONS, and M1,
with each plotted separately.

g1.line(o=midnight, b, w)

creates a line graph of the group G1, using the settings of the predefined template “mid-
night”, applying the bold and wide modifiers.

Cross-references
See Chapter 1, “EViews 5.1 Enhanced Graph Customization”, on page 33 for a detailed dis-
cussion of graphs in EViews.

See also graph for graph declaration and other graph types.

linkto Link Proc

Define the specification of a series link.

Specify the method by which the object uses data in an existing series. Links are used to
perform cross-page match merging or frequency conversion.

Syntax
Link Proc: link_name.linkto(options) source_page\series_name [src_id
dest_id]
Link Proc: link_name.linkto(options) source_page\series_name [@src src_ids
@dest dest_ids]

The most common use of linkto will be to define a link that employs general match
merging. You should use the keyword linkto followed by any desired options, and then
provide the name of the source series followed by the names of the source and destination
IDs. If more than one identifier series is used, you must separate the source and destina-
tion IDs using the “@SRC” and “@DEST” keywords.

In the special case where you wish to link your data using date matching, you must use
the special keyword “@DATE” as an ID series for a regular frequency page. If “@DATE” is
not specified as either a source or destination ID, EViews will perform an exact match
merge using the specified identifiers.
EViews 5.1 Command Reference Update Summary—107

The other use of linkto will be to define a frequency conversion link between two date
structured pages. To specify a frequency conversion link, you should use the linkto key-
word followed by any desired options and then the name of a numeric source series. You
must not specify ID series since a frequency conversion link uses the implicit dates associ-
ated with the regular frequency pages—if ID series are specified, the link will instead
employ general match merging. Note also that if ID series are not specified, but a general
match merge specific conversion option is provided (e.g., “c=med”), “@DATE @DATE”
will be appended to the list of IDs and a general match merge employed.

It is worth mentioning that a frequency conversion link that uses an alpha source series
will generate an evaluation error.

Note that linking by frequency conversion is the same as linking by general match merge
using the source and destination IDs “@DATE @DATE” with the following exceptions:

• General match merge linking offers contraction methods not available with fre-
quency conversion (e.g., median, variance, skewness).

• General match merge linking allows you to use samples to restrict the source obser-
vations used in evaluating the link.

• General match merge linking allows you to treat NA values in the ID series as a cat-
egory to be used in matching.

• Frequency conversion linking offers expansion methods other than repeat.

• Frequency conversion linking provides options for the handling of NA values.

• Frequency conversion linking uses special handling for panel structured pages. Links
involving panel pages first perform a mean contraction in the source page, if neces-
sary, then a frequency conversion to the destination page, then an expansion in the
destination, if necessary.

Options
General Match Merge Link Options
The following options are available when linking with general match merging:

smpl= Sample to be used when computing contractions during


smpl_spec linkin using match merge. Either provide the sample
range in double quotes or specify a named sample
object. By default, EViews will use the entire workfile
sample “@ALL”.
108—Chapter 6. EViews 5.1 Command Reference Update Summary

c=arg Set the match merge contraction or the frequency con-


version method.
If you are linking a numeric source series by general
match merge, the argument can be one of: “mean”,
“med” (median), “max”, “min”, “sum”, “sumsq” (sum-
of-squares), “var” (variance), “sd” (standard devia-
tion), “skew” (skewness), “kurt” (kurtosis), “quant”
(quantile, used with “quant=” option), “obs” (number
of observations), “nas” (number of NA values), “first”
(first observation in group), “last” (last observation in
group), “unique” (single unique group value, if
present), “none” (disallow contractions).
If linking an alpha series, only the non-summary meth-
ods “max”, “min”, “obs”, “nas”, first”, “last”, “unique”
and “none” are supported. For numeric links, the
default contraction method is “c=mean”; for alpha
links, the default is “c=unique”.
If you are linking by frequency conversion, you may use
this argument to specify the up- or down-conversion
method using the options found in fetch. The default
frequency conversion methods are taken from the series
defaults.
quant=number Quantile value to be used when contracting using the
“c=quant” option (e.g, “quant=.3”).
nacat Treat “NA” values as a category when performing link
by general match merge operations.

Most of the conversion options should be self-explanatory. As for the others: “first” and
“last” give the first and last non-missing observed for a given group ID; “obs” provides the
number of non-missing values for a given group; “nas” reports the number of NAs in the
group; “unique” will provide the value in the source series if it is the identical for all obser-
vations in the group, and will return NA otherwise; “none” will cause the link to fail if
there are multiple observations in any group—this setting may be used if you wish to pro-
hibit all contractions.

On a match merge expansion, linking by ID will repeat the values of the source for every
matching value of the destination. If both the source and destination have multiple values
for a given ID, EViews will first perform a contraction in the source (if not ruled out by
“c=none”), and then perform the expansion by replicating the contracted value in the des-
tination.
EViews 5.1 Command Reference Update Summary—109

Frequency Conversion Link Options


If the linkto command does not specify identifier series, EViews will link series data
using frequency conversion where appropriate.

The following options control the frequency conversion method when creating a frequency
conversion link, converting from low to high frequency:

c=arg Low to high conversion methods: “r” (constant match


average), “d” (constant match sum), “q” (quadratic
match average), “t” (quadratic match sum), “i” (linear
match last), “c” (cubic match last).

The following options control the frequency conversion method when creating a frequency
conversion link, converting from high to low frequency:

c=arg High to low conversion methods removing NAs: “a”


(average of the nonmissing observations), “s” (sum of
the nonmissing observations), “f” (first nonmissing
observation), “l” (last nonmissing observation), “x”
(maximum nonmissing observation), “m” (minimum
nonmissing observation).
High to low conversion methods propagating NAs: “an”
or “na” (average, propagating missings), “sn” or “ns”
(sum, propagating missings), “fn” or “nf” (first, propa-
gating missings), “ln” or “nl” (last, propagating miss-
ings), “xn” or “nx” (maximum, propagating missings),
“mn” or “nm” (minimum, propagating missings).

Note that if no conversion method is specified, the series specific default conversion
method or the global settings will be employed.

Examples
General Match Merge Linking
Let us start with a concrete example. Suppose our active workfile page contains observa-
tions on the 50 states of the US, and contains a series called STATE containing the unique
state identifiers. We also have a workfile page called INDIV that contains data on individu-
als from all over the country, their incomes (INCOME), and their state of birth (BIRTH-
STATE).

Now suppose that we wish to find the median income of males in our data for each possi-
ble state of birth, and then to match merge that value into our 50 observation state page.

The following commands:


110—Chapter 6. EViews 5.1 Command Reference Update Summary

link male_income
male_income.linkto(c=med, smpl="if male=1") indiv\income
birthstate state

create the series link MALE_INCOME. MALE_INCOME contains links to the individual
INCOME data, telling EViews to subsample only observations where MALE=1, to com-
pute median values for individuals in each BIRTHSTATE, and to match observations by
comparing the values of BIRTHSTATE to STATE in the current page.

In this next example, we link to the series X in the INDIV page, matching values of the
IND1 and the IND2 series in the two workfile pages. The link will compute the number of
valid observations in the X series for each index group, with NA values in the ID series
treated as a valid identifier value.

link l1.linkto(c=obs,nacat) indiv\x @src ind1 ind2 @dest ind1


ind2

You may wish to use the “@DATE” keyword as an explicit identifier, in order to gain access
to our expanded date matching feature. In our annual workfile, the command:

link gdp.linkto(c=sd) monthly\gdp @date @date

will create link that computes the standard deviation of the values of GDP for each year
and then match merges these values to the years in the current page. Note that this com-
mand is equivalent to:

link gdp.linkto(c=sd) quarterly\gdp

since the presence of the match merge option “c=sd” and the absence of indices instructs
EViews to perform the link by ID matching using the defaults “@DATE” and “@DATE”.
Frequency Conversion Linking
Suppose that we are in an annual workfile page and wish to link data from a quarterly
page. Then the commands:
link gdp
gdp.linkto quarterly\gdp

creates a series link GDP in the current page containing a link by date to the GDP series in
the QUARTERLY workfile page. When evaluating the link, EViews will automatically fre-
quency convert the quarterly GDP to the annual frequency of the current page, using the
series default conversion options. If we wish to control the conversion method, we can
specify the conversion method as an option:
EViews 5.1 Command Reference Update Summary—111

gdp.linkto(c=s) quarterly\gdp

links to GDP in the QUARTERLY page, and will frequency convert by summing the non-
missing observations.

Cross-references
For a detailed discussion of linking, see Chapter 8, “Series Links” of the User’s Guide.

See also link, unlink, and copy (p. 79).

makegarch Equation Proc

Generate conditional variance series.

Saves the estimated conditional variance (from an equation estimated using ARCH) as a
named series.

Syntax
Equation Proc: eq_name.makegarch series1_name [@ series2_name]

You should provide a name for the saved conditional standard deviation series following
the makegarch keyword. If you do not provide a name, EViews will name the series using
the next available name of the form “GARCH##” (if GARCH01 already exists, it will be
named GARCH02, and so on).

For component GARCH equations, the permanent component portion of the conditional
variance may be saved by adding "@" followed by a series name.

Examples
equation eq1.arch sp c
eq1.makegarch cvar
plot cvar^.5

estimates a GARCH(1,1) model, saves the conditional variance as a series named CVAR,
and plots the conditional standard deviation. If you merely wish to view a plot of the con-
ditional standard deviation without saving the series, use the garch (p. 98) view.

The commands
equation eq1.arch(cgarch) sp c
eq1.makegarch cvar @ pvar
112—Chapter 6. EViews 5.1 Command Reference Update Summary

first estimates a Component GARCH model and then saves both the conditional variance
and the permanent component portion of the conditional variance in the series CVAR and
PVAR, respectively.

Cross-references
See Chapter 20, “ARCH and GARCH Estimation” of the User’s Guide for a discussion of
GARCH models.

See also arch, archtest, and garch (p. 98).

makemap Alpha Series

Create numeric classification series and valmap from alpha series.

Syntax
Alpha Proc: alpha_name.makemap(options) ser_name map_name

creates a classification series ser_name and an associated valmap map_name in the work-
file. The valmap will automatically be assigned to the series.

Options
nosort Do not sort the alpha series values in alphabetical order
before assigning the map (default is to sort).

Examples
stateabbrev.makemap statecodes statemap

creates a series STATECODES containing numeric coded values representing the states in
STATEABBREV, and an associated valmap STATEMAP.

Cross-references
See “Alpha Series” on page 145 of the User’s Guide for a discussion of alpha series. See
“Value Maps” on page 155 of the User’s Guide for a discussion of valmaps.
EViews 5.1 Command Reference Update Summary—113

pagecreate Command

Create a new page in the default workfile. The new page becomes the active page.

Syntax
Command: pagecreate(options) freq start_date end_date [num_cross_sections]
Command: pagecreate(options) u num_observations
Command: pagecreate(id_method[,options]) id_list [@srcpage page_list]
Command: pagecreate(idcross[,options]) id1 id2 [@srcpage page1 page2]
Command: pagecreate(idcross[,options]) id1 @range(freq, start_date,
end_date) [@srcpage page1]

These different forms of the pagecreate command encompass three distinct approaches
to creating a new workfile page: (1) regular frequency description or unstructured data
description; (2) using the union or intersection of unique values from one or more ID
series in existing workfile pages; (3) using the cross of unique values from two identifier
series or from an identifier series and a date range. Each of these approaches is described
in greater detail below.
Regular Frequency or Unstructured Description
The first two forms of the command permit you to create a new workfile page using a reg-
ular frequency or unstructured description:

• pagecreate(options) freq start_date end_date [num_cross_sections]

• pagecreate(options) u num_observations

The first form of the command should be employed to create a regular frequency page with
the specified frequency, start, and end date. The freq argument may be specified as “a”
(annual), “s” (semi-annual), “q” (quarterly), “m” (monthly), “w” (weekly), “d” (5-day
daily), “7” (7-day daily). If you include the optional argument num_cross_sections, EViews
will create a balanced panel page using integer identifiers for each of the cross-sections.
Note that more complex panel structures may be defined using pagestruct.

The second form of the command creates an unstructured workfile with the specified num-
ber of observations.

Note that these forms of the command are analogous to wfcreate except that instead of
creating a new workfile, we create a new page in the default workfile.
114—Chapter 6. EViews 5.1 Command Reference Update Summary

Unique Values from a Set of Identifier Series


The next form of the command allows for creating pages from the unique values of one or
more identifier series found in one or more workfile pages:

• pagecreate(id_method[,options]) identifier_list [@srcpage page_list]

The identifier_list should include one or more ID series. If more than one ID series is pro-
vided, EViews will use the values that are unique across all of the series. If you wish to cre-
ate a page with a date structure, you should specify one of your identifiers using the special
“@DATE” keyword identifier, enclosing the series (or the date ID component series) inside
parentheses. If you wish to use the date ID values from the source workfile page, you may
use the “@DATE” keyword without arguments.

The id_method describes how to handle unique ID values that differ across multiple pages:

byid Use the observed values of the series in the


identifier_list in specified page.
idunion / byid Use the union of the observed values of the series in the
identifier_list in the specified pages.
idintersect Use the intersection of the observed values of the series
in the identifier_list in the specified pages.

If the optional source page or list of source pages is not provided, EViews will use the
default workfile page. Note that if a single workfile page is used, the two ID methods yield
identical results.
Cross of Unique Values from Two Identifier Series or from an Identifier Series and a Date Range
The last two forms of the command create a new page by crossing the unique values in
two ID series located in one or more pages, or by crossing an ID series from one page with
a date range. First, you may specify a pair of identifiers, and optionally source pages where
they are located,

• pagecreate(idcross[,options]) id1 id2 [@srcpage page1 page2]

You may instruct EViews to create a date structured page by specifying one of your two
identifiers using a “@DATE” specification as described above.

Alternately, you may provide a single identifier and a range specification using the
“@RANGE” keyword with a freq, start_date, and end_date, and optionally, the location of
the identifier series.

• pagecreate(idcross[,options]) id1 @range(freq, start_date, end_date) [@srcpage


page1]
EViews 5.1 Command Reference Update Summary—115

Options
smpl=smpl_spec Specifies an optional sample identifying which observa-
tions to use when creating a page using the id_method
option. Either provide the sample range in double
quotes or specify a named sample object. The default is
“@all”. When multiple source workfiels are involved,
the specified sample must be valid for all workfiles.
page=page_name Optional name for the newly created page. If not pro-
vided, EViews will use the next available name of the
form “Untitled##”, where ## is a number.

Examples
Regular Frequency or Unstructured Description
The two commands:
pagecreate(page=annual) a 1950 2005
pagecreate(page=unstruct) u 1000

create new pages in the existing workfile. The first page is an annual page named
ANNUAL, containing data from 1950 to 2005; the second is a 1000 observation unstruc-
tured page named UNSTRUCT.

pagecreate(page=mypanel) a 1935 1954 10

creates a new workfile page named MYPANEL, containing a 10 cross-section annual panel
for the years 1935 to 1954.
Unique Values from a Set of Identifier Series
pagecreate(id, page=statepage) state

creates a new page STATEIND using the distinct values of STATE in the current workfile
page.

pagecreate(id, page=statepage) state industry

creates a new page named STATEIND, using the distinct STATE/INDUSTRY values in the
active page.
pagecreate(id, page=stateyear) state @date(year)
pagecreate(id, page=statemonth) @date(year, month)

use STATE, along with YEAR, and the YEAR and MONTH series respectively, to form iden-
tifiers that will be used in creating the new dated workfile pages.
116—Chapter 6. EViews 5.1 Command Reference Update Summary

pagecreate(id, smpl="if sex=1") crossid @date

creates a new page using CROSSID and existing date ID values of the active workfile page.
Note that only observations in the subsample defined by “@all if sex=1” are used to
determine the unique values.

pagecreate(id, page=AllStates, smpl="if sex=""Female""")


stateid @srcpage north south east west

creates a new page ALLSTATES structured using the union of the unique values of
STATEID from the NORTH, SOUTH, EAST and WEST workfile pages that are in the sample
“if sex="Female"”. Note the use of the double quote escape character for the double
quotes in the sample string.

pagecreate(idintersect, page=CommonStates, smpl="1950 2005")


stateid @srcpage page1 page2 page3

creates a new page name COMMONSTATES structured using the intersection of the unique
values of STATEID taken from the pages PAGE1, PAGE2, and PAGE3.
Cross of Unique Values from Two Identifier Series or from an Identifier Series and a Date Range
pagecreate(idcross,page=UndatedPanel) id1 id2 @srcpage page1
page2

will add the new page UNDATEDPANEL to the current workfile. UNDATEDPANEL will be
structured as an undated panel using values from the cross of ID1 from PAGE1 and ID2
from PAGE2.

To create a dated page using the “idcross” option, you must tag one of the identifiers using
an “@DATE” specification:

pagecreate(idcross,page=AnnualPanel) id1 @date(year) @srcpage


page1 page2

You may also specify the cross of an identifier with a date range:

pagecreate(idcross,page=QuarterlyPanel) id1
@range(q, 1950, 2006) @srcpage page1

creates a quarterly panel page named QUARTERLYPANEL using the cross of ID1 taken
from PAGE1, and quarterly observations from 1950q1 to 2006q4.

Cross-references
See “Creating a Workfile Page” of the User’s Guide for discussion.

See also wfcreate and pagedelete.


EViews 5.1 Command Reference Update Summary—117

options Graph Proc

Set options for a graph object.

Allows you to change the option settings of an existing graph object. When options is
used with a multiple graph, the options are applied to all graphs.

Syntax
Graph Proc: graph_name.options option_list

Note: the syntax of the options proc has changed considerably from version 3.1 of
EViews. While not documented here, the EViews 3 options are still (for the most part) sup-
ported. However, we do not recommend using the old options, as future support is not
guaranteed.

Options
Basic Graph Options
size(w, h) Specifies the size of the plotting frame in virtual inches
(w=width, h=height).
lineauto Use solid lines when drawing in color and use patterns
and grayscale when drawing in black and white.
linesolid Always use solid lines.
linepat Always use line patterns.
color / -color Specifies that lines/filled areas [use / do not use] color.
Note that if the “lineauto” option option is specified,
this choice will also influence the type of line or filled
area drawn on screen: if color is specified, solid colored
lines and filled areas will be drawn; if color is turned
off, lines will be drawn using black and white line pat-
terns, and gray scales will be used for filled areas.
barlabelabove / [Place / Do not place] text value of data above bar in
-barlabelabove bar graph.
barlabelinside / [Place / Do not place] text value of data inside bar in
-barlabelinside bar graph.
outlinebars / [Outline / Do not outline] bars in a bar graph.
-outlinebars
118—Chapter 6. EViews 5.1 Command Reference Update Summary

outlinearea / [Outline / Do not outline] areas in an area graph.


-outlinearea
barspace / [Put / Do not put] space between bars in bar graph.
-barspace
pielabel / [Place / Do not place] text value of data in pie chart.
-pielabel

Graph Grid Options


gridl / -gridl [Turn on / Turn off] grid lines on the left scale.
gridr / -gridr [Turn on / Turn off] grid lines on the right scale.
gridv / -gridv [Turn on / Turn off] grid lines on the vertical scale.
gridcolor(arg) Sets the grid line color. arg may be one of the pre-
defined color keywords, or it may be made up of n1,
n2, n3, a set of three integers from 0 to 255, represent-
ing the RGB values of the color. For a description of the
available color keywords (“blue”, “red”, “green”,
“black”, “white”, “purple”, “orange”, “yellow”, “gray”,
“ltgray”), see setfillcolor.
gridwidth(n) Sets the width of the grid lines in points. n should be a
number between 0.25 and 5.
gridpat(index) Sets the line pattern for grid lines to the type specified
by index. index can be an integer from 1 to 12 or one of
the matching keywords (“solid”, “dash1” through
“dash10”, “none”). See setelem (p. 126) for a descrip-
tion of the available patterns. The “none” keyword
turns on solid lines.

Background and Frame Options


fillcolor(arg) Sets the fill color of the graph frame. arg may be one of
the predefined color keywords, or it may be made up of
n1, n2, n3, a set of three integers from 0 to 255, repre-
senting the RGB values of the color. For a description of
the available color keywords (“blue”, “red”, “green”,
“black”, “white”, “purple”, “orange”, “yellow”, “gray”,
“ltgray”), see setfillcolor.
EViews 5.1 Command Reference Update Summary—119

backcolor(arg) Sets the background color of the graph. arg may be one
of the predefined color keywords, or it may be made up
of n1, n2, n3, a set of three integers from 0 to 255, rep-
resenting the RGB values of the color. For a description
of the available color keywords (“blue”, “red”, “green”,
“black”, “white”, “purple”, “orange”, “yellow”, “gray”,
“ltgray”), see setfillcolor.
framecolor(arg) Sets the background color of the graph frame. arg may
be one of the predefined color keywords, or it may be
made up of n1, n2, n3, a set of three integers from 0 to
255, representing the RGB values of the color. For a
description of the available color keywords (“blue”,
“red”, “green”, “black”, “white”, “purple”, “orange”,
“yellow”, “gray”, “ltgray”), see setfillcolor.
framewidth(n) Sets the width of the graph frame in points. n should be
a number between 0.25 and 5.
frameaxes(arg) Specifies which frame axes to display. arg may be one
of the keywords: “all”, “none”, or “labeled” (all axes
that have labels), or any combination of letters “l”
(left), “r” (right), “t” (top), and “b” (bottom), e.g. “lrt”
for left, right and top.
indenth(n) Sets the horizontal indentation of the graph from the
graph frame in virtual inches. n should be a number
between 0 and 0.75.
indentv(n) Sets the vertical indentation of the graph from the graph
frame in virtual inches. n should be a number between
0 and 0.75.
background / [Include / Do not include] the background color when
-background exporting or printing the graph.

The options which support the “-” may be proceeded by a “+” or “-” indicating whether
to turn on or off the option. The “+” is optional.

Data labels in bar and pie graphs will only be visible when there is sufficient space in the
graph.

Examples
graph1.option size(4,4) +inbox color

sets GRAPH1 to use a 4 × 4 frame enclosed in a box. The graph will use color.
120—Chapter 6. EViews 5.1 Command Reference Update Summary

graph1.option linepat -color size(2,8) -inbox

sets GRAPH1 to use a 2 × 8 frame with no box. The graph does not use color, with the
lines instead being displayed using patterns.

graph1.option fillcolor(gray) backcolor(192, 192, 192)


framecolor(blue)

sets the fill color of the graph frame to gray, the background color of the graph to the RGB
values 192, 192, and 192, and the graph frame color to blue.

graph1.option gridpat(3) gridl -gridv

isplay left scale grid lines using line pattern 3 (“dash2”) and turn off display of vertical grid
lines.

graph1.option indenth(.5) frameaxes(lb) framewidth(.5)


gridwidth(.25)

indents the graph .5 virtual inches from the frame, displays left and bottom frame axes of
width .5 points, and sets the gridline width to .25 points.

Cross-references
See Chapter 1, “EViews 5.1 Enhanced Graph Customization”, on page 33 for a discussion
of graph options in EViews.

See also axis (p. 75), datelabel, scale, setelem (p. 126), and setfillcolor.

Command || Graph Command | Group View | Matrix View | Rowvector


pie View | Sym View

Display pie graph view of data in object, or change existing graph object type to pie chart.

Display pie charts for any number of series or data in a matrix object. There will be one pie
for each date or observation number, or each row of a matrix, provided the values are pos-
itive. Each series or column is shown as a wedge in a different color/pattern, where the
width of the wedge equals the percentage contribution of the series/column to the total of
all listed series.

Syntax
Command: pie(options) arg1 [arg2 arg3 ...]
Object View: object_name.pie(options)
Graph Proc: graph_name.pie(options)
EViews 5.1 Command Reference Update Summary—121

To use pie as a command, simply list the name of one or more series or groups, or a
matrix object to include in the pie chart. You may also change the exiting graph type by
using pie as a proc. Simply list the graph name, followed by a period, and the pie key-
word.

Options
o= template Use appearance options from the specified template.
template may be a predefined template keyword
(‘default” - current global defaults, “classic”, “modern”,
“reverse”, “midnight”, “spartan”, “monochrome”) or a
graph in the workfile.
t=graph_name Use appearance options and copy text and shading from
the specified graph.
b / -b [Apply / Remove] bold modifiers of the base template
style specified using the “o=” option above.
w / -w [Apply / Remove] wide modifiers of the base template
style specified using the “o=” option above.
p Print the pie graph.

The options which support the “-” may be proceeded by a “+” or “-” indicating whether
to turn on or off the option. The “+” is optional.
Panel options
The following options apply when graphing panel structured data.

panel=arg Panel data display: “stack” (stack the cross-sections),


(default taken “individual” or “1” (separate graph for each cross-sec-
from global set- tion), “combine” or “c” (combine each cross-section in
tings) single graph; one time axis), “mean” (plot means
across cross-sections), “mean1se” (plot mean and +/-
1 standard deviation summaries), “mean2sd” (plot
mean and +/- 2 s.d. summaries), “mean3sd” (plot
mean and +/- 3 s.d. summaries), “median” (plot
median across cross-sections), “med25” (plot median
and +/- .25 quantiles), “med10” (plot median and +/-
.10 quantiles), “med05” (plot median +/- .05 quan-
tiles), “med025” (plot median +/- .025 quantiles),
“med005” (plot median +/- .005 quantiles), “med-
mxmn” (plot median, max and min).
122—Chapter 6. EViews 5.1 Command Reference Update Summary

Examples
smpl 1990 1995
pie cons inv gov

shows six pie charts, each divided into CONS, INV, and GOV.
graph gr1.line cons inv gov
gr1.pie

creates a line graph GR1 and then changes the graph to a pie chart.
gr1.pie(o=midnight, b, w)

creates a pie graph using the group G1, applying the settings of the predefined template
“midnight”, with the bold and wide modifiers.

Cross-references
See Chapter 1, “EViews 5.1 Enhanced Graph Customization”, on page 33 of the User’s
Guide for a discussion of graphs and templates.

See also graph for graph declaration and other graph types.

ranhaus Equation View | Pool View

Test for correlation between random effects and regressors using Hausman test.

Tests the hypothesis that the random effects (components) are correlated with the right-
hand side variables in a panel or pool equation setting. Uses Hausman test methodology to
compare the results from the estimated random effects specification and a corresponding
fixed effects specification. If the estimated specification involves two-way random effects,
three separate tests will be performed; one for each set of effects, and one for the joint
effects.

Only valid for panel or pool regression equations estimated with random effects. Note that
the test results may be suspect in cases where robust standard errors are employed.

Syntax
Object View: eq_name.ranhaus(options)

Options
p Print output from the test.
EViews 5.1 Command Reference Update Summary—123

Examples
equation eq1.ls(cx=r) sales c adver lsales
eq1.ranhaus

estimates a specification with cross-section random effects and tests whether the random
effects are correlated with the right-hand side variables ADVER and LSALES using the
Hausman test methodology.

Cross-references
See also testadd (p. 134), testdrop (p. 135), fixedtest (p. 95), and wald.

Command || Graph Command | Group View | Matrix View | Rowvector


scat View| Sym View

Display scatterplot graph of object, or change existing graph object type to scatterplot (if
possible).

By default, the first series or column of data will be located along the horizontal axis, and
the remaining data on the vertical axis. You may optionally choose to plot the data in pairs,
where the first two series or columns are plotted against each other, the second two series
or columns are plotted against each other, and so forth.

Syntax
Command: scat(options) arg1 [arg2 arg3 ...]
Object View: group_name.scat(options)
Graph Proc: graph_name.scat(options)

If used as a command, follow the keyword by a list of series and group objects, or by a
matrix object. There must be at least two series or columns in the data to be graphed.

Scatterplots are simply XY plots (see xy (p. 137)) with symbols turned on, and lines
turned off (see setelem (p. 126)).

Options
Template and printing options
o= template Use appearance options from the specified template.
template may be a predefined template keyword
(‘default” - current global defaults, “classic”, “modern”,
“reverse”, “midnight”, “spartan”, “monochrome”) or a
graph in the workfile.
124—Chapter 6. EViews 5.1 Command Reference Update Summary

t=graph_name Use appearance options and copy text and shading from
the specified graph.
b / -b [Apply / Remove] bold modifiers of the base template
style specified using the “o=” option above.
w / -w [Apply / Remove] wide modifiers of the base template
style specified using the “o=” option above.
p Print the scatterplot graph.

The options which support the “-” may be proceeded by a “+” or “-” indicating whether
to turn on or off the option. The “+” is optional.

Note that use of the template option will override the symbol setting.
Scale options

a (default) Automatic single scale.


b Plot series or columns in pairs (the first two against
each other, the second two against each other, and so
forth).
n Normalized scale (zero mean and unit standard devia-
tion). May not be used with the “s” option.
d Dual scaling with no crossing.
x Dual scaling with possible crossing.
m Display XY plots in multiple graphs (will override the
“s” option). Not for use with an existing graph object.

Panel options
The following options apply when graphing panel structured data.
EViews 5.1 Command Reference Update Summary—125

panel=arg Panel data display: “stack” (stack the cross-sections),


(default taken “individual” or “1” (separate graph for each cross-sec-
from global set- tion), “combine” or “c” (combine each cross-section in
tings) single graph; one time axis), “mean” (plot means
across cross-sections), “mean1se” (plot mean and +/-
1 standard deviation summaries), “mean2sd” (plot
mean and +/- 2 s.d. summaries), “mean3sd” (plot
mean and +/- 3 s.d. summaries), “median” (plot
median across cross-sections), “med25” (plot median
and +/- .25 quantiles), “med10” (plot median and +/-
.10 quantiles), “med05” (plot median +/- .05 quan-
tiles), “med025” (plot median +/- .025 quantiles),
“med005” (plot median +/- .005 quantiles), “med-
mxmn” (plot median, max and min).

Examples
scat unemp inf want

produces an UNTITLED graph object containing a scatter plot, with UNEMP on the hori-
zontal and INF and WANT on the vertical axis.
group med age height weight
med.scat(t=scat2)

produces a scatter plot view of the group object MED, using the graph object SCAT2 as a
template.
group pairs age height weight length
pairs.scat(b)

produces a scatter plot view with AGE plotted against HEIGHT, and WEIGHT plotted
against LENGTH.

If there is an existing graph GRAPH01, the expression:

graph01.scat(b)

changes its type to a scatterplot with data plotted in pairs (if possible), with the remaining
XY graph settings at their default values.

Cross-references
See Chapter 1, “EViews 5.1 Enhanced Graph Customization”, on page 33 for a discussion
of graphs and templates.
126—Chapter 6. EViews 5.1 Command Reference Update Summary

See xy (p. 137), and graph for graph declaration and modification, and additional graph
types. See also xyline (p. 140) for XY line graphs.

setelem Graph Proc

Set individual line, bar and legend options for each series in the graph.

Syntax
Graph Proc: graph_name.setelem(graph_elem) argument_list

where graph_elem is the identifier for the graph element whose options you wish to mod-
ify:

integer Index for graph element (for non-boxplot graphs). For


example, if you provide the integer “2”, EViews will
modify the second line in the graph.
box_elem Boxplot element to be modified: box (“b”), median
(“med”), mean (“mean”), near outliers (“near” or
“no”), far outliers (“far” or “fo”), whiskers (“w”), sta-
ples (“s”). For boxplot graphs only.

The argument list for setelem may contain one or more of the following:

symbol(arg) Sets the drawing


symbol: arg can be
an integer from 1–
13, or one of the
matching keywords.
Selecting a symbol
automatically turns
on symbol use. The
“none” option turns
off symbol use.
EViews 5.1 Command Reference Update Summary—127

linecolor(args), Sets the line and symbol color. The args value may set
lcolor(args) by using one of the color keywords (e.g., “blue”), or by
using the RGB values (e.g., “@RGB(255, 255, 0)”). For
a description of the available color keywords (“blue”,
“red”, “green”, “black”, “white”, “purple”, “orange”,
“yellow”, “gray”, “ltgray”). For a full description of the
keywords, see setfillcolor.
linewidth(n1), Sets the line and symbol width: n1 should be a number
lwidth(n1) between “.25” and “5”, indicating the width in points.
linepattern(arg), Sets the line pattern to
lpat(arg) the type specified by arg.
arg can be an integer
from 1–12 or one of the
matching keywords.
Note that the option inter-
acts with the graph
options for “color”, “lin-
eauto”, “linesolid”, “line-
pat” (see options
(p. 117), for details). You
may need to set the graph
option for “linepat” to
enable the display of line patterns. See options
(p. 117).
Note also that the patterns with index values 7–11 have
been modfied since version 5.0. In particular, the
“none” option has been moved to position 12.
The “none” option turns off lines and uses only sym-
bols.
fillcolor(arg), Sets the fill color for symbols, bars, and pies. The args
fcolor(arg) value may set by using of the color keywords (“blue”,
“red”, “green”, “black”, “white”, “purple”, “orange”,
“yellow”, “gray”, “ltgray”) or by using the RGB values
(e.g., “@RGB(255, 255, 0)”). For a full description of
the keywords, see setfillcolor
128—Chapter 6. EViews 5.1 Command Reference Update Summary

fillgray(n1), Sets the gray scale for bars and


gray(n1) pies: n1 should be an integer
from 1–15 corresponding to one
of the predefined gray scale set-
tings (from lightest to darkest).

fillhatch(arg), Sets the hatch character-


hatch(arg) istics for bars and pies:
arg can be an integer
from 1–7, or one of the
matching keywords.

preset(n1) Sets line and fill characteristics to the specified EViews


preset values, where n1 is an integer from 1–30. Simul-
taneously sets “linecolor”, “linepattern”, “linewidth”,
“symbol”, “fillcolor”, “fillgray”, and “fillhatch” to the
EViews predefined definitions for graph element n1.
When applied to boxplots, the line color of the specified
element will be applied to the box, whiskers, and sta-
ples.
EViews 5.1 Command Reference Update Summary—129

default(n1) Sets line and fill characteristics to the specified user-


defined default settings where n1 is an integer from 1–
30. Simultaneously sets “linecolor”, “linepattern”, “lin-
ewidth”, “symbol”, “fillcolor”, “fillgray”, and “fill-
hatch” to the values in the user-defined global defaults
for graph element n1.
When applied to boxplots, the line color of the specified
settings will be applied to the box, whiskers, and sta-
ples.
axis(arg), Assigns the element to an axis: left (“l”), right (“r”),
axisscale(arg) bottom (“b”), top (“t”). The latter two options are only
applicable for XY and scatter graphs (scat (p. 123), xy
(p. 137), xyline (p. 140), xypair (p. 143)).
legend(str) Assigns legend text for the element. str will be used in
the legend to label the element.

Examples
graph1.setelem(2) lcolor(blue) lwidth(2) symbol(circle)

sets the second line of GRAPH1 to be a blue line of width 2 with circle symbols.
graph1.setelem(1) lcolor(blue)
graph1.setelem(1) linecolor(0, 0, 255)

are equivalent methods of setting the linecolor to blue.

graph1.setelem(1) fillgray(6)

sets the gray-scale color for the first graph element.

The lines:
graph1.setelem(1) scale(l)
graph1.setelem(2) scale(l)
graph1.setelem(3) scale(r)

create a dual scale graph where the first two series are scaled together and labeled on the
left axis, and the third series is scaled and labeled on the right axis.
graph1.setelem(2) legend("gross domestic product")

sets the legend for the second graph element.


130—Chapter 6. EViews 5.1 Command Reference Update Summary

Cross-references
See Chapter 1, “EViews 5.1 Enhanced Graph Customization”, on page 33 for a discussion
of graph options in EViews.

See also axis (p. 75), datelabel, scale, and options (p. 117).

Command || Coef View | Graph Command | Group View | Matrix View |


spike Rowvector View | Series View | Sym View | Vector View

Display spike graph view of data, or change existing graph object type to spike.

The spike graph view of a series or group creates spike graphs for all specified series or
matrix columns.

Syntax
Command: spike arg1 [arg2 arg3 ...]
Object View: object_name.spike(options)
Graph Proc: graph_name.spike(options)

Options
Template and printing options
o= template Use appearance options from the specified template.
template may be a predefined template keyword
(‘default” - current global defaults, “classic”, “modern”,
“reverse”, “midnight”, “spartan”, “monochrome”) or a
graph in the workfile.
t=graph_name Use appearance options and copy text and shading from
the specified graph.
b / -b [Apply / Remove] bold modifiers of the base template
style specified using the “o=” option above.
w / -w [Apply / Remove] wide modifiers of the base template
style specified using the “o=” option above.
p Print the spike graph.

The options which support the “-” may be proceeded by a “+” or “-” indicating whether
to turn on or off the option. The “+” is optional.
Scale options
a (default) Automatic single scale.
EViews 5.1 Command Reference Update Summary—131

d Dual scaling with no crossing. The first series is scaled


on the left and all other series are scaled on the right.
x Dual scaling with possible crossing. See the “d” option.
n Normalized scale (zero mean and unit standard devia-
tion). May not be used with the “s” option.
s Stacked spike graph. Each segment represents the
cumulative total of the series listed (may not be used
with the “l” option).
l Spike graph for the first series listed and a line graph for
all subsequent series (may not be used with the “s”
option).
m Plot spikes in multiple graphs (will override the “l”
option). Not for use with an existing graph object.

Panel options
The following options apply when graphing panel structured data.

panel=arg Panel data display: “stack” (stack the cross-sections),


(default taken “individual” or “1” (separate graph for each cross-sec-
from global set- tion), “combine” or “c” (combine each cross-section in
tings) single graph; one time axis), “mean” (plot means
across cross-sections), “mean1se” (plot mean and +/-
1 standard deviation summaries), “mean2sd” (plot
mean and +/- 2 s.d. summaries), “mean3sd” (plot
mean and +/- 3 s.d. summaries), “median” (plot
median across cross-sections), “med25” (plot median
and +/- .25 quantiles), “med10” (plot median and +/-
.10 quantiles), “med05” (plot median +/- .05 quan-
tiles), “med025” (plot median +/- .025 quantiles),
“med005” (plot median +/- .005 quantiles), “med-
mxmn” (plot median, max and min).

Examples
group g1 gdp cons m1
g1.spike(d)

plots line graphs of the three series in group G1 using dual scaling.
132—Chapter 6. EViews 5.1 Command Reference Update Summary

matrix1.spike(t=mygra)

displays spike graphs of the columns of MATRIX1 using the graph object MYGRA as a tem-
plate.

graph1.spike(d)

changes GRAPH1 so that it contains spike graphs of each of the series in the original
graph, using dual scaling.

g1.spike(o=midnight, b, w)

creates a spike graph of the group G1, using the settings of the predefined template “mid-
night”, applying the bold and wide modifiers.

Cross-references
See Chapter 1, “EViews 5.1 Enhanced Graph Customization”, on page 33 for a detailed dis-
cussion of graphs in EViews.

See also graph for graph declaration and additional graph types.

template Graph Proc

Apply a template to a graph object.

If you apply template to a multiple graph object, the template options will be applied to
each graph in the multiple graph. If the template graph is a multiple graph, the options of
the first graph will be used.

Syntax
Graph Proc: graph_name.template(options) template

Follow the name of the graph to which you want to apply the template options with a
period, the keyword template, and the name of a graph template. template may be one of
the predefined template keywords: “default” (current global defaults), “classic”, “mod-
ern”, “reverse”, “midnight”, “spartan”, “monochrome”, or a named graph in the workfile.

Options
t Replace text and line/shade objects with those of
the template graph, when template is the name of a
graph in the workfile.
e Apply template settings to existing text and line/
shade options.
EViews 5.1 Command Reference Update Summary—133

b / -b [Apply / Remove] bold modifiers of the specified


predefined template style.
w / -w [Apply / Remove] wide modifiers of the specified
predefined template style.

The options which support the “-” may be proceeded by a “+” or “-” indicating whether
to turn on or off the option. The “+” is optional.

Examples
gra_cs.template gra_gdp

applies the option settings in the graph object GRA_GDP to the graph GRA_CS. Text and
line shading options from GRA_GDP will be applied to GRA_CS, but the characteristics of
existing text and line/shade objects in GRA_CS will not be modified. Text and shading
objects include those added with the addtext (p. 70) or draw (p. 87) commands.

g1.template(t) mygraph1

applies the option settings of MYGRAPH1, and all text and shadings in the template graph,
to the graph G1. Note that the “t” option overwrites any existing text and shading objects
in the target graph.

graph1.template(e) modern

applies the predefined template “modern” to GRAPH1, also changing the settings of exist-
ing text and line/shade objects in the graph.
graph1.template(e, b, w) reverse

applies the predefined template “reverse” to GRAPH1, with the bold and wide modifiers.
Any existing text and line/shade objects in GRAPH1 are also modified to use the object set-
tings of the monochrome template.

graph1.template(-w) monochrome

applies the monochrome settings to GRAPH1, removing the wide modifier.

If you are using a boxplot as a template for another graph type, or vice versa, note that the
graph types and boxplot specific attributes will not be changed. In addition, when the “t”
option is used, vertical lines or shaded areas will not be copied between the graphs, since
the horizontal scales differ.

Cross-references
See “Graph Templates” on page 38 for additional discussion.
134—Chapter 6. EViews 5.1 Command Reference Update Summary

testadd Command || Equation View | Pool View

Test whether to add regressors to an estimated equation.

Tests the hypothesis that the listed variables were incorrectly omitted from an estimated
equation (only available for equations estimated by list). The test displays some combina-
tion of Wald and LR test statistics, as well as the auxiliary regression.

Syntax
Command: testadd(options) arg1 [arg2 arg3 ...]
Equation View: eq_name.testadd(options) arg1 [arg2 arg3 ...]
Pool View: pool_name.testadd(options) [x1 x2 ...] [@cxreg z1 z2 ...] [@perreg
z3 z4 ...]

List the names of the series or groups of series to test for omission after the keyword. The
command form applies the test to the default equation, if defined.

Options
p Print output from the test.

Examples
ls sales c adver lsales ar(1)
testadd gdp gdp(-1)

tests whether GDP and GDP(-1) belong in the specification for SALES. The commands:
equation oldeq.ls sales c adver lsales ar(1)
oldeq.testadd gdp gdp(-1)

perform the same test using a named equation object.


pool1.testadd gdp? @cxreg inc?

tests the addition of the pool series GDP? to the common coefficients list and INC? to the
cross-section specific coefficients list.

Cross-references
See “Coefficient Tests” of the User’s Guide for further discussion.

See also testdrop (p. 135) and wald.


EViews 5.1 Command Reference Update Summary—135

testdrop Command || Equation View | Pool View

Test whether to drop regressors from a regression.

Tests the hypothesis that the listed variables were incorrectly included in the estimated
equation (only available for equations estimated by list). The test displays some combina-
tion of F and LR test statistics, as well as the test regression.

Syntax
Command: testdrop(options) arg1 [arg2 arg3 ...]
Object View: eq_name.testdrop(options) arg1 [arg2 arg3 ...]

List the names of the series or groups of series to test for omission after the keyword. The
command form applies the test to the default equation, if defined.

Options
p Print output from the test.

Examples
ls sales c adver lsales ar(1)
testdrop adver

tests whether ADVER should be excluded from the specification for SALES. The com-
mands:
equation oldeq.ls sales c adver lsales ar(1)
oldeq.testdrop adver

perform the same test using a named equation object.

pool1.testdrop(p) x?

drops X? from the existing pool specification and prints the results of the test.

Cross-references
See “Coefficient Tests” of the User’s Guide for further discussion of testing coefficients.

See also testadd (p. 134) and wald.


136—Chapter 6. EViews 5.1 Command Reference Update Summary

textdefault Graph Proc

Change default settings for text objects in the graph.

This command specifies changes in the default settings which will be applied to text
objects added subsequently to the graph. If you include the “existing” option, all of the
text default settings will also be applied to existing text objects in the graph.

Syntax
Graph Proc: graph_name.textdefault text_options

where text_options include one or more of one of the following:

font([face], [pt], Set characteristics of default text font. The font name
[+/- b], [+/- i], (face), size (pt), and characteristics are all optional.
[+/- u], [+/- s]) face should be a valid font name, enclosed in double
quotes. pt. should be the font size in points. The
remaining options specify whether to turn on/off bold-
face (b), italic (i), underline (u), and strikeout (s)
styles.
textcolor(arg) Sets the default color of the text. arg may be one of the
predefined color keywords, or it may be made up of n1,
n2, n3, a set of three integers from 0 to 255, represent-
ing the RGB values of the color. For a description of the
available color keywords (“blue”, “red”, “green”,
“black”, “white”, “purple”, “orange”, “yellow”, “gray”,
“ltgray”), see setfillcolor.
fillcolor(arg) Sets the default background fill color of the text box.
arg may be one of the predefined color keywords, or it
may be made up of n1, n2, n3, a set of three integers
from 0 to 255, representing the RGB values of the color.
For a description of the available color keywords
(“blue”, “red”, “green”, “black”, “white”, “purple”,
“orange”, “yellow”, “gray”, “ltgray”), see setfill-
color.
EViews 5.1 Command Reference Update Summary—137

framecolor(arg) Sets the default color of the text box frame. arg may be
one of the predefined color keywords, or it may be
made up of n1, n2, n3, a set of three integers from 0 to
255, representing the RGB values of the color. For a
description of the available color keywords (“blue”,
“red”, “green”, “black”, “white”, “purple”, “orange”,
“yellow”, “gray”, “ltgray”), see setfillcolor.
existing Apply the default settings to all existing text objects in
the graph.

The options which support the “-” may be proceeded by a “+” or “-” indicating whether
to turn on or off the option. The “+” is optional.

Examples
graph1.textdefault font("Arial", b) fillcolor(gray) existing

changes the defaulat text settings for new text objects so that new text is in Arial bold,
using the current default font size and color. Should the new text be enclosed in a box, the
box will have a gray fill. Additionally, the “existing” keyword specifies that existing text
objects in the graph will be updated with the current text settings. Note that in addition to
the font type and fill color specified in the command, all text default settings will be
applied to the existing text.

graph1.textdefault existing

updates the text objects in GRAPH1 with the current text default settings.

Cross-references
See Chapter 1, “EViews 5.1 Enhanced Graph Customization”, on page 33 for a discussion
of graph options.

See addtext (p. 70) and legend (p. 102).

xy Command || Graph Command | Group View | Matrix View | Sym View

Display XY graph of object, or change existing graph object type to XY (if possible).

By default, the first series or column of data will be located along the horizontal axis and
the remaining data on the vertical axis. You may optionally choose to plot the data in pairs,
where the first two series or columns are plotted against each other, the second two series
or columns are plotted against each other, and so forth.
138—Chapter 6. EViews 5.1 Command Reference Update Summary

Syntax
Command: xy(options) arg1 [arg2 arg3 ...]
Object View: group_name.xy(options)
Graph Proc: graph_name.xy(options)

If used as a command, follow the keyword by a list of series and group objects, or by a
matrix object. There must be at least two series or columns in the data to be graphed.

If changing the type of a graph, the default behavior is to use the existing settings for lines
and symbols in the graph.

See scat (p. 123) and xyline (p. 140) if you wish to create an XY graph with specific
line/symbol settings, or use setelem (p. 126) to change the settings after the graph is cre-
ated.

Options
Options may be specified in parentheses after the keyword.
Template and printing options
o= template Use appearance options from the specified template.
template may be a predefined template keyword
(‘default” - current global defaults, “classic”, “modern”,
“reverse”, “midnight”, “spartan”, “monochrome”) or a
graph in the workfile.
t=graph_name Use appearance options and copy text and shading from
the specified graph.
b / -b [Apply / Remove] bold modifiers of the base template
style specified using the “o=” option above.
w / -w [Apply / Remove] wide modifiers of the base template
style specified using the “o=” option above.
p Print the XY graph.

The options which support the “-” may be proceeded by a “+” or “-” indicating whether
to turn on or off the option. The “+” is optional.

Note that use of a template will override the existing line and symbol settings.
Scale options
a (default) Automatic single scale.
EViews 5.1 Command Reference Update Summary—139

b Plot series or columns in pairs (the first two against


each other, the second two against each other, and so
forth).
n Normalized scale (zero mean and unit standard devia-
tion). May not be used with the “s” option.
d Dual scaling with no crossing.
x Dual scaling with possible crossing.
m Display XY plots in multiple graphs (will override the
“s” option). Not for use with an existing graph object.

Panel options
The following options apply when graphing panel structured data:

panel=arg Panel data display: “stack” (stack the cross-sections),


(default taken “individual” or “1” (separate graph for each cross-sec-
from global set- tion), “combine” or “c” (combine each cross-section in
tings) single graph; one time axis), “mean” (plot means
across cross-sections), “mean1se” (plot mean and +/-
1 standard deviation summaries), “mean2sd” (plot
mean and +/- 2 s.d. summaries), “mean3sd” (plot
mean and +/- 3 s.d. summaries), “median” (plot
median across cross-sections), “med25” (plot median
and +/- .25 quantiles), “med10” (plot median and +/-
.10 quantiles), “med05” (plot median +/- .05 quan-
tiles), “med025” (plot median +/- .025 quantiles),
“med005” (plot median +/- .005 quantiles), “med-
mxmn” (plot median, max and min).

Examples
group g1 inf unemp gdp inv
g1.xy(o=gra1)

plots INF on the horizontal axis and UNEMP, GDP and INV on the vertical axis, using the
graph object GRA1 as a template.
g1.xy(b)
g1.xy(b,m)

plots INF against UNEMP and GDP against INV in first in a single graph, and then in mul-
tiple graphs.
140—Chapter 6. EViews 5.1 Command Reference Update Summary

If there is an existing graph GRAPH01, the expression:


graph01.xy(m, n)

changes its type to an XY plot displayed in multiple graphs with normalized scales, with
the remaining XY graph settings at their default values, and using the existing GRAPH01
settings for line and symbol display.

Cross-references
See “XY Line” of the User’s Guide for additional details.

See graph for graph declaration and additional graph types and options (p. 117) for
graph options. scat (p. 123) and xyline (p. 140) are specialized forms of XY graphs.

xyline Command || Graph Command | Group View | Matrix View | Sym View

Display XY line graph, or change existing graph object type to XY line (if possible).

By default, the first series or column of data will be located along the horizontal axis and
the remaining data on the vertical axis. You may optionally choose to plot the data in pairs,
where the first two series or columns are plotted against each other, the second two series
or columns are plotted against each other, and so forth.

Syntax
Command: xyline(options) arg1 [arg2 arg3 ...]
Object View: group_name.xyline(options)
Graph Proc: graph_name.xyline(options)

If used as a command, follow the keyword by a list of series and group objects, or by a
matrix object. There must be at least two series or columns in the data to be graphed.

XY line graphs are simply XY plots (see xy (p. 137)) with lines turned on, and symbols
turned off (see setelem (p. 126)).

Options
Options may be specified in parentheses after the keyword:
EViews 5.1 Command Reference Update Summary—141

Template and printing options


o= template Use appearance options from the specified template.
template may be a predefined template keyword
(‘default” - current global defaults, “classic”, “modern”,
“reverse”, “midnight”, “spartan”, “monochrome”) or a
graph in the workfile.
t=graph_name Use appearance options and copy text and shading from
the specified graph.
b / -b [Apply / Remove] bold modifiers of the base template
style specified using the “o=” option above.
w / -w [Apply / Remove] wide modifiers of the base template
style specified using the “o=” option above.
p Print the XY-line graph.

The options which support the “-” may be proceeded by a “+” or “-” indicating whether
to turn on or off the option. The “+” is optional.

Note that use of the template option will override the lines setting.
Scale options
a (default) Automatic single scale.
b Plot series or columns in pairs (the first two against
each other, the second two against each other, and so
forth).
n Normalized scale (zero mean and unit standard devia-
tion). May not be used with the “s” option.
d Dual scaling with no crossing.
x Dual scaling with possible crossing.
m Display XY plots in multiple graphs (will override the
“s” option). Not for use with an existing graph object.

Panel options
The following options apply when graphing panel structured data.
142—Chapter 6. EViews 5.1 Command Reference Update Summary

panel=arg Panel data display: “stack” (stack the cross-sections),


(default taken “individual” or “1” (separate graph for each cross-sec-
from global set- tion), “combine” or “c” (combine each cross-section in
tings) single graph; one time axis), “mean” (plot means
across cross-sections), “mean1se” (plot mean and +/-
1 standard deviation summaries), “mean2sd” (plot
mean and +/- 2 s.d. summaries), “mean3sd” (plot
mean and +/- 3 s.d. summaries), “median” (plot
median across cross-sections), “med25” (plot median
and +/- .25 quantiles), “med10” (plot median and +/-
.10 quantiles), “med05” (plot median +/- .05 quan-
tiles), “med025” (plot median +/- .025 quantiles),
“med005” (plot median +/- .005 quantiles), “med-
mxmn” (plot median, max and min).

Examples
group g1 inf unemp gdp inv
g1.xyline(o=midnight)

plots, in a single graph, INF (on the vertical axis) against UNEMP and GDP against INV,
using the predefined template “midnight”.
g1.xyline
g1.xyline(m)

plots INF against UNEMP and GDP against INV, first in a single graph, and then in multiple
graphs.

If there is an existing graph GRAPH01, the expression:

graph01.xyline(d)

changes its type to an XY line plot with dual scales and no crossing, with the remaining XY
graph settings at their default values.

Cross-references
See “XY Line” of the User’s Guide for additional details.

See xy (p. 137) and graph for graph declaration and additional graph types and options
(p. 117) for graph options. See scat (p. 123) for XY scatterplots.
EViews 5.1 Command Reference Update Summary—143

Command || Graph Command | Group View | Matrix View | Rowvector


xypair View | Sym View

Display XY pairs graph, or change existing graph object type to XY pairs (if possible).

Plots the data in pairs, where the first two series or columns are plotted against each other,
the second two series or columns are plotted against each other, and so forth.

Syntax
Command: xypair(options) arg1 [arg2 arg3 ...]
Object View: group_name.xypair(options)
Graph Proc: graph_name.xypair(options)

If used as a command, follow the keyword by a list of series and group objects, or by a
matrix object. There must be at least two series or columns in the data to be graphed.

If changing the type of a graph, the default behavior is to use the existing settings for lines
and symbols in the graph.

This graph type is equivalent to using xy (p. 137) with the “b” option indicating that the
data should be graphed in pairs.

Options
Options may be specified in parentheses after the keyword:
Template and printing options
o= template Use appearance options from the specified template.
template may be a predefined template keyword
(‘default” - current global defaults, “classic”, “modern”,
“reverse”, “midnight”, “spartan”, “monochrome”) or a
graph in the workfile.
t=graph_name Use appearance options and copy text and shading from
the specified graph.
b / -b [Apply / Remove] bold modifiers of the base template
style specified using the “o=” option above.
w / -w [Apply / Remove] wide modifiers of the base template
style specified using the “o=” option above.
p Print the XY-pair graph.
144—Chapter 6. EViews 5.1 Command Reference Update Summary

The options which support the “-” may be proceeded by a “+” or “-” indicating whether
to turn on or off the option. The “+” is optional.

Note that use of the template option will override the pairs setting.
Scale options
a (default) Automatic single scale.
b Plot series or columns in pairs (the first two against
each other, the second two against each other, and so
forth).
n Normalized scale (zero mean and unit standard devia-
tion). May not be used with the “s” option.
d Dual scaling with no crossing.
x Dual scaling with possible crossing.
m Display XY plots in multiple graphs (will override the
“s” option). Not for use with an existing graph object.

Panel options
The following options apply when graphing panel structured data:

panel=arg Panel data display: “stack” (stack the cross-sections),


(default taken “individual” or “1” (separate graph for each cross-sec-
from global set- tion), “combine” or “c” (combine each cross-section in
tings) single graph; one time axis), “mean” (plot means
across cross-sections), “mean1se” (plot mean and +/-
1 standard deviation summaries), “mean2sd” (plot
mean and +/- 2 s.d. summaries), “mean3sd” (plot
mean and +/- 3 s.d. summaries), “median” (plot
median across cross-sections), “med25” (plot median
and +/- .25 quantiles), “med10” (plot median and +/-
.10 quantiles), “med05” (plot median +/- .05 quan-
tiles), “med025” (plot median +/- .025 quantiles),
“med005” (plot median +/- .005 quantiles), “med-
mxmn” (plot median, max and min).

Examples
group g1 inf unemp gdp inv
g1.xypair(o=gra1)
EViews 5.1 Command Reference Update Summary—145

plots, in a single graph, INF (on the vertical axis) against UNEMP and GDP against INV,
using the graph object GRA1 as a template.
g1.xypair
g1.xypair(m)

plots INF against UNEMP and GDP against INV, first in a single graph, and then in multiple
graphs.

If there is an existing graph GRAPH01, the expression

graph01.xypair(m, n)

changes its type to an XY pair plot displayed in multiple graphs with normalized scales,
with the remaining XY graph settings at their default values, and using the existing
GRAPH01 settings for line and symbol display.

Cross-references
See “XY Line” of the User’s Guide for additional details.

See graph for graph declaration and additional graph types and options (p. 117) for
graph options. See xy (p. 137) for the creation of general XY graphs, and scat (p. 123) for
scatterplots.
146—Chapter 6. EViews 5.1 Command Reference Update Summary
Index

A F
Add text to graph 8, 42 fit 65
addtext 42 Fixed effects
area 45 test of joint significance 67
Area graph 45 fixedtest 67
Axis Font options
set axis characteristics 47 text in graph 7, 8
axis 47 Forecast
dynamic (multi-period) 68
B static (one-period ahead) 65
Bar graph 49 forecast 68
Frequency conversion 51
C
G
Conditional standard deviation
display graph of 70 GARCH
display conditional standard deviation 70
Conditional variance
generate conditional variance series 83
make series from ARCH 83
garch 70
Coordinates
for legend in graph 74 Graph
area graph 45
Copy
aspect ratio 5
objects 51
axes control 6
Create
background color 5
workfile page 84
background printing 5
D bar graph 49
border 5
Database color settings 5
open existing 58 coordinates for positioning elements 8
dbopen 58 customizing lines and symbols 6
Drag(ging) drawing lines and shaded areas 9, 59, 61
text in graph 9 error bar 63
draw 59 font options 7
Draw lines in graph 59 frame fill 5
grid lines 5
drawdefault 61
high-low-open-close 71
Dynamic forecast 68
indentation 5
E legend appearance and placement 74
line graph 76
Enterprise Edition 31 modifying 5
errbar 63 options for individual elements 97
Error bar graph 63 pie graph 91
EViews Enterprise Edition 31 place text in 8, 42, 107
118— Index

scatterplot graph 94 Redundant fixed effects test 67


set axis characteristics 47 Redundant variables test 106
set options 88
spike graph 101 S
templates 10, 103
scat 94
text justification 8
XY graph 108 Scatterplot 94
XY line graph 111 setelem 97
XY pairs graph 114 Shade region of graph 9, 59
spike 101
H Spike graph 101
Hausman test 93 Static forecast 65
High-Low-(Open-Close) graph 71 T
hilo 71
Template 10
L template 103
Legend Test
appearance and placement 74 correlated random effects 93
legend 74 omitted variables 105
redundant fixed effects 67
line 76
redundant variables 106
Line drawing 9, 59
testadd 105
Line graph 76
testdrop 106
M textdefault 107

makegarch 83 W

O Workfile
create page in 84
Object
copy 51 X
Omitted variables test 105
xy 108
Open
XY (line) graph 111
database 58
XY (pairs) graph 114
options 88
XY graph 108
P xyline 111
xypair 114
Page
create new 84
pagecreate 84
pie 91
Pie graph 91

R
Random effects
test for correlated effects (Hausman) 93
ranhaus 93

You might also like