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

104—Chapter 6. EViews 5.1 Command Reference Update Summary

Cross-references

See Chapter 1, “EViews 5.1 Enhanced Graph Customization”, on page 33 for a discussion of graph objects in EViews.

See addtext (p. 70) and textdefault (p. 136). See setelem (p. 126) for changing legend text and other graph options.

line

Command || Coef View | Graph Command | Group View | Matrix View | Rowvector View | Series View | Sym View | Vector View

Display a line graph of object, or change existing graph object type to line plot.

The line graph view of a group plots all series in the group in a graph. The line graph view of a matrix plots each column in the matrix in a graph.

Syntax

Command:

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

Object View:

object_name.line(options)

Graph Proc:

graph_name.line(options)

Options

Template and printing 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 line graph.

 

 

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

EViews 5.1 Command Reference Update Summary—105

Scale options (for multiple line views of group and matrix objects)

a (default)

Automatic single scale.

 

 

d

Dual scaling with no crossing. The first series is scaled

 

on the left and all other series are scaled on the right.

 

 

x

Dual scaling with possible crossing. See the “d” option.

 

 

n

Normalized scale (zero mean and unit standard devia-

 

tion). May not be used with the “s” option.

 

 

s

Stacked line graph. Each area represents the cumulative

 

total of the series listed. The difference between areas

 

corresponds to the value of a series. May not be used

 

with the “l” option.

 

 

m

Plot lines in multiple graphs (will override the “s” or “l”

 

options). Not for use with an existing graph object.

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

group g1 gdp cons m1

g1.line(d)

plots line graphs of the three series in group G1 with dual scaling (no crossing). The latter two series will share the same scale.

106—Chapter 6. EViews 5.1 Command Reference Update Summary

matrix1.line(t=mygra)

displays line graphs of the columns of MATRIX1 using the graph object MYGRA as a template.

line(m) gdp cons m1

creates an untitled graph object that contains three line graphs of GDP, CONS, and M1, with each plotted separately.

g1.line(o=midnight, b, w)

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

Cross-references

See Chapter 1, “EViews 5.1 Enhanced Graph Customization”, on page 33 for a detailed discussion of graphs in EViews.

See also graph for graph declaration and other graph types.

linkto

Link Proc

 

 

Define the specification of a series link.

Specify the method by which the object uses data in an existing series. Links are used to perform cross-page match merging or frequency conversion.

Syntax

Link Proc:

link_name.linkto(options) source_page\series_name [src_id

 

dest_id]

Link Proc:

link_name.linkto(options) source_page\series_name [@src src_ids

 

@dest dest_ids]

The most common use of linkto will be to define a link that employs general match merging. You should use the keyword linkto followed by any desired options, and then provide the name of the source series followed by the names of the source and destination IDs. If more than one identifier series is used, you must separate the source and destination IDs using the “@SRC” and “@DEST” keywords.

In the special case where you wish to link your data using date matching, you must use the special keyword “@DATE” as an ID series for a regular frequency page. If “@DATE” is not specified as either a source or destination ID, EViews will perform an exact match merge using the specified identifiers.

EViews 5.1 Command Reference Update Summary—107

The other use of linkto will be to define a frequency conversion link between two date structured pages. To specify a frequency conversion link, you should use the linkto keyword followed by any desired options and then the name of a numeric source series. You must not specify ID series since a frequency conversion link uses the implicit dates associated with the regular frequency pages—if ID series are specified, the link will instead employ general match merging. Note also that if ID series are not specified, but a general match merge specific conversion option is provided (e.g., “c=med”), “@DATE @DATE” will be appended to the list of IDs and a general match merge employed.

It is worth mentioning that a frequency conversion link that uses an alpha source series will generate an evaluation error.

Note that linking by frequency conversion is the same as linking by general match merge using the source and destination IDs “@DATE @DATE” with the following exceptions:

General match merge linking offers contraction methods not available with frequency conversion (e.g., median, variance, skewness).

General match merge linking allows you to use samples to restrict the source observations used in evaluating the link.

General match merge linking allows you to treat NA values in the ID series as a category to be used in matching.

Frequency conversion linking offers expansion methods other than repeat.

Frequency conversion linking provides options for the handling of NA values.

