Command Reference : Command Reference
  
 
pagestruct
Assign a structure to the active workfile page.
Syntax
pagestruct(options) [id_list]
pagestruct(options) *
where id_list is an (optional) list of ID series. The “*” may be used as shorthand for the indices currently in place.
If an id_list is provided, EViews will attempt to auto determine the workfile structure. Auto-determination may be overridden through the use of options.
If you do not provide an id_list, the workfile will be restructured as a regular frequency workfile. In this case, either the “none” or the “freq=” and “start=” options described below must be provided.
Options
 
none
Remove the existing workfile structure.
freq= arg
Specifies a regular frequency; if not provided EViews will auto-determine the frequency. The frequency may be specified as “a” (annual), “s” (semi-annual), “q” (quarterly), “m” (monthly), “w” (weekly), “d” (5-day daily), “7” (7-day daily), or “u” (unstructured/undated).
start=arg
Start date of the regular frequency structure; if not specified, defaults to “@FIRST”. Legal values for arg are described below.
end=arg
End date of the regular frequency structure; if not specified, defaults to “@LAST”. Legal values for arg are described below.
regular, reg
When used with a date ID, this option informs EViews to insert observations (if necessary) to remove gaps in the date series so that it follows the regular frequency calendar. The option has no effect unless a date index is specified.
create
Allow creation of a new series to serve as an additional ID series when duplicate ID values are found in any group. EViews will use this new series as the observation ID.
The default is to prompt in interactive mode and to fail in programs.
balance=arg, bal=arg
Balance option (for panel data) describing how EViews should handle data that are unbalanced across ID (cross-section) groups.
The arg should be formed using a combination of starts (“s”), ends (“e”), and middles (“m”), as in “balance=se” or “balance=m”.
If balancing starts (arg contains “s”), EViews will (if necessary) add observations to your workfile so that each cross-section begins at the same observation (the earliest date or observation observed).
If balancing ends (arg contains “e”), EViews will add any observations required so that each cross-section ends at the same point (the last date or observation observed).
If balancing middles (arg contains “m”) EViews will add observations to ensure that each cross-section has consecutive observations from the earliest date or observation for the cross-section to the last date or observation for the cross-section.
Note that “balance=m” is implied by the “regular” option.
dropna
Specifies that observations which contain missing values (NAs or blank strings) in any ID series (including the date or observation ID) be removed from the workfile. If “dropna” is not specified and NAs are found, EViews will prompt in interactive mode and fail in programs.
dropbad
Specifies that observations for which any of the date index series contain values that do not represent dates be removed from the workfile. If “dropbad” is not provided and bad dates are present, EViews will prompt in interactive mode and fail in programs.
The values for start and end dates should contain date literals (actual dates or periods), e.g., “1950q1” and “2/10/1951”, “@FIRST”, or “@LAST” (first and last observed dates in the date ID series). Date literals must be used for the “start=” option when restructuring to a regular frequency.
In addition, offsets from these date specifications can be specified with a “+” or “–” followed by an integer: “@FIRST-5”, “@LAST+2”, “1950m12+6”. Offsets are most often used when resizing the workfile to add or remove observations from the endpoints.
Examples
pagestruct state industry
structures the workfile using the IDs in the STATE and INDUSTRY series.
A date ID series (or a series used to form a date ID) should be tagged using the “@DATE” keyword. For example:
pagestruct state @date(year)
pagestruct(regular) @date(year, month)
A “*” may be used to indicate the indices defined in the current workfile structure.
pagestruct(end=@last+5) *
adds 5 observations to the end of the current workfile.
When you omit the id_list, EViews will attempt to restructured the workfile to a regular frequency. In this case you must either provide the “freq=” and “start=” options to identify the regular frequency structure, or you must specify “none” to remove the existing structure:
pagestruct(freq=a, start=1950)
pagestruct(none)
Cross-references
For extensive discussion, see “Structuring a Workfile”.