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

fill—293

Examples

To fetch M1, GDP, and UNEMP from the default database, use:

fetch m1 gdp unemp

To fetch M1 and GDP from the US1 database and UNEMP from the MACRO database, use the command:

fetch(d=us1) m1 gdp macro::unemp

You can fetch all objects with names starting with “SP” by searching all registered databases in the search order. The “c=f” option uses the first (nonmissing) observation to convert the frequency of any matching series with a higher frequency than the destination workfile frequency:

fetch(d,c=f) sp*

You can fetch M1 and UNEMP from individual databank files using:

fetch(i) m1 c:\data\unemp

To fetch all objects with names starting with “CONS” from the two databases USDAT and UKDAT, use the command:

fetch usdat::cons* ukdat::cons*

The command:

fetch a?income

will fetch all series beginning with the letter “A”, followed by any single character, and ending with the string “income”.

Cross-references

See Chapter 10, “EViews Databases”, on page 259 of the User’s Guide for a discussion of databases, databank files, and frequency conversion. Appendix B, “Wildcards”, on page 943 of the User’s Guide describes the use of wildcard characters.

See also setconvert (p. 448), store (p. 490), and copy (p. 249).

fill

Coef Proc | Matrix Proc | Rowvector Proc | Series Proc | Sym Proc | Vector Proc

Fill an object with specified values.

fill can be used to set values of series, vectors and matrices in programs.

294—Appendix B. Command Reference

Syntax

Object Proc:

object_name.fill(options) n1[, n2, n3 …]

Follow the keyword with a list of values to place in the specified object. Each value should be separated by a comma. By default, series fill ignores the current sample and fills the series from the beginning of the workfile range. You may provide sample information using options.

Running out of values before the object is completely filled is not an error; the remaining cells or observations will be unaffected, unless the “l” option is specified. If, however, you list more values than the object can hold, EViews will not modify any observations and will return an error message.

Options

Options for series fill

l

Loop repeatedly over the list of values as many times as

 

it takes to fill the series.

 

 

o=[date, integer]

Set starting date or observation from which to start fill-

 

ing the series. Default is the beginning of the workfile

 

range.

 

 

s

Fill the series only for the current workfile sample. The

 

“s” option overrides the “o” option.

 

 

s=sample_name

Fill the series only for the specified subsample. The “s”

 

option overrides the “o” option.

Options for coef/vector/matrix fill

l

Loop repeatedly over the list of values as many times as

 

it takes to fill the object.

 

 

o=integer

Fill the object from the specified element. Default is the

(default=1)

first element.

 

 

b=arg

Matrix fill order: “c” (fill the matrix by column), “r” (fill

(default=“c”)

the matrix by row).

 

 

Examples

To generate a series D70 that takes the value 1, 2, and 3 for all observations from 1970:1:

series d70=0

d70.fill(o=1970:1,l) 1,2,3

fill—295

Note that the last argument in the fill command above is the letter “l”. The next three lines generate a dummy series D70S that takes the value one and two for observations from 1970:1 to 1979:4:

series d70s=0

smpl 1970:1 1979:4

d70s.fill(s,l) 1,2

smpl @all

Assuming a quarterly workfile, the following generates a dummy variable for observations in either the third and fourth quarter:

series d34

d34.fill(l) 0, 0, 1, 1

Note that this series could more easily be generated using @seas or the special workfile functions (see “Basic Date Functions” on page 590).

The following example declares a four element coefficient vector MC, initially filled with zeros. The second line fills MC with the specified values and the third line replaces from row 3 to the last row with –1.

coef(4) mc

mc.fill 0.1, 0.2, 0.5, 0.5 mc.fill(o=3,l) -1

The commands,

matrix(2,2) m1 matrix(2,2) m2 m1.fill 1, 0, 1, 2

m2.fill(b=r) 1, 0, 1, 2

create the matrices:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

m1 =

1

1

,

m2 =

1

0

(B.1)

 

0

2

 

 

1

2

 

 

 

 

 

 

 

 

 

 

 

Cross-references

See Chapter 3, “Matrix Language”, on page 23 for a detailed discussion of vector and matrix manipulation in EViews.

296—Appendix B. Command Reference

fiml

System Method

 

 

Estimation by full information maximum likelihood.

