Command Reference : Workfile Functions : Panel Workfile Functions
Panel Workfile Functions
Panel Identifier Functions
Panel Trend Functions
Panel Identifier Functions
Additional information is available in panel structured workfiles. EViews provides workfile functions that provide information about the cross-section, cell, and observation IDs associated with each observation in a panel workfile:
@crossid: returns the cross-section index (cross-section number) of each observation.
@cellid: returns the inner dimension index value for each observation. The index numbers identify the unique values of the inner dimension observed across all cross-sections. Thus, if the first cross-section has annual observations for 1990, 1992, 1994, and 1995, and the second cross-section has observations for 1990, 1995, and 1997, the corresponding @cellid values will be (1, 2, 3, 4) and (1, 4, 5), respectively.
@obsid: returns the observation number within each panel cross section for each observation. @obsid is similar to @obsnum except that it resets to one whenever it crosses the seam between two adjacent cross sections.
See “Identifier Indices” for additional discussion.
Panel Trend Functions
Central to the notion of a panel trend is the notion that the trend values are initialized at the start of a cross-section, increase for successive observations in the specific cross-section, and are reset at the start of the next-cross section.
Beyond that, there are several notions of a time trend that may be employed. EViews provides four different functions that may be used to create a trend series: @obsid, @trendc, @cellid, and @trend.
The @obsid function may be used to obtain the simplest notion of a trend in which the values for each cross-section begin at one and increase by one for successive observations in the cross-section. To begin your trends at zero, simply use the expression “@OBSID-1”. Note that such a trend does not use information about the cell ID values in determining the value increment.
The calendar trend function, @trendc, computes trends in which values for observations with the earliest observed date are normalized to zero, and successive observations are incremented based on the calendar for the workfile frequency.
Lastly, @cellid and @trend compute trends using the observed dates in the panel:
@cellid, which returns an index into the unique values of the cell ID, returns a form of time trend in which the values increase based on the number of cell ID values between successive observations.
@trend function is equivalent to “@cellid-1”.
In fully balanced workfiles (workfiles with the same set of cell identifier in each cross-section), the expressions “@obsid-1”, “@cellid-1”, and “@trend” all return the same values. Additionally, if the workfile follows a regular frequency, then the @trendc function returns the same values as @trend.
Note that because of the way they employ information computed across cross-sections, @trend and @trendc may not take the optional base_date argument in panel structured workfiles (see “Trend Functions”).