Frequency conversion linking uses special handling for panel structured pages. Links involving panel pages first perform a mean contraction in the source page, if necessary, then a frequency conversion to the destination page, then an expansion in the destination, if necessary.

Options

General Match Merge Link Options

The following options are available when linking with general match merging:

smpl=

Sample to be used when computing contractions during

smpl_spec

linkin 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”.

 

 

108—Chapter 6. EViews 5.1 Command Reference Update Summary

c=arg

Set the match merge contraction or the frequency con-

 

version method.

 

If you are linking 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 linking an alpha series, only the non-summary meth-

 

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

 

and “none” are supported. For numeric links, the

 

default contraction method is “c=mean”; for alpha

 

links, the default is “c=unique”.

 

If you are linking by frequency conversion, you may use

 

this argument to specify the upor down-conversion

 

method using the options found in fetch. The default

 

frequency conversion methods are taken from the series

 

defaults.

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 performing link

 

by 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 link 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, linking by ID will repeat the values of the source for every matching value of the destination. If both the 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.

EViews 5.1 Command Reference Update Summary—109

Frequency Conversion Link Options

If the linkto command does not specify identifier series, EViews will link series data using frequency conversion where appropriate.

The following options control the frequency conversion method when creating a frequency conversion link, 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 creating a frequency conversion link, 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 specified, the series specific default conversion method or the global settings will be employed.

Examples

General Match Merge Linking

Let us start with a concrete example. Suppose our active workfile page contains observations on the 50 states of the US, and contains a series called STATE containing the unique state identifiers. We also have a workfile page called INDIV that contains data on individuals from all over the country, their incomes (INCOME), and their state of birth (BIRTHSTATE).

Now suppose that we wish to find the median income of males in our data for each possible state of birth, and then to match merge that value into our 50 observation state page.

The following commands:

110—Chapter 6. EViews 5.1 Command Reference Update Summary

link male_income

male_income.linkto(c=med, smpl="if male=1") indiv\income birthstate state

create the series link MALE_INCOME. MALE_INCOME contains links to the individual INCOME data, telling EViews to subsample only observations where MALE=1, to compute median values for individuals in each BIRTHSTATE, and to match observations by comparing the values of BIRTHSTATE to STATE in the current page.

In this next example, we link to the series X in the INDIV page, matching values of the IND1 and the IND2 series in the two workfile pages. The link will compute the number of valid observations in the X series for each index group, with NA values in the ID series treated as a valid identifier value.

link l1.linkto(c=obs,nacat) indiv\x @src ind1 ind2 @dest ind1 ind2

You may wish to use the “@DATE” keyword as an explicit identifier, in order to gain access to our expanded date matching feature. In our annual workfile, the command:

link gdp.linkto(c=sd) monthly\gdp @date @date

will create link that computes the standard deviation of the values of GDP for each year and then match merges these values to the years in the current page. Note that this command is equivalent to:

link gdp.linkto(c=sd) quarterly\gdp

since the presence of the match merge option “c=sd” and the absence of indices instructs EViews to perform the link by ID matching using the defaults “@DATE” and “@DATE”.

Frequency Conversion Linking

Suppose that we are in an annual workfile page and wish to link data from a quarterly page. Then the commands:

link gdp

gdp.linkto quarterly\gdp

creates a series link GDP in the current page containing a link by date to the GDP series in the QUARTERLY workfile page. When evaluating the link, EViews will automatically frequency convert the quarterly GDP to the annual frequency of the current page, using the series default conversion options. If we wish to control the conversion method, we can specify the conversion method as an option:

Соседние файлы в папке EViews5
  • #
    23.03.201519.56 Кб51EV5help.cnt
  • #
    23.03.2015192.68 Кб51EV5Help.GID
  • #
    23.03.201513.28 Mб51EV5help.hlp
  • #
    23.03.20151.19 Mб103EViews 5.1 Update.pdf
  • #
    23.03.201551 б52EViews32.ini
  • #
    23.03.2015654 б51Eviews5.exe.manifest
  • #
    23.03.2015995 б50EVX11.PIF
  • #
    23.03.201540.58 Кб52F77L3.EER
  • #
    23.03.2015424.32 Кб54johtab.bin