User’s Guide : Panel and Pooled Data : Working with Panel Data : Structuring a Panel Workfile
Structuring a Panel Workfile
The first step in panel data analysis is to define the panel structure of your data. By defining a panel structure for your data, you perform the dual tasks of identifying the cross-section associated with each observation in your stacked data, and of defining the way that lags and leads operate in your workfile.
While the procedures for structuring a panel workfile outlined below are described in greater detail elsewhere, an abbreviated review may prove useful (for additional detail, see “Describing a Balanced Panel Workfile”, “Dated Panels”, and “Undated Panels” ).
There are two basic ways to create a panel structured workfile. First, you may create a new workfile that has a simple balanced panel structure. Simply select File/New/Workfile... from the main EViews menu to open the Workfile Create dialog. Next, select Balanced Panel from the Workfile structure type dropdown menu, and fill out the dialog as desired. Here, we create a balanced quarterly panel (ranging from 1970Q1 to 2020Q4) with 200 cross-sections. We also enter “Quarterly” in the Page name edit field.
When you click on OK, EViews will create an appropriately structured workfile with 40,800 observations (51 years, 4 quarters, 200 cross-sections). You may then enter or import the data into the workfile.
More commonly, you will use the second method of structuring a panel workfile, in which you first read stacked data into an unstructured workfile, and then apply a structure to the workfile. While there are a number of issues involved with this operation, let us consider a simple, illustrative example of the basic method.
Suppose that we have data for the job training example considered by Wooldridge (2002), using data from Holzer, et al. (1993), which are provided in “Jtrain.WF1”.
These data form a balanced panel of 3 annual observations on 157 firms. The data are first read into a 471 observation, unstructured EViews workfile. The values of the series YEAR and FCODE may be used to identify the date and cross-section, respectively, for each observation.
To apply a panel structure to this workfile, simply double click on the “Range:” line at the top of the workfile window, or select Proc/Structure/Resize Current Page... to open the Workfile structure dialog. Select Dated Panel as our Workfile structure type.
Next, enter YEAR as the Date series and FCODE as the Cross-section ID series. Since our data form a simple balanced dated panel, we need not concern ourselves with the remaining settings, so we may simply click on OK.
EViews will analyze the data in the specified Date series and Cross-section ID series to determine the appropriate structure for the workfile. The data in the workfile will be sorted by cross-section ID series, and then by date, and the panel structure will be applied to the workfile.