User’s Guide : EViews Fundamentals : Workfile Basics : Multi-page Workfiles
  
Multi-page Workfiles
 
Creating a Workfile Page
Creating a Page by Describing its Structure
Creating a Workfile Page Using Identifiers
Unique values of ID series from one page
Union of common ID series from multiple pages
Intersection of common ID series from multiple pages
Cross of two ID series
Cross of ID Series with a date range
Creating a Page by Copying from the Current Page
Creating a Page by Loading a Workfile or Data Source
Creating a Page by Pasting from the Clipboard
Working With Workfile Pages
Setting the Active Workfile Page
Renaming a Workfile Page
Deleting a Workfile Page
Saving a Workfile Page
Reordering Workfile Pages
Working with Series Across Pages
While a great many of your workfiles will probably contain a single page, you may find it useful to organize your data into multiple workfile pages. Multi-page workfiles are primarily designed for situations in which you must work with multiple datasets.
For example, you may have both quarterly and monthly data that you wish to analyze. The multi-page workfile allows you to hold both sets of data in their native frequency, and to perform automatic frequency conversion as necessary. Organizing your data in this fashion allows you to switch instantly between performing your analysis at the monthly and the quarterly level.
Likewise, you may have a panel dataset on individuals that you wish to use along with a cross-sectional dataset on state level variables. By creating a workfile with a separate page for the individual level data, and a separate page for the state level data, you can move back and forth between the individual and the state level analyses, or you can link data between the two to perform dynamic match merging.
Creating a Workfile Page
There are several ways to create a new workfile page.
Creating a Page by Describing its Structure
First, you may describe the structure of the workfile page. This method follows the approach outlined in “Creating a Workfile by Describing its Structure”. Simply call up the new page menu by clicking on the tab labeled New Page and selecting Specify by Frequency/Range..., and EViews will display the familiar Workfile Create dialog. Simply describe the structure of your workfile page as you would for a new workfile, and enter OK.
EViews will create a new workfile page with the specified structure and the new page will be given a default name and designated as the active workfile page. The default name will be constructed from the next available name for the given workfile structure. For example, if you create a regular frequency annual page, EViews will attempt to name the page ANNUAL, ANNUAL1, and so forth. The active page is noted visually by the tab selection at the bottom of the workfile window. With the exception of a few page-specific operations, you may generally treat the active page as if it were a standard workfile.
Creating a Workfile Page Using Identifiers
The second approach creates a new page using the unique values of one or more identifier series. Click on the New Page tab 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 dropdown menu 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 multiple 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 different 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 dropdown, 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.
EViews will take the set of series and will identify the unique values in the specified Sample. Note that when multiple identifiers are specified, 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 workfile using this information. If Date ID series were provided in the original dialog, EViews will restructure the result as a dated workfile page.
Suppose, for example, that we begin with a workfile page named 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 workfile page containing 157 observations 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 structured using this series.
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 dropdown. 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 common 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 another page in the workfile, ANNUAL5, 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 “ANNUAL5” 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 ANNUAL5 page.
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 common ID series from multiple pages, EViews will take 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 ANNUAL4 workfile page containing annual data for four years from 1985–1988, with corresponding 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 ANNUAL4. 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 ANNUAL4 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 dropdown.
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 “ANNUAL4” 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 identifier.
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 constructing 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 operation.
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 specify 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 specifying a date ID and page, this method is obviously more restrictive since it does not allow for irregular dated data. In these latter cases, you must explicitly specify your date ID series and page.
Creating a Page by Copying from the Current Page
You may also create a new workfile page by copying data from the current page. Click on New Page or click on Proc in the main workfile menu, and select Copy/Extract from Current Page and either By Link to New Page... or By Value to New Page or Workfile.... EViews will open a dialog prompting you to specify the objects and data that you wish to copy to a new page. See “Copying from a Workfile” for a complete discussion.
Alternately, you may simply drag-and-drop a group of selected series from the current workfile page onto the New Page tab on the bottom of the workfile window.
Creating a Page by Loading a Workfile or Data Source
The next method for creating a new page is to load an existing workfile or data source. Call up the new page menu by clicking on New Page and selecting Load Workfile Page... or by selecting Proc/Load Workfile Page... from the main workfile menu. EViews will present you with the File Open dialog, prompting you to select your file.
More directly, you may drag an existing workfile, workfile page, or foreign data file directly onto the New Page tab on the bottom of your workfile window. You can even copy a page from one workfile to another by dragging the page tab from the source workfile and dropping onto the New Page in the other workfile.
If you select an existing EViews workfile, EViews will add a page corresponding to each page in the source workfile. If you load a workfile with a single page named QUARTERLY, EViews will attempt to load the entire workfile in the new page. If your workfile contains multiple pages, each page of the workfile will be loaded into a new and separate page. The active page will be the newest page.
If you select a foreign data source as described in “Creating a Workfile by Reading from a Foreign Data Source”, EViews will load the data into a single newly created page in the workfile. This method is exactly the same as that used when creating a new workfile except that the results are placed in a new workfile page.
Creating a Page by Pasting from the Clipboard
You may create a new workfile page by pasting the contents of the Windows Clipboard. This method is particularly useful for copying and pasting data from another application such as Microsoft Word, Excel, or your favorite web browser.
Simply copy the data you wish to use in creating your page, then click on New Page and select Paste from Clipboard as Page. EViews will first analyze the contents of the clipboard. EViews then creates a page to hold the data and then will read the data into series in the page.
Note that while EViews can correctly analyze a wide range of data representations, the results may not be as expected in more complex settings.
Working With Workfile Pages
While workfile pages may generally be thought of simply as workfiles, there are certain operations that are page-specific or fundamental to multi-page workfiles.
Setting the Active Workfile Page
To select the active workfile page, simply click on the visible tab for the desired page in the workfile window. The active page is noted visually by the tab selection at the bottom of the workfile window.
If the desired page is not visible, you may click on the small right and left arrows in the bottom left-hand corner of the workfile window to scroll the page tab display until the desired page is visible, then click on the tab.
You should note that it is possible to hide existing page tabs. If a page appears to be missing, for example if New Page is the only visible tab, the remaining tabs are probably hidden. You should click on the left arrow located in the bottom right of the workfile window until your page tabs are visible.
Renaming a Workfile Page
EViews will give your workfile pages a default name corresponding to the workfile structure. You may wish to rename these pages to something more informative. Simply click on the tab for the page you wish to rename and right-mouse-button click to open the workfile page menu. Select Rename Workfile Page... from the menu and enter the page name. Alternatively, you may select Proc/Rename Current Page... from the main workfile menu to call up the dialog.
Workfile page names must satisfy the same naming restrictions as EViews objects. Notably, the page names must not contain spaces or other delimiters.
Deleting a Workfile Page
To delete a workfile page, right mouse click on the page tab and select Delete Workfile Page, or with the page active, click on the Proc menu and select Delete Current Page.
Saving a Workfile Page
If you wish to save the active workfile page as an individual workfile, click on the page tab, right mouse click to open the workfile page menu and select Save Workfile Page... to open the SaveAs dialog. Alternatively, you may select Proc/Save Current Page... from the main workfile menu to access the dialog.
Saving a page as an individual workfile is quite useful when you wish to load a single page into several workfiles, or if you wish to use the page in a previous version of EViews. Once saved on disk, it is the same as any other single-page EViews workfile.
Reordering Workfile Pages
You may change the order of your workfile pages by dragging the tab for a page at the bottom of the workfile window, and dropping it on top of the tab for the page it should follow. Note the difference in behavior between dragging a tab within a workfile and dragging across workfiles. The first reorders the pages, while the second copies the contents of one page into another.
Working with Series Across Pages
When working with multi-page workfiles you may wish to access the data in one page when performing calculations or analysis on another page. EViews offers three methods for access data across pages; simple copying ( “Copying and Pasting”), creating link objects ( “Series Links”), and auto-series across pages ( “Auto-series Across Pages”).