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

402—Appendix B. Command Reference

pagestruct(freq=a, start=1950)

pagestruct(none)

Cross-references

For extensive discussion, see “Structuring a Workfile” beginning on page 205 in the User’s Guide.

pageunstack Command

Unstack workfile page (convert repeated observations to repeated series).

Create a new workfile page by taking series objects (series, alphas, or links) in the default workfile page and breaking them into multiple series (or alphas), one for each distinct value found in a user supplied list of series objects. Typically used on a page with a panel structure.

Syntax

Command: pageunstack(options) stack_id obs_id [@ series_to_unstack]

where stack_id is a single series containing the unstacking ID values used to identify the individual unstacked series, obs_id is a series containing the observation IDs, and series_to_unstack is an optional list of series objects to be copied to the new workfile.

Options

namepat

Specifies the pattern from which unstacked series

=name_pattern

names are constructed, where “*” indicates the original

 

series name and “?” indicates the stack ID.

 

By default the name_pattern is “*?”, indicating, for

 

example, that if we have the IDs “US”, “UK”, “JPN”,

 

the unstacked series corresponding to the series GDP

 

should be named “GDPUS”, “GDPUK”, “GDPJPN” in

 

the unstacked workfile page.

 

 

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 page in the destination workfile.

 

If not provided, EViews will use the next available

 

name of the form “Untitled##”, where ## is a number.

 

 

pageunstack—403

Examples

Consider a workfile that contains the series GDP and CONS which contain the values of Gross Domestic Product and consumption for three countries stacked on top of each other. Suppose further there is an alpha object called COUNTRY containing the observations “US”, “UK”, and “JPN”, which identify which from which country each observation of GDP and CONS comes. Finally, suppose there is a date series DATEID which identifies the date for each observation. The command:

pageunstack country dateid @ gdp cons

creates a new workfile page using the workfile frequency and dates found in DATEID. The page will contain the 6 series GDPUS, GDPUK, GDPJPN, CONSUS, CONSUK, and CONSJPN corresponding to the unstacked GDP and CONS.

Typically the source workfile described above would be structured as a dated panel with the cross-section ID series COUNTRY and the date ID series DATEID. Since the panel has built-in date information, we may use the “@DATE” keyword as the DATEID. The command:

pageunstack country @date @ gdp cons

uses the date portion of the current workfile structure to identify the dates for the unstacked page..

The stack_id must be an ordinary, or an alpha series that uniquely identifies the groupings to use in unstacking the series. obs_id may be one or more ordinary series or alpha series, the combination of which uniquely identify each observation in the new workfile.

You may provide an explicit list of series to unstack following an “@” immediately after the obs_id. Wildcards may be used in this list. For example:

pageunstack country dateid @ g* c*

unstacks all series and alphas that have names that begin with “G” or “C’.

If no series_to_unstack list is provided, all series in the source workfile will be unstacked. Thus, the two commands:

pageunstack country dateid @ *

pageunstack country dateid

are equivalent.

By default, series are named in the destination workfile page by appending the stack_id values to the original series name. Letting “*” stand for the original series name and “?” for the stack_id, names are constructed as “*?”. This default may be changed using the “namepat=” option. For example:

404—Appendix B. Command Reference

pageunstack(namepat="?_*") country dateid @ gdp cons

creates the series US_GDP, UK_GDP, JPN_GDP, etc.

Cross-references

For additional discussion and examples, see “Unstacking a Workfile” on page 242 of the User’s Guide. See also pagestack (p. 396).

param

Command

 

 

Set parameter values.

Allows you to set the current values of coefficient vectors. The command may be used to provide starting values for the parameters in nonlinear least squares, nonlinear system estimation, and (optionally) ARMA estimation.

Syntax

Command: param coef_name1 number1 [coef_name2 number2 coef_name3 number3…]

List, in pairs, the names of the coefficient vector and its element number followed by the corresponding starting values for any of the parameters in your equation.

Examples

param c(1) .2 c(2) .1 c(3) .5

resets the first three values of the coefficient vector C.

coef(3) beta

param beta(2) .1 beta(3) .5

The first line declares a coefficient vector BETA of length 3 that is initialized with zeros. The second line sets the second and third elements of BETA to 0.1 and 0.5, respectively.

Cross-references

See “Starting Values” on page 485 of the User’s Guide for a discussion of setting initial values in nonlinear estimation.