fiml estimates a system of equations by full information maximum likelihood (assuming a multivariate normal distribution).

Syntax

System Method: system_name.fiml(options)

Options

i

Iterate simultaneously over the covariance matrix and

 

coefficient vector.

 

 

s (default)

Iterate sequentially over the covariance matrix and

 

coefficient vector.

 

 

m=integer

Maximum number of iterations.

 

 

c=number

Set convergence criterion. The criterion is based upon

 

the maximum of the percentage changes in the scaled

 

coefficients.

 

 

b

Use Berndt-Hall-Hall-Hausman (BHHH) algorithm.

 

Default method is Marquardt.

 

 

showopts /

[Do / do not] display the starting coefficient values and

-showopts

estimation options in the estimation output.

 

 

deriv=keyword

Set derivative methods. The argument keyword should

 

be a oneor two-letter string. The first letter should

 

either be “f” or “a” corresponding to fast or accurate

 

numeric derivatives (if used). The second letter should

 

be either “n” (always use numeric) or “a” (use analytic

 

if possible). If omitted, EViews will use the global

 

defaults.

 

 

p

Print estimation results.

Examples

sys1.fiml

estimates SYS1 by FIML using the default settings. The command:

fit—297

sys1.fiml(d, s)

sequentially iterates over the coefficients and the covariance matrix.

Cross-references

See Chapter 23, “System Estimation”, on page 693 of the User’s Guide for a discussion of systems in EViews.

fit

Command || Equation Proc

 

 

Computes static forecasts or fitted values from an estimated equation.

When the regressor contains lagged dependent values or ARMA terms, fit uses the actual values of the dependent variable instead of the lagged fitted values. You may instruct fit to compare the forecasted data to actual data, and to compute forecast summary statistics.

Not available for equations estimated using ordered methods; use makemodel (p. 358) to create a model using the ordered equation results (see example below).

Syntax

Command:

fit(options) yhat [y_se]

Equation Proc:

eq_name.fit(options) yhat [y_se]

ARCH Proc:

eq_name.fit(options) yhat [y_se y_var]

Following the fit keyword, you should type a name for the forecast series and, optionally, a name for the series containing the standard errors and, for ARCH specifications, a name for the conditional variance series.

Forecast standard errors are currently not available for binary, censored, and count models.

Options

dIn models with implicit dependent variables, forecast the entire expression rather than the normalized variable.

uSubstitute expressions for all auto-updating series in the equation.

gGraph the fitted values together with the ±2 standard error bands.

e

Produce the forecast evaluation table.

298—Appendix B. Command Reference

i

Compute the fitted values of the index. Only for binary,

 

censored and count models.

 

 

sIgnore ARMA terms and use only the structural part of the equation to compute the fitted values.

nIgnore coefficient uncertainty in computing forecast standard error.

f = arg

Out-of-fit-sample fill behavior: “actual” (fill observa-

(default=

tions outside the fit sample with actual values for the

“actual”)

fitted variable), “na” (fill observations outside the fit

 

sample with missing values).

 

 

p

Print results.

 

 

Examples

equation eq1.ls cons c cons(-1) inc inc(-1) eq1.fit c_hat c_se

genr c_up=c_hat+2*c_se genr c_low=c_hat-2*c_se line cons c_up c_low

The first line estimates a linear regression of CONS on a constant, CONS lagged once, INC, and INC lagged once. The second line stores the static forecasts and their standard errors as C_HAT and C_SE. The third and fourth lines compute the +/- 2 standard error bounds. The fifth line plots the actual series together with the error bounds.

equation eq2.binary(d=l) y c wage edu

eq2.fit yf

eq2.fit(i) xbeta

genr yhat = 1-@clogit(-xbeta)

The first line estimates a logit specification for Y with a conditional mean that depends on a constant, WAGE, and EDU. The second line computes the fitted probabilities, and the third line computes the fitted values of the index. The fourth line computes the probabilities from the fitted index using the cumulative distribution function of the logistic distribution. Note that YF and YHAT should be identical.

Note that you cannot fit values from an ordered model. You must instead solve the values from a model. The following lines generate fitted probabilities from an ordered model:

equation eq3.ordered y c x z

eq3.makemodel(oprob1)

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