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

freq—303

freeze

Command

 

 

Creates graph, table, or text objects from a view.

Syntax

Command: freeze(name) object_name.view_command

If you follow the keyword freeze with an object name but no view of the object, freeze will use the default view for the object. You may provide a destination name for the object containing the frozen view in parentheses.

Examples

freeze gdp.uroot(4,t)

creates an untitled table that contains the results of the unit root test of the series GDP.

group rates tb1 tb3 tb6

freeze(gra1) rates.line(m)

show gra1.align(2,1,1)

freezes a graph named GRA1 that contains multiple line graphs of the series in the group RATES, realigns the individual graphs, and displays the resulting graph.

freeze(mygra) gra1 gra3 gra4

show mygra.align(2,1,1)

creates a graph object named MYGRA that combines three graph objects GRA1, GRA2, and GRA3, and displays MYGRA in two columns.

Cross-references

See “Object Commands” on page 6. See also Chapter 4, “Object Basics”, on page 71 of the User’s Guide for further discussion of objects and views of objects. Freezing graph views is described in “Creating Graphs” on page 413 of the User’s Guide.

freq

Alpha View | Group View | Series View

 

 

Compute frequency tables.

When used as a series view (or for a group containing a single series), freq performs a one-way frequency tabulation. The options allow you to control binning (grouping) of observations.

304—Appendix B. Command Reference

When used with a group containing multiple series, freq produces an N-way frequency tabulation for all of the series in the group.

Syntax

Object View:

object_name.freq(options)

Options

Options common to both one-way and N-way frequency tables

dropna (default)

[Drop/Keep] NA as a category.

/ keepna

 

 

 

v=integer

Make bins if the number of distinct values or categories

(default=100)

exceeds the specified number.

 

 

nov

Do not make bins on the basis of number of distinct

 

values; ignored if you set “v=integer.”

 

 

a=number

Make bins if average count per distinct value is less

(default=2)

than the specified number.

 

 

noa

Do not make bins on the basis of average count;

 

ignored if you set “a=number.”

 

 

b=integer

Maximum number of categories to bin into.

(default=5)

 

 

 

n, obs, count

Display frequency counts.

(default)

 

 

 

nocount

Do not display frequency counts.

 

 

p

Print the table.

 

 

Options for one-way tables

total (default) /

[Display / Do not display] totals.

nototal

 

 

 

pct (default) /

[Display / Do not display] percent frequencies.

nopct

 

 

 

cum (default) /

(Display/Do not) display cumulative frequency counts/

nocum

percentages.

 

 

Options for N-way tables

table (default)

Display in table mode.

 

 

list

Display in list mode.

freq—305

rowm (default) /

[Display / Do not display] row marginals.

norowm

 

 

 

colm (default) /

[Display / Do not display] column marginals.

nocolm

 

 

 

tabm (default) /

[Display / Do not display] table marginals—only for

notabm

more than two series.

 

 

subm (default) /

[Display / Do not display] sub marginals—only for “l”

nosubm

option with more than two series.

 

 

full (default) /

(Full/Sparse) tabulation in list display.

sparse

 

 

 

totpct / nototpct

[Display / Do not display] percentages of total observa-

(default)

tions.

 

 

tabpct / notab-

[Display / Do not display] percentages of table observa-

pct (default)

tions—only for more than two series.

 

 

rowpct / norow-

[Display / Do not display] percentages of row total.

pct (default)

 

 

 

colpct / nocolpct

[Display / Do not display] percentages of column total.

(default)

 

 

 

exp / noexp

[Display / Do not display] expected counts under full

(default)

independence.

 

 

tabexp / nota-

[Display / Do not display] expected counts under table

bexp (default)

independence—only for more than two series.

 

 

test (default) /

[Display / Do not display] tests of independence.

notest

 

Examples

hrs.freq(nov,noa)

tabulates each value (no binning) of HRS in ascending order with counts, percentages, and cumulatives.

inc.freq(v=20,b=10,noa)

tabulates INC excluding NAs. The observations will be binned if INC has more than 20 distinct values; EViews will create at most 10 equal width bins. The number of bins may be smaller than specified.

group labor lwage gender race

306—Appendix B. Command Reference

labor.freq(v=10,norowm,nocolm)

displays tables of LWAGE against GENDER for each bin/value of RACE.

Cross-references

See “One-Way Tabulation” on page 323 and “N-Way Tabulation” on page 379 of the User’s Guide for a discussion of frequency tables.

frml

Command || Object Declaration (Alpha) | Object Declaration (Series)

 

 

Declare a series object with a formula for auto-updating, or specify a formula for an existing series.

Syntax

Command: frml series_name = series_expression

Command: frml series_name = @clear

Follow the frml keyword with a name for the object, and an assignment statement. The special keyword “@CLEAR” is used to return the auto-updating series to an ordinary numeric or alpha series.

Examples

To define an auto-updating numeric or alpha series, you must use the frml keyword prior to entering an assignment statement. The following example creates a series named LOW that uses a formula to compute its values.:

frml low = inc<=5000 or edu<13

The auto-updating series takes the value 1 if either INC is less than or equal to 5000 or EDU is less than 13, and 0 otherwise, and will be re-evaluated whenever INC or EDU change.

If FIRST_NAME and LAST_NAME are alpha series, then the formula declaration:

frml full_name = first_name + " " + last_name

creates an auto-updating alpha series FULL_NAME.

You may apply a frml to an existing series. The commands:

series z = 3

frml—307

frml z =(x+y)/2

makes the previously created series Z an auto-updating series containing the average of series X and Y. Note that once a series is defined to be auto-updating, it may not be modified directly. Here, you may not edit Z, nor may you generate values into the series.

Note that the commands :

series z = 3

z = (x+y)/2

while similar, produce quite different results, since the absence of the frml keyword in the second example means that EViews will generate fixed values in the series instead of defining a formula to compute the series values. In this latter case, the values in the series Z are fixed, and may be modified.

One particularly useful feature of auto-updating series is the ability to reference series in databases. The command:

frml gdp = usdata::gdp

creates a series called GDP that obtains its values from the series GDP in the database USDATA. Similarly:

frml lgdp = log(usdata::gdp)

creates an auto-updating series that is the log of the values of GDP in the database USDATA.

To turn off auto-updating for a series or alpha, you should use the special expression “@CLEAR” in your frml assignment. The command:

frml z = @clear

sets the series to numeric or alpha value format, freezing the contents of the series at the current values.

Cross-references

See “Auto-Updating Series” on page 147 of the User’s Guide.

See also link (p. 338).

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