pcomp—405

pcomp

Group View

 

 

Principal components analysis.

Syntax

 

Group View:

group_name.pcomp(options) [ser1 ser2 ...]

Enter the name of the group followed by a period, the keyword and optionally, a list of k names to store the first k principal components. Separate each name in the list with a space and do not list more names than the number of series in the group.

Options

cor (default)

Use sample correlation matrix.

 

 

cov

Use sample covariance matrix.

 

 

dof

Degrees of freedom adjustment if “cov” option used.

 

Default is no adjustment (compute sample covariance

 

dividing by n rather than n − 1 ).

 

 

eigval=vec_name

Specify name of vector to hold the saved the eigenval-

 

ues in workfile.

 

 

eigvec=mat_name

Specify name of matrix to hold the save the eigenvec-

 

tors in workfile.

 

 

p

Print results.

Examples

group g1 x1 x2 x3 x4

freeze(tab1) g1.pcomp(cor, eigval=v1, eigvec=m1) pc1 pc2

The first line creates a group named G1 containing the four series X1, X2, X3, X4. The second line stores the first two principal components of the sample correlation matrix in series named PC1 and PC2. The output view is stored in a table named TAB1, the eigenvalues in a vector named V1, and the eigenvectors in a matrix named M1.

Cross-references

See “Principal Components” on page 383 of the User’s Guide for further discussion.

406—Appendix B. Command Reference

pie

Command || Graph Command | Group View | Matrix View | Rowvector View | Sym View

Display pie graph view of data in object, or change existing graph object type to pie chart.

Display pie charts for any number of series or data in a matrix object. There will be one pie for each date or observation number, or each row of a matrix, provided the values are positive. Each series or column is shown as a wedge in a different color/pattern, where the width of the wedge equals the percentage contribution of the series/column to the total of all listed series.

Syntax

Command:

pie(options) arg1 [arg2 arg3 ...]

Object View:

object_name.pie(options)

Graph Proc:

graph_name.pie(options)

To use pie as a command, simply list the name of one or more series or groups, or a matrix object to include in the pie chart. You may also change the exiting graph type by using pie as a proc. Simply list the graph name, followed by a period, and the pie keyword.

Options

o= template

Use appearance options from the specified template.

 

template may be a predefined template keyword

 

(‘default” - current global defaults, “classic”, “modern”,

 

“reverse”, “midnight”, “spartan”, “monochrome”) or a

 

graph in the workfile.

 

 

t=graph_name

Use appearance options and copy text and shading from

 

the specified graph.

 

 

b / -b

[Apply / Remove] bold modifiers of the base template

 

style specified using the “o=” option above.

 

 

w / -w

[Apply / Remove] wide modifiers of the base template

 

style specified using the “o=” option above.

 

 

p

Print the pie graph.

 

 

The options which support the “-” may be proceeded by a “+” or “-” indicating whether to turn on or off the option. The “+” is optional.

pie—407

Panel options

The following options apply when graphing panel structured data.

panel=arg

Panel data display: “stack” (stack the cross-sections),

(default taken

“individual” or “1” (separate graph for each cross-sec-

from global settion), “combine” or “c” (combine each cross-section in

tings)

single graph; one time axis), “mean” (plot means

 

across cross-sections), “mean1se” (plot mean and +/-

 

1 standard deviation summaries), “mean2sd” (plot

 

mean and +/- 2 s.d. summaries), “mean3sd” (plot

 

mean and +/- 3 s.d. summaries), “median” (plot

 

median across cross-sections), “med25” (plot median

 

and +/- .25 quantiles), “med10” (plot median and +/-

 

.10 quantiles), “med05” (plot median +/- .05 quan-

 

tiles), “med025” (plot median +/- .025 quantiles),

 

“med005” (plot median +/- .005 quantiles), “med-

 

mxmn” (plot median, max and min).

Examples

smpl 1990 1995

pie cons inv gov

shows six pie charts, each divided into CONS, INV, and GOV.

graph gr1.line cons inv gov

gr1.pie

creates a line graph GR1 and then changes the graph to a pie chart.

gr1.pie(o=midnight, b, w)

creates a pie graph using the group G1, applying the settings of the predefined template “midnight”, with the bold and wide modifiers.

Cross-references

See Chapter 14 of the User’s Guide for a discussion of graphs and templates.

See also graph (p. 316) for graph declaration and other graph types.

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