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

comment—247

cvsize=arg Specify the size of MacKinnon-Haug-Michelis (1999) (default=0.05) critical values to be displayed. The size must be

between 0.0001 and 0.9999; values outside this range will be reset to the default value of 0.05. This option is ignored if you set “cvtype=ol”.

p

Print output of the test.

 

 

Examples

coint(s,4) gdp m1 tb3

summarizes the results of the Johansen cointegration test among the three series GDP, M1, and TB3 for all five specifications of trend. The test equation uses lags of up to order four.

var1.coint(c,12) @

carries out the Johansen test for the series in the var object named VAR1. The “@”-sign without a list of exogenous variables ensures that the test does not include any exogenous variables in VAR1.

Cross-references

See “Cointegration Test” on page 737 of the User’s Guide for details on the Johansen test.

See also ec (p. 282).

comment

Table Proc

 

 

Adds or removes a comment in a table cell.

Syntax

Table Proc:

table_name.comment(cell_arg) [comment_arg]

where cell_arg, which identifies the cell, can take one of the following forms:

cell

Cell identifier. You can reference cells using either the

 

column letter and row number (e.g., “A1”), or by using

 

“R” followed by the row number followed by “C” and

 

the column number (e.g., “R1C2”).

 

 

row[,] col

Row number, followed by column letter or number

 

(e.g., “2,C”, or “2,3”), separated by “,”.

and where comment_arg is a string expression enclosed in double quotes. If command_arg is omitted, a previously defined comment will be removed.

248—Appendix B. Command Reference

Examples

To add a comment, “hello world”, to the cell in the second row, fourth column, you may use one of the following:

tab1.comment(d2) "hello world"

tab1.comment(r2c4) "hello world"

tab1.comment(2,d) "hello world"

tab1.comment(2,4) "hello world"

To remove a comment, simply omit the comment_arg:

tab1.comment(d2)

clears the comment (if present) from the second row, fourth column.

Cross-references

For additional discussion of tables see Chapter 4, “Working with Tables”. See also setlines (p. 465) and setmerge (p. 466).

control

Model Proc

 

 

Solve for values of control variable so that the target series matches a trajectory.

Syntax

Model Proc:

model_name.control control_var target_var trajectory

Specify the name of the control variable, followed by the target variable, and then the trajectory you wish to achieve for the target variable. EViews will solve for the values of the control so that the target equals the trajectory over the current workfile sample.

Examples

m1.control myvar targetvar trajvar

will put into MYVAR the values that lead the solution of the model for TARGETVAR to match TRAJVAR for the workfile sample.

Cross-references

See “Solve Control for Target” on page 814 of the User’s Guide. See Chapter 26, “Models”, on page 775 of the User’s Guide for a general discussion of models.

copy—249

copy

Command

 

 

Copy an object, or a set of objects matching a name pattern, within and between workfiles, workfile pages, and databases. Data in series objects may be frequency converted or match merged.

Syntax

Command: copy(options) src_spec dest_spec [src_id dest_id]

Command: copy(options) src_spec dest_spec [@src src_ids @dest dest_id]

where src_spec and dest_spec are of the form:

[ctype][container::][page\]object_name

There are three parts to the copy command: (1) a specification of the location and names of the source objects; (2) a specification of the location and names of the destination objects; (3) optional source and destination IDs if the copy operation involves match merging.

The source and destination objects are specified in multiple (optional) parts: (1) the container specification is the name of a workfile or database; (2) the page specification is the name of a page within a workfile or a subdirectory within a database; and (3) the object_name specification is the name of an object or a wildcard pattern corresponding to multiple objects.

The ctype specification is rarely required, but permits you to specify precisely your source or destination in cases where a database and workfile share the same name. In this case, ctype may be used to indicate the container to which you are referring by prefixing the container name with “:” to indicate the workfile, or “::” to indicate the database with the common name.

When parts of the source or destination specification are not provided, EViews will fill in default values where possible. The default container is the active workfile, unless the “::” prefix is used in which case the default container is the default database. The default page within a workfile is always the active page. The default name for the destination object is the name of the object within the source container.

If ID series are not provided in the command, then EViews will perform frequency conversion when copying data whenever the source and destination containers have different frequencies. If ID series are provided, then EViews will perform a general match merge between the source and destination using the specificed ID series. In the case where you wish to copy your data using match merging with special treatment for date matching, you must use the special keyword “@DATE” as an ID series for the source or destination. If

250—Appendix B. Command Reference

“@DATE” is not specified as an identifier in either the source or destination IDs, EViews will perform an exact match merge using the given identifiers.

If ID series are not specified, but a conversion option requiring a general match merge is used (e.g., “c=med”), “@DATE @DATE” will be appended to the list of IDs and a general date match merge will be employed.

