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

474—Appendix B. Command Reference

smpl

Command

 

 

Set sample range.

The smpl command sets the workfile sample to use for statistical operations and series assignment expressions.

Syntax

Command:

smpl smpl_spec

Command:

smpl sample_name

List the date or number of the first observation and the date or number of the last observation for the sample. Rules for specifying dates are given in “Dates” on page 129 of the User’s Guide. The sample spec may contain more than one pair of beginning and ending observations.

The smpl command also allows you to select observations on the basis of conditions specified in an if statement. This enables you to use logical operators to specify what observations to include in EViews’ procedures. Put the if statement after the pairs of dates.

You can also use smpl to set the current observations to the contents of a named sample object; put the name of the sample object after the keyword.

Special keywords for smpl

The following “@-keywords” can be used in a smpl command:

@all

The entire workfile range.

 

 

@first

The first observation in the workfile.

 

 

@last

The last observation in the workfile.

 

 

In panel settings, you may use the additional keywords:

@firstmin

The earliest of the first observations (computed across

 

cross-sections).

 

 

@firstmax

The latest of the first observations.

 

 

@lastmin

The earliest of the last observations.

 

 

@lastmax

The latest of the last observations.

solve—475

Examples

smpl 1955m1 1972m12

sets the workfile sample from 1955M1 to 1972M12.

smpl @first 1940 1946 1972 1975 @last

excludes observations (or years) 1941–1945 and 1973–1974 from the workfile sample.

smpl if union=1 and edu<=15

sets the sample to those observations where UNION takes the value 1 and EDU is less than or equal to 15.

sample half @first @first+@obs(x)/2

smpl half

smpl if x>0

smpl @all if x>0

The first line declares a sample object named HALF which includes the first half of the series X. The second line sets the sample to HALF and the third line sets the sample to those observations in HALF where X is positive. The last line sets the sample to those observations where X is positive over the full sample.

Cross-references

See “Samples” on page 93 of the User’s Guide for a discussion of samples in EViews.

See also set (p. 444) and sample (p. 429).

solve

Command || Model Proc

 

 

Solve the model.

solve finds the solution to a simultaneous equation model for the set of observations specified in the current workfile sample.

Syntax

Command: solve(options) model_name

Model Proc:

model_name.solve(options)

Note: when solve is used in a program (batch mode) models are always solved over the workfile sample. If the model contains a solution sample, it will be ignored in favor of the workfile sample.

476—Appendix B. Command Reference

You should follow the name of the model after the solve command or use solve as a procedure of a named model object. The default solution method is dynamic simulation. You may modify the solution method as an option.

solve first looks for the specified model in the current workfile. If it is not present, solve attempts to fetch a model file (.DBL) from the default directory or, if provided, the path specified with the model name.

Options

solve can take any of the options available in solveopt (p. 476).

Examples

solve mod1

solves the model MOD1 using the default solution method.

nonlin2.solve(m=500,e)

solves the model NONLIN2 with an extended search of up to 500 iterations.

Cross-references

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

See also model (p. 370), msg (p. 371) and solveopt (p. 476).

solveopt

Model Proc

 

 

Solve options for models.

solveopt sets options for model solution but does not solve the model. The same options can be set directly in a solve procedure.

Syntax

 

Model Proc:

model_name.solveopt(options)

Options

 

 

 

 

 

s=arg

Solution type: “d” (deterministic), “m” (stochastic –

 

(default=“d”)

collect means only), “s” (stochastic – collect means and

 

 

s.d.), “b” (stochastic – collect means and confidence

 

 

bounds), “a” (stochastic – collect all; means, s.d. and

 

 

confidence bounds).

 

 

 

 

 

solveopt—477

 

 

 

 

 

d=arg

Model solution dynamics: “d” (dynamic solution), “s”

 

(default=“d”)

(static solution), “f” (fitted values – single equation

 

 

solution).

 

 

 

 

m=integer

Maximum number of iterations for solution (maximum

 

 

(default=5000)

100,000).

 

 

 

 

 

 

c=number

Convergence criterion. Based upon the maximum

 

(default=1e-8)

change in any of the endogenous variables in the

 

 

model. You may set a number between 1e-15 and 0.01.

 

 

 

 

r=integer

Number of stochastic repetitions (used with stochastic

 

 

(default=1000)

“s=” options).

 

 

 

 

 

 

b=number

Size of stochastic confidence intervals (used with sto-

 

(default=.95)

chastic “s=” options).

 

 

 

 

a=arg

Alternate scenario solution: “t” (true - solve both active

 

 

(default=“f”)

and alternate scenario and collect deviations for sto-

 

 

 

chastic), “f” (false - solve only the active scenario).

 

 

 

 

 

 

o=arg

Solution method: “g” (Gauss-Seidel), “e” (Gauss-Seidel

 

(default=“g”)

with extended search/reduced step size), “n” (New-

 

 

ton), “m” (Newton with extended search/reduced step

 

 

size).

 

 

 

 

i=arg

Set initial (starting) solution values: “a” (actuals), “p”

 

 

(default=“a”)

(values in period prior to start of solution period).

 

 

 

 

 

 

n=arg

NA behavior: “t” (true - stop on “NA” values), “f”

 

(default=“t”)

(false - do not stop when encountering “NA” values).

 

 

Only applies to deterministic solution; EViews will

 

 

always stop on “NA” values in stochastic solution.

 

 

 

 

e=arg

Excluded variables initialized from actuals: “t” (true),

 

 

(default=“t”)

“f” (false).

 

 

 

 

 

 

cu=arg

Include coefficient uncertainty: “t” (true), “f” (false).

 

(default=“f”)

 

 

 

 

 

 

t=arg

Terminal condition for forward solution: “u” (user sup-

 

 

(default=“u”)

plied - actuals), “l” (constant level), “d” (constant dif-

 

 

 

ference), “g” (constant growth rate).

 

 

 

 

 

 

g=arg

Number of digits to round solution: an integer value

 

(default=7)

(number of digits), “n” (do not roundoff).

 

 

 

 

z=arg

Zero value: a positive number below which the solution

 

 

(default=1e-7)

(absolute value) is set to zero, “n” (do not set to zero).

 

 

 

 

 

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