Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Eviews5 / EViews5 / Docs / EViews 5 Command Ref.pdf
Скачиваний:
47
Добавлен:
23.03.2015
Размер:
5.23 Mб
Скачать

396—Appendix B. Command Reference

Examples

pageselect page2

changes the active page to PAGE2.

Cross-references

See also wfselect (p. 542).

pagestack Command

Create a panel structured workfile page using series, alphas, or links from the default workfile page (convert repeated series to repeated observations).

Series in the new panel workfile may be created by stacking series, alphas, and links whose names contain a pattern (series with names that differ only by a “stack identifier”), or by repeating a single series, alpha, or link, for each value in a set of stack identifiers.

Syntax

Command: pagestack(options) stack_id_list [@ series_to_stack]

Command: pagestack(options) pool_name [@ series_to_stack]

Command: pagestack(options) series_name_pattern [@ series_to_stack]

The resulting panel workfile will use the identifiers specified in one of the three forms of the command:

stack_id_list includes a list of the ID values (e.g., “US UK JPN”).

pool_name is the name of a pool object that contains the ID values.

series_name_pattern contains an expression from which the ID values may be determined. The pattern should include the “?” character as a stand in for the parts of the series names containing the stack identifiers. For example, if “CONS?” is the series_name_pattern, EViews will find all series with names beginning with “CONS” and will extract the IDs from the trailing parts of the observed names.

The series_to_stack list may contain two types of entries: stacked series (corresponding to sets of series, alphas, and links whose names contain the stack IDs) and simple series (other series, alphas, and links).

To stack a set of series whose names differ only by the stack IDs, you should enter an expression that includes the “?” character in place of the IDs. You may list the names of a single stacked series (e.g., “GDP?” or “?CONS”), or you may use expressions containing the wildcard character “*” (e.g., “*?” and “?C*”) to specify multiple series.

pagestack—397

By default, the stacked series will be named in the new workfile using the base portion of the series name (if you specify “?CONS” the stacked series will be named “CONS”), and will contain the values of the individual series stacked one on top of another. If one of the individual series associated with a particular stack ID does not exist, the corresponding stacked values will be assigned the value NA.

Individual (simple) series may also be stacked. You may list the names of individual simple series (e.g., “POP INC”), or you can specify your series using expressions containing the wildcard character “*” (e.g., “*”, “*C”, and “F*”). A simple series will be stacked on top of itself, once for each ID value. If the target workfile page is in the same workfile, EViews will create a link in the new page; otherwise, the stacked series will contain (repeated) copies of the original values.

When evaluating wildcard expressions, stacked series take precedence over simple series. This means that simple series wildcards will be processed using the list of series not already included as a stacked series.

If the series_to_stack list is not specified, the expression “*? *”, is assumed.

Options

?=name_patt,

Specifies the characters to use instead of the identifier,

idreplace =

”?”, in naming the stacked series.

name_patt

By default, the name_patt is blank, indicating, for

 

example, that the stacked series corresponding to the

 

pattern “GDP?” will be named “GDP” in the stacked

 

workfile page. If pattern is set to “STK”, the stacked

 

series will be named GDPSTK.

 

 

interleave

Interleave the observations in the destination stacked

 

workfile (stack by using all of the series values for the

 

first source observation, followed by the values for the

 

second observation, and so on). The default is to stack

 

observations by identifier (stack the series one on top of

 

each other).

 

 

wf=wf_name

Optional name for the new workfile. If not provided,

 

EViews will create a new page in the default workfile.

 

 

page=page_name

Optional name for the newly created page. If not pro-

 

vided, EViews will use the next available name of the

 

form “Untitled##”, where ## is a number.

398—Appendix B. Command Reference

Examples

Consider a workfile that contains the seven series: GDPUS, GDPUK, GDPJPN, CONSUS, CONSUK, CONSJPN, CONSFR, and WORLDGDP.

pagestack us uk jpn @ *?

creates a new, panel structured workfile page with the series GDP and CONS, containing the stacked GDP? series (GDPUS, GDPUK, and GDPJPN) and stacked CONS? series (CONSUS, CONSUK, and CONSJPN). Note that CONSFR and WORLDGDP will not be copied or stacked.

We may specify the stacked series list explicitly. For example:

pagestack(page=stackctry) gdp? @ gdp? cons?

first determines the stack IDs from the names of series beginning with “GDP”, the stacks the GDP? and CONS? series. Note that this latter example also names the new workfile page STACKCTRY.

If we have a pool object, we may instruct EViews to use it to specify the IDs:

pagestack(wf=newwf, page=stackctry) countrypool @ gdp? cons?

Here, the panel structured page STACKCTRY will be created in the workfile NEWWF.

Simple series may be specified by adding them to the stack list, either directly, or using wildcard expressions. Both commands:

pagestack us uk jpn @ gdp? cons? worldgdp consfr

pagestack(wf=altwf) us uk jpn @ gdp? cons? *

stack the various GDP? and CONS? series on top of each other, and stack the simple series GDPFR and WORLDGDP on top of themselves.

In the first case, we create a new panel structured page in the same workfile containing the stacked series GDP and CONS and link objects CONSFR and WORLDGDP, which repeat the values of the series. In the second case, the new panel page in the workfile ALTWF will contain the stacked GDP and CONS, and series named CONSFR and WORLDGDP containing repeated copies of the values of the series.

The following two commands are equivalent:

pagestack(wf=newwf) us uk jpn @ *? *

pagestack(wf=newwf) us uk jpn

Here, every series, alpha, and link in the source workfile is stacked and copied to the destination workfile, either by stacking different series containing the stack_id or by stacking simple series on top of themselves.

pagestruct—399

The “?=” option may be used to prevent name collision.

pagestack(?="stk") us uk jpn @ gdp? gdp

stacks GDPUS, GDPUK and GDPJPN into a series called GDPSTK and repeats the values of the simple series GDP in the destination series GDP.

Cross-references

For additional discussion, see “Stacking a Workfile” on page 249 in the User’s Guide. See also pageunstack (p. 402).

pagestruct Command

Assign a structure to the active workfile page.

Syntax

Command: pagestruct(options) [id_list]

Command: 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 spec-

 

ified, defaults to “@FIRST”. Legal values for arg are

 

described below.

 

 

400—Appendix B. Command Reference

end=arg

End date of the regular frequency structure; if not spec-

 

ified, 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 observa-

 

tion ID.

 

The default is to prompt in interactive mode and to fail

 

in programs.

 

 

balance=arg,

Balance option (for panel data) describing how EViews

bal=arg

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 “bal-

 

ance=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.

 

 

 

 

pagestruct—401

 

 

 

 

 

dropna

Specifies that observations which contain missing val-

 

 

ues (NAs or blank strings) in any ID series (including

 

 

the date or observation ID) be removed from the work-

 

 

file. If “dropna” is not specified and NAs are found,

 

 

EViews will prompt in interactive mode and fail in pro-

 

 

grams.

 

 

 

 

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 pro-

 

 

 

vided 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:

Соседние файлы в папке Docs