See linkto (p. 339) for additional discussion of the differences embodied in these choices.

The general syntax described above covers all possible uses of the copy command. The following paragraphs provide examples of the specific syntax used for some common cases of the command.

Copying Within a Workfile

Copy an object within the default workfile page as a new object with a different name:

• copy(options) src_name dest_name

Copy an object from the src_page page into the default workfile page using the specified name:

• copy(options) src_page\src_name dest_name

Copy an object from the src_page page into the dest_page page, keeping the same name:

• copy(options) src_page\src_names dest_page\

Copy an object from the src_page page to the default workfile page, match merging any series data using a single src_id and a single dest_id identifier series:

• copy(options) src_page\src_name dest_name src_id dest_id

Copy an object from the src_page page to the dest_page match merging any series data using multiple source and destination identifier series:

copy(options) src_page\src_name dest_page\dest_name @src src_id1 src_id2 ...

src_id_n @dest dest_id1 dest_id2 ... dest_id_n

Copying Between Containers (Workfiles and Databases)

Copy one or more objects from the src_page of the workfile src_workfile to the dest_page of the workfile dest_workfile, using the name or name pattern given in src_names:

• copy(options) src_workfile::src_page\src_names dest_workfile::dest_page\

Copy an object from database src_database to the default page in the container dest_container:

copy—251

• copy(options) src_database::src_name dest_container::dest_name

Note that if both a workfile and database exist matching the name provided in dest_container, EViews will favor the workfile unless the “::” prefix is used to specify explicitly that the database should be used.

Options

Basic Options

overwrite / o

Overwrite any existing object with the destination name

 

in the destination container. Error only if a non-editable

 

series is encountered in the destination location.

 

 

merge / m

If the source object is a series, merge the data from the

 

source series into any existing destination series, pre-

 

serving any values in the destination series that are not

 

present in the source. For all other object types, over-

 

write any existing object with the source object. Error if

 

a non-editable series is encountered in the destination

 

location.

 

 

protect / p

Protect objects in the destination location from over-

 

writing or merging. If there is an existing object in the

 

destination container, cancel the copy operation for that

 

object, but do not generate an error.

 

 

noerr

Suppress errors that are generated during the copy. For

 

example, if the overwrite option is used, suppress any

 

error caused by attempting to overwrite a non-editable

 

series such as an index series used in the workfile struc-

 

ture.

Group Copy Options

When copying a group object from workfile to database:

g=arg

Method for copying group objects from a workfile to

 

database: “s” (copy group definition and series as sepa-

 

rate objects), “t” (copy group definition and series as

 

one object), “d” (copy series only as separate objects),

 

“l” (copy group definition only).

 

 

When copying a group object from a database to a workfile:

252—Appendix B. Command Reference

g=arg

Method for copying group objects from a database or

 

workfile to a workfile: “b” (copy both group definition

 

and series), “d” (copy only the series), “l” (copy only

 

the group definition).

 

 

Note that copying a group object containing expressions or auto-updating series between workfiles only copies the expressions, and not the underlying series.

Frequency Conversion Options

If the copy command does not specify identifier series, EViews will perform frequency conversion of the data contained in series objects whenever the source and destination containers do not have the same frequency.

The following options control the frequency conversion method when copying series and group objects into a workfile page and converting from low to high frequency:

c=arg

Low to high conversion methods: “r” (constant match

 

average), “d” (constant match sum), “q” (quadratic

 

match average), “t” (quadratic match sum), “i” (linear

 

match last), “c” (cubic match last).

 

 

The following options control the frequency conversion method when copying series and group objects into a workfile page and converting from high to low frequency:

c=arg

High to low conversion methods removing NAs: “a”

 

(average of the nonmissing observations), “s” (sum of

 

the nonmissing observations), “f” (first nonmissing

 

observation), “l” (last nonmissing observation), “x”

 

(maximum nonmissing observation), “m” (minimum

 

nonmissing observation).

 

High to low conversion methods propagating NAs: “an”

 

or “na” (average, propagating missings), “sn” or “ns”

 

(sum, propagating missings), “fn” or “nf” (first, propa-

 

gating missings), “ln” or “nl” (last, propagating miss-

 

ings), “xn” or “nx” (maximum, propagating missings),

 

“mn” or “nm” (minimum, propagating missings).

 

 

Note that if no conversion method is given in the command, the conversion method specified within the series object will be used as the default. If the series does not contain an explicit conversion method, the global option settings will used to determine the method.

copy—253

Match Merge Options

These options are available when ID series are specified in the copy commmand.

smpl=

Sample to be used when computing contractions during

smpl_spec

copying using match merge. Either provide the sample

 

range in double quotes or specify a named sample

 

object. By default, EViews will use the entire workfile

 

