User’s Guide : EViews Fundamentals : Basic Data Handling : Data Objects

Data Objects
The actual numeric values that make up your data will generally be held in one or more of EViews’ data objects (series, groups, matrices, vectors, and scalars). For most users, series and groups will by far be the most important objects, so they will be the primary focus of our discussion. Matrices, vectors, and scalars are discussed at greater length in “Matrix Language”.
The following discussion is intended to provide only a brief introduction to the basics of series and groups. Our goal is to describe the fundamentals of data handling in EViews. An in-depth discussion of series and group objects follows in subsequent chapters.
Series
An EViews series contains a set of observations on a numeric variable. Associated with each observation in the series is a date or observation label. For series in regularly dated workfiles, the observations are presumed to be observed regularly over time. For undated data, the observations are not assumed to follow any particular frequency.
Note that the series object may only be used to hold numeric data. If you wish to work with alphanumeric data, you should employ alpha series. See “Alpha Series” for discussion.
Creating a series
One method of creating a numeric series is to select Object/New Object… from the menu, and then to select Series. You may, at this time, provide a name for the series, or you can let the new series be untitled. Click on OK.
EViews will open a spreadsheet view of the new series object. All of the observations in the series will be assigned the missing value code “NA”. You may then edit or use expressions to assign values for the series.
You may also use the New Object dialog to create alpha series. Alpha series are discussed in greater detail in “Alpha Series”.
A second method of creating a series is to generate the series using mathematical expressions. Click on Quick/Generate Series… in the main EViews menu, and enter an expression defining the series. We will discuss this method in depth in the next chapter.
Lastly, you may create the numeric or alpha series by entering a series or alpha command in the command window. Entering an expression of the form:
series series_name = series_expr
creates a series with the name series_name and assigns the expression to each observaton. Alternately:
alpha alpha_name = alpha_expr
creates an alpha series object and assigns the alpha_expr to each observation.
You may leave out the right-hand side assignment portion of the commands; in this case, the series or alpha will be initialized to missing values (NA and blank strings, respectively).
EViews provides you with extensive ability to customize your series spreadsheet display.
Column Widths
To resize the width of a column, simply move your mouse over the column separator until the icon changes, then drag the column to its desired width. The new width will be remembered the next time you open the series and will be used when the series is displayed in a group spreadsheet.
Display Type
The series display type, which is listed in the dropdown menu in the series toolbar, determines how the series spreadsheet window shows your data.
The Default method shows data in either raw (underlying data) form or, if a value map is attached to the series, shows the mapped values. Alternatively, you may use the Raw Data to show only the underlying data. See “Value Maps” for a description of the use of value maps.
You may also use the display type setting to show transformations of the data. You may, for example, set the display method to Differenced, in order to have EViews display the first-differences of your data.
Changing the display of your series values does not alter the underlying values in the series, it only modifies the values shown in the spreadsheet (the series header, located above the labels, will also change to indicate the transformation). Note, however, that if you edit the values of your series while displayed in transformed mode, EViews will change the underlying values of the series accordingly. Changing the display and editing data in transformed mode is a convenient method of inputting data that arrive as changes or other transformed values.
Display Formats
You may customize the way that numbers or characters in your series are displayed in the spreadsheet by setting the series display properties. To display the dialog, click on Properties in the series toolbar, or right mouse click and select the Display Format... entry in the menu to display the first tab of the dialog.
EViews will open the Properties dialog with the Display tab selected. You may use this dialog to change the default column width and justification for the series, and to choose from a large list of numeric display formats for data displayed using the different display types.
The Data displayed as dropdown menu is used to select the display type to which the current Numeric display settings will apply. There are a different set of numeric settings for each type.
You may, for example, elect to change the display of numbers to show additional digits, to separate thousands with a comma, or to display numbers as fractions. The last four items in the Numeric display dropdown menu provide options for the formatting of date number.
Similarly, you may elect to change the series justification by selecting Auto, Left, Center, or Right. Note that Auto justification will set justification to right for numeric series, and left for alpha series.
You may also use this dialog to change the column width (note that column widths in spreadsheets may also be changed interactively by dragging the column headers).
Once you click on OK, EViews will accept the current settings and change the spreadsheet display to reflect your choices. In addition, these display settings will be used whenever the series spreadsheet is displayed or as the default settings when the series is used in a group spreadsheet display.
Note that when you apply a display format, you may find that a portion of the contents of a cell are not visible, when, for example, the column widths are too small to show the entire cell. Alternately, you may have a numeric cell for which the current display format only shows a portion of the full precision value.
In these cases, it may be useful to examine the actual contents of a table cell. To do so, simply select the table cell. The unformatted contents of the cell will appear in the status line at the bottom of the EViews window.
Sorting a Series
The data in a series may be displayed sorted by observation or by the values in the series. You may change the order in which observations are displayed in the spreadsheet by clicking on the sort button and filling out the dialog. Note that this display sorting does not change the underlying order of the observations in the workfile.
You may press the Sort button on the button bar or by click on the right-mouse button and select Sort from the menu. To sort by series value, the entire series must be selected. To select the series, simply press the column header directly above the series values. Similarly, to sort by observation, the observation column must be selected.
If only a subset of the entire data series or observation series is selected, the Sort menu item will not be available.
Narrow versus Wide
The narrow display displays the observations for the series in a single column, with date labels in the margin. The typical series spreadsheet display will use this display format.
The wide display arranges the observations from left to right and top to bottom, with the label for the first observation in the row displayed in the margin. For dated workfiles, EViews will, if possible, arrange the data in a form which matches the frequency of the data. Thus, semi-annual data will be displayed with two observations per row, quarterly data will contain four observations per row, and 5-day daily data will contain five observations in each row.
You can change the display to show the observations in your series in multiple columns by clicking on the Wide +/- button on the spreadsheet view toolbar (you may need to resize the series window to make this button visible). For example, toggling the Wide +/- button switches the display between the wide display (as depicted), and the narrow (single column) display.
This wide display format is useful when you wish to arrange observations for a particular season in each of the columns.
Observation Numbers
If you wish to modify the observation labels to include an observation number, right-click and select ObsID +/-. Selecting ObsID +/- switches the display between showing a label that includes the observation label and one which does not. This feature is useful if you wish to identify the observation number of a particular observation.
Sample Subset Display
By default, all observations in the workfile are displayed, even those observations not in the current sample. By pressing Smpl +/– you can toggle between showing all observations in the workfile, and showing only those observations included in the current sample.
There are two features that you should keep in mind as you toggle between the various display settings:
If you choose to display only the observations in the current sample, EViews will switch to single column display.
If you switch to wide display, EViews automatically turns off the display filter so that all observations in the workfile are displayed.
One consequence of this behavior is that if you begin with a narrow display of observations in the current sample, click on Wide +/- to switch to wide display, and then press the Wide +/- button again, EViews will provide a narrow display of all of the observations in the workfile. To return to the original narrow display of the current sample, you will need to press the Smpl +/- button again.
Live statistics
The series and group spreadsheet views now display interactive statistics. When a spreadsheet is first opened the statistics are computed using all of the data in the spreadsheet.
Double-clicking on the bottom bar brings up a menu where the statistics shown can be changed. A maximum of six statistics may be displayed at once. The window may need to be resized to display all the statistics.
The statistics are recalculated every time a group of cells is highlighted.
The statistics displayed can also be set by going to Options/General Options... from the main menu and then the Spreadsheets/Live statistics page.
Editing a series
You can edit individual values of the data in a series.
First, open the spreadsheet view of the series. If the series window display does not show the spreadsheet view, click on the Sheet button, or select View/Spreadsheet, to change the default view.
Next, make certain that the spreadsheet window is in edit mode. EViews provides you with the option of protecting the data in your series by turning off the ability to edit from the spreadsheet window. You can use the Edit +/– button on the toolbar to toggle between edit mode and protected mode.
Here we see a series spreadsheet window in edit mode. Notice the presence of the edit window just beneath the series toolbar containing the value of RC in 1953M01, and the box around the selected cell in the spreadsheet; neither are present in protected mode.
To change the value for an observation, select the cell, type in the value, and press ENTER. For example, to change the value of RC in 1953M01, simply click on the cell containing the value, type the new value in the edit window, and press ENTER.
When editing series values, you should pay particular attention to the series display format, which tells you the units in which your series are displayed. Here, we see that the series values are displayed in Default mode so that you are editing the underlying series values (or their value mapped equivalents). Alternately, if the series were displayed in Differenced mode, then the edited values correspond to the first differences of the series.
Note that some cells in the spreadsheet are protected. For example, you may not edit the observation labels, or the “Last update” series label. If you select one of the protected cells, EViews will display a message in the edit window telling you that the cell cannot be edited.
When you have finished editing, you should protect yourself from inadvertently changing values of your data by clicking on Edit +/– to turn off edit mode.
Inserting and Deleting Observations in a Series
You can also insert and delete observations in the series. First, click on the cell where you want the new observation to appear. Next, right click and select Insert obs... or Delete obs... from the menu. You will see a dialog asking how many observations you wish to insert or delete at the current position.
If you choose to insert a single observation, EViews will insert a missing value at the appropriate position and push all of the observations down so that the last observation will be lost from the workfile. If you wish to preserve this observation, you will have to expand the workfile before inserting observations. If you choose to delete an observation, all of the remaining observations will move up, so that you will have a missing value at the end of the workfile range.
Groups
When working with multiple series, you will often want to create a group object to help you manage your data. A group is a list of series names (and potentially, mathematical expressions) that provides simultaneous access to all of the elements in the list.
With a group, you can refer to sets of variables using a single name. Thus, a set of variables may be analyzed, graphed, or printed using the group object, rather than each one of the individual series. Therefore, groups are often used in place of entering a lengthy list of names. Once a group is defined, you can use the group name in many places to refer to all of the series contained in the group.
You will also create groups of series when you wish to analyze or examine multiple series at the same time. For example, groups are used in computing correlation matrices, testing for cointegration and estimating a VAR or VEC, and graphing series against one another.
Creating Groups
There are several ways to create a group. Perhaps the easiest method is to select Object/New Object… from the main menu or workfile toolbar, click on Group, and if desired, name the object.
You should enter the names of the series to be included in the group, separated by spaces, and then click OK.
You may use the wildcard characters “*” and “?” to match more than one series in the workfile, and you may use the keywords “and” and “not” to specify that certain items should be excluded from the group.
A group window will open showing a spreadsheet view of the group.
You may have noticed that the dialog allows you to use group names and series expressions. If you include a group name, all of the series in the named group will be included in the new group. For example, suppose that the group GR1 contains the series X, Y, and Z, and you create a new group GR2, which contains GR1 and the series A and B. Then GR2 will contain X, Y, Z, A and B. Bear in mind that only the series contained in GR1, not GR1 itself, are included in GR2; if you later add series to GR1, they will not be added to GR2.
Series expressions will be discussed in greater depth later. For now, it suffices to note that series expressions are mathematical expressions that may involve one or more series (e.g. “7/2” or “3*X*Y/Z”). EViews will automatically evaluate the expressions for each observation and display the results as if they were an ordinary series. Users of spreadsheet programs will be familiar with this type of automatic recalculation.
Here, for example, is a spreadsheet view of an untitled group containing the series RC, a series expression for the lag of RG, RG(–1), and a series expression involving RC and RG.
Notice here the Default setting for the group spreadsheet display indicates that the series RC and RG(-1) are displayed using the original values, spreadsheet types, and formats set in the original series (see “Display Formats”). A newly created group always uses the Default display setting, regardless of the settings in the original series, but the group does adopt the original series cell formatting. You may temporarily override the display setting by selecting a group display format. For example, to use the display settings of the original series, you should select Series Spec; to display differences of all of the series in the group, select Differenced.
An equivalent method of creating a group is to select Quick/Show…, or to click on the Show button on the workfile toolbar, and then to enter the list of series, groups and series expressions to be included in the group. This method differs from using Object/New Object… only in that it does not allow you to name the object at the time it is created.
You can also create an empty group that may be used for entering new data from the keyboard or pasting data copied from another Windows program. These methods are described in detail in “Entering Data” and “Copying-and-Pasting”.
Editing in a Group
Editing data in a group is similar to editing data in a series. Open the group window, and click on Sheet, if necessary, to display the spreadsheet view. If the group spreadsheet is in protected mode, click on Edit +/– to enable edit mode, then select a cell to edit, enter the new value, and press ENTER. The new number should appear in the spreadsheet.
Since groups are simply references to series, editing the series within a group changes the values in the original series.
As with series spreadsheet views, you may click on Smpl +/– to toggle between showing all of the observations in the workfile and showing only those observations in the current sample. Unlike the series window, the group window always shows series in a single column.
Note that while groups inherit many of the series display formats when they are created, to reduce confusion, groups do not initially show transformed values of the series. If you wish to edit a series in a group in transformed form, you must explicitly set a transformation type for the group display.
Adding to or Modifying a Group
You can add to or modify an existing group by clicking on View/Group Members and then editing the list of names. Clicking on the UpdateGroup accepts your edits (see “Group Members” for details).
Alternately, you can drag-and-drop series into the Group Members or Spreadsheet views of the group EViews will automatically add the series to the group.