sample “@ALL”.

 

 

c=arg

Set the match merge contraction method.

 

If you are copying a numeric source series by general

 

match merge, the argument can be one of: “mean”,

 

“med” (median), “max”, “min”, “sum”, “sumsq” (sum-

 

of-squares), “var” (variance), “sd” (standard devia-

 

tion), “skew” (skewness), “kurt” (kurtosis), “quant”

 

(quantile, used with “quant=” option), “obs” (number

 

of observations), “nas” (number of NA values), “first”

 

(first observation in group), “last” (last observation in

 

group), “unique” (single unique group value, if

 

present), “none” (disallow contractions).

 

If copying an alpha series, only the non-summary meth-

 

ods “max”, “min”, “obs”, “nas”, first”, “last”, “unique”

 

and “none” are supported.

 

For copying of numeric series, the default contraction

 

method is “c=mean”; for copying of alpha series, the

 

default is “c=unique”.

quant=number Quantile value to be used when contracting using the “c=quant” option (e.g, “quant=.3”).

nacat

Treat “NA” values as a category when copying using

 

general match merge operations.

Most of the conversion options should be self-explanatory. As for the others: “first” and “last” give the first and last non-missing observed for a given group ID; “obs” provides the number of non-missing values for a given group; “nas” reports the number of NAs in the group; “unique” will provide the value in the source series if it is the identical for all observations in the group, and will return NA otherwise; “none” will cause the copy to fail if there are multiple observations in any group—this setting may be used if you wish to prohibit all contractions.

On a match merge expansion, copying with match merging will repeat the value of the source for every observation with matching identifier values in the destination. If both the

254—Appendix B. Command Reference

source and destination have multiple values for a given ID, EViews will first perform a contraction in the source (if not ruled out by “c=none”), and then perform the expansion by replicating the contracted value in the destination.

Examples

copy good_equation best_equation

makes an exact copy of GOOD_EQUATION and names it BEST_EQUATION.

copy graph_1 wf2::wkly\graph1

copies GRAPH_1 from the default page of the current workfile to GRAPH1 in the page WKLY of the workfile WF2.

copy gdp usdat::

copies GDP from the current workfile to GDP in the USDAT database or workfile.

copy ::gdp macro1::gdp_us

copies GDP from the default database to either the open workfile MACRO1, or the database named MACRO1 if there is no open workfile with that name. If there is an open workfile MACRO1 you may use

copy ::gdp ::macro1::gdp_us

to specify explicitly that you wish to write to the MACRO1 database.

copy(smpl="1990 2000") page1\pop page2\ @src county @date @dest county @date

copies POP data for 1990 through 2005 from PAGE1 to PAGE2, match merge using the ids COUNTY and the date structure of the two pages.

copy(smpl="1990 2000", c=mean) panelpage\inc countypage\ county county

copies the INC data from the PANELPAGE to the COUNTYPAGE, match merging using the values of the COUNTY series, and contracting the panel data by computing means for each county using the specified sample.

copy countypage\pop panelpage\ county county

match merges the POP data from the COUNTYPAGE to the PANELPAGE using the values of the COUNTY series.

copy(c=x, merge) quarterly::page1\ser* annual::page6\*

copies all objects with names beginning with “SER” on page PAGE1 of workfile QUARTERLY into page PAGE6 of workfile ANNUAL using the existing names. Series objects with

cor—255

data that can be (high-to-low) frequency converted will take the maximum value within a low-frequency period as the conversion method. If destination series already exist with the same name as the source series, the data will be merged. If destination objects (non-series) exist with the same name as source series, they will be overwritten.

Note that since databases are read from disk, you may provide a path for the database in the container specification, as in:

copy "c:\my data\dba.edb::ser01" ser02

which copies the object SER01 from the database DBA.EDB located in the path “C:\MY DATA\” to SER02 in the default workfile page.

copy gd* "c:\my data\findat::"

makes a duplicate of all objects in the default page of the current workfile with names starting with "GD" to the database FINDAT in the root of “C:\MY DATA\”.

Cross-references

See “Copying Objects” on page 268 of the User’s Guide for a discussion of copying and moving objects.

See also fetch (p. 291), setconvert (p. 448), store (p. 490), and linkto (p. 339).

cor

Command || Group View | Matrix View | Sym View

 

 

Correlation matrix.

 

Syntax

 

Command:

cor(options) ser1 ser2 [ser3 ...]

Group View:

group_name.cor(options)

Matrix View:

matrix_name.cor(options)

In command form, EViews creates an untitled group from the listed series, then displays the correlation matrix view for that group. When used as a matrix view, cor displays the correlation matrix computed from the columns of the matrix.

Options

iCompute correlations using pairwise samples (default is to use the common sample).

p

Print the correlation matrix.

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