Object Reference : Object View and Procedure Reference : Model
  
Model
 
Scalar values
String values
String values for Model variables
addassign
addinit
addover
adjust
append
block
boundscheck
clearhist
clearremarks
compare
control
copy
display
displayname
drop
droplink
endog
eqs
exclude
digraph
fliptype
innov
Options for endogenous variables
Options for exogenous variables
label
makeendog
makegraph
makegroup
merge
model
msg
olepush
override
printview
reinclude
replace
replacelink
replacevar
revert
scenario
Compatibility Notes
scenlist
setattr
setbounds
settrace
solve
solveopt
spec
stochastic
text
trace
track
undoflip
unlink
update
vars
Set of simultaneous equations used for forecasting and simulation.
Model Declaration
model declare model object.
Declare an object by entering the keyword model, followed by a name:
model mymod
declares an empty model named MYMOD. To fill MYMOD, open the model and edit the specification view, or use the append view. Note that models are not used for estimation of unknown parameters.
See also the section on model keywords in “Text View”.
Model Views
block display model block structure.
boundscheck show a display of any series that have crossed their set boundaries during a solve.
compare show the differences between scenarios for the specified series.
display display table, graph, or spool in object window.
eqs view of model organized by equation.
digraph display the model dependency graph.
label view or set label information for the model.
msg display model solution messages.
printview show enhanced display of the mode specification.
scenlist display list description of the model scenarios.
text show text showing equations in the model.
trace view of trace output from model solution.
vars view of model organized by variable.
Model Procs
addassign assign add factors to equations.
addinit initialize add factors.
adjust prepare a variable for editing in the current scenario and/or update its values using an array expression.
addover set the active scenario add factor overrides.
append append a line of text to a model.
clearhist clear the contents of the history attribute.
clearremarks clear the contents of the remarks attribute.
control solve for values of control variables so that targets match trajectories.
copy creates a copy of the model.
displayname set display name.
drop drop equations for one or more endogenous variables in the model .
droplink drop linked objects from the model.
exclude specifies (or merges) excluded series to the active scenario.
fliptype respecify model by selecting a new set of endogenous variables.
innov solve options for stochastic simulation.
label view or set label information for the model.
makegraph make graph object showing model series.
makegroup make group out of model series and display dated data table.
merge merge objects into the model.
olepush push updates to OLE linked objects in open applications.
override specifies (or merges) override series to the active scenario.
reinclude removes one or more variables from the excluded variable list.
replace replace the text specification for an endogenous variable in the model with a new specification.
replacelink replace a linked object with a different linked object.
replacevar replace all instances of a variable in the text specification of a model with a different variable.
revert revert one or more overridden variables in the active scenario back to baseline values.
scenario set the active, alternate, or comparison scenario.
setattr set the value of an object attribute.
setbounds set upper and lower boundaries for endogenous variables during model solution.
settrace specify the endogenous variables to be traced when solving the model.
solve solve the model.
solveopt set solve options for model.
spec display the text specification view.
stochastic stochastic solution options.
trace specify endogenous variables to trace.
track specify endogenous variables to track.
undoflip removes any changes to the model's specification made by the most recent invocation of the fliptype procedure.
unlink break links in specification.
update update model specification.
Model Data Members
Scalar values
@bounds integer containing the number of variables that crossed their boundaries during the previous solve.
String values
@attr("arg" string containing the value of the arg attribute, where the argument is specified as a quoted string.
@description string containing the Model object’s description (if available).
@detailedtype string with the object type: “MODEL”.
@displayname string containing the Model object’s display name. If the Model has no display name set, the name is returned.
@droppedaf string containing a space delimited list of the add factor series dropped or converted to exogenous series, if any, as part of the last successful fliptype procedure. The order of series in this list matches the order of series in the related data member @dropedafdep.
@droppedafdep string containing a space delimited list of dependent series that had add factors dropped or converted to exogenous series, if any, as part of the last successful fliptype procedure. The order of series in this list matches the order of series in the related data member @dropedaf.
@name string containing the Model object’s name.
@remarks string containing the Model object’s remarks (if available).
@scenarios string containing a list of scenarios in the Model.
@type string with the object type: “MODEL”.
@updatetime string representation of the time and date at which the Model was last updated.
String values for Model variables
@addfactors[(“scenario”)] or @aflist[(“scenario”)]  string containing a space delimited list of the model’s addfactor variables in the specified scenario (default is Actuals).
@depends("variable") string containing the variables that variable depends on.
@endoglist[(“scenario”)]  string containing a space delimited list of the model’s endogenous variables in the specified scenario (default is Actuals).
@excludelist[(“scenario”)]  string containing a space delimited list of the model’s excluded variables in the specified scenario (default is Actuals).
@exoglist[(“scenario”)]  string containing a space delimited list of the model’s exogenous variables in the specified scenario (default is Actuals).
@identity string containing a space delimited list of the model’s endogenous variables determined by identities.
@overridelist[(“scenario”)] or @olist[(“scenario”)]  string containing a space delimited list of the model’s variables set as overrides in the specified scenario (default is Actuals).
@linklist string containing space delimited list of all linked objects in the model
@spec(“variable”) string containing the estimation object name or text specification of the equation determining the specified endogenous variable, or an empty string if “variable” is an invalid name.
@stochastic string containing a space delimited list of stochastic endogenous variables.
@upends("variable") string containing the variables that depend on variable.
@varlist[(“scenario”)]  string containing a space delimited list of all the model’s variables for the specified scenario (default is Actuals).
In addition to a scenario name, you may specify “@active” (in quotes) to specify the current active scenario or “@alternate” to specify the current alternative scenario.
Model Examples
The commands:
model mod1
mod1.append y=324.35+x
mod1.append x=-234+7.3*z
mod1.solve(m=100,c=.008)
create, specify, and solve the model MOD1.
The command:
mod1(g).makegraph gr1 x y z
plots the endogenous series X, Y, and Z, in the active scenario for model MOD1.
addassign
Assign add factors to equations.
Syntax
model_name.addassign(options) equation_spec
where equation_spec identifies the equations for which you wish to assign add factors. You may either provide a list of endogenous variables, or you can use one of the following shorthand keywords:
@all
All equations.
@stochastic
All stochastic equations (no identities).
@identity
All identities.
The options identify the type of add factor to be used, and control the assignment behavior for equations where you have previously assigned add factors. addassign may be called multiple times to add different types of add factors to different equations. addassign may also be called to remove existing add factors.
Options
i
Intercept shifts (default).
v
Variable shift.
n
None—remove add factors.
c
Change existing add factors to the specified type—if the “c” option is not used, only newly assigned add factors will be given the specified type.
Examples
m1.addassign(v) @all
assigns a variable shift to all equations in the model.
m1.addassign(c, i) @stochastic
changes the stochastic equation add factors to intercept shifts.
m1.addassign(v) @stochastic
m1.addassign(v) y1 y2 y2
m1.addassign(i) @identity
assigns variable shifts to the stochastic equations and the equations for Y1, Y2, and Y3, and assigns intercept shifts to the identities.
Cross-references
See “Using Add Factors”. See also “Models” for a general discussion of models.
See Model::addinit.
addinit
Initialize add factors.
Syntax
model_name.addinit(options) equation_spec
where equation_spec identifies the equations for which you wish to initialize the add factors. You may either provide a list of endogenous variables, or you may use one of the following shorthand keywords:
@all
All equations
@stochastic
All stochastic equations (no identities)
@identity
All identities
The options control the type of initialization and the scenario for which you want to perform the initialization. addinit may be called multiple times to initialize various types of add factors in the different scenarios.
Options
v=arg (default=“z”)
Initialize add factors: “z” (set add factor values to zero), “n” (set add factor values so that the equation has no residual when evaluated at actuals), “b” (set add factors to the values of the baseline; override=actual), “a” (set add factor values so that the equation has no residual when evalulated at actives).
s=arg (default=“a”)
Scenario selection: “a” (set active scenario add factors), “b” (set baseline scenario/actuals add factors), “o” (set active scenario override add factors).
Examples
m1.addinit(v=b) @all
sets all of the add factors in the active scenario to the values of the baseline.
m1.addinit(v=z) @stochastic
m1.addinit(v=n) y1 y1 y2
first sets the active scenario stochastic equation add factors to zero, and then sets the Y1, Y2, and Y3 equation residuals to zero (evaluated at actuals).
m1.addinit(s=b, v=z) @stochastic
sets the baseline scenario add factors to zero.
Cross-references
See “Using Add Factors”. See also “Models” for a general discussion of models.
See also Model::addassign.
addover
Add override.
Set the active scenario add factor overrides.
Syntax
model.addover(options)
Examples
o
Use scenario add factors (default is to use the baseline factors)
nc
Do not create active scenario add factor series if they do not already exist (default is to create the series if necessary).
Examples
mod1.addover(o)
overrides the active scenario’s add factors.
Cross-references
See “Models” for a discussion of specifying and solving models in EViews. See also Model::append, Model::merge and Model::solve.
adjust
Prepare a variable for editing in the current scenario and/or update its values using an array expression.
Syntax
model_name.adjust(options) ser [array expression]...
The adjust proc allows you to adjust the values of the series ser in the current scenario. If the series is an exogenous variable, it will be added to the override list. If the series is an endogenous variable it will be added to both the excluded list and the override list.
If an array expression is provided, the overridden series will be modified according to the expression specification. Note that a transform may optionally be provided as part of the variable name using the syntax: transform(varname).
If you use an array expression which applies an operator to existing series values the overriden series must already exist in the workfile, unless the init option is used.
Options
init[=scenario]
Initialize the overridden variable with values from the specified scenario before applying any adjustment. If no scenario name is provided, the variable is initialized with values from the base scenario.
Examples
mod1.adjust gdp
simply sets the variable GDP as an overriden variable in the current scenario. If GDP is endogenous, it is also added to the exclude list.
mod1.scenario(a=_1) "sim1"
mod1.adjust gdp =+10
sets the current scenario as “SIM1”, with an alias of _1, and then overrides the variable GDP, setting the override series, GDP_1, equal to the previous values in GDP_1 plus 10.
mod1.scenario(a=_1) "sim1"
mod1.adjust(init="sim2") gdp =+10
performs the same operation, but rather than using the previous values in GDP_1 for the array expression, the values in GDP_2 (corresponding to the scenario SIM2) are used.
Cross-references
See “Models” for a discussion of specifying and solving models in EViews. See also the discussion in “Specifying Scenarios”.
See Model::scenario and Model::compare.
append
Append a specification line to a model.
Syntax
model_name.append text
Type the text to be added after the append keyword.
Examples
model macro2
macro2.merge eq_m1
macro2.merge eq_gdp
macro2.append assign @all f
macro1.append @trace gdp
macro2.solve
The first line declares a model object. The second and third lines merge existing equations into the model. The fourth and fifth line appends an assign statement and a trace of GDP to the model. The last line solves the model.
Cross-references
For details, see “Models”.
block
Display the model block structure view.
Show the block structure of the model, identifying which blocks are recursive and which blocks are simultaneous.
Syntax
model_name.checkbounds(options)
Options
p
Print the block structure view.
Cross-references
See “Block Structure View” for details. “Models” provides a general discussion of models.
See also Model::eqs, Model::text and Model::vars for alternative representations of the model.
boundscheck
Display the model check boundaries view.
Show a display of any series that have crossed their set boundaries during a solve.
Syntax
model_name.boundscheck(options)
Options
p
Print the bounds check view.
Cross-references
See “Block Structure View” for details. “Models” provides a general discussion of models.
See also Model::setboundsl.
clearhist
Clear the contents of the history attribute for model objects.
Removes the model’s history attribute, as shown in the label view of the model.
Syntax
model_name.clearhist
Examples
m1.clearhist
m1.label
The first line removes the history from the model M1, and the second line displays the label view of M1, including the now blank history field.
Cross-references
See “Labeling Objects” for a discussion of labels and display names.
See also Model::label.
clearremarks
Clear the contents of the remarks attribute.
Removes the model’s remarks attribute, as shown in the label view of the model.
Syntax
model_name.clearremarks
Examples
m1.clearremarks
m1.label
The first line removes the remarks from the model M1, and the second line displays the label view of M1, including the now blank remarks field.
Cross-references
See “Labeling Objects” for a discussion of labels and display names.
See also Model::label.
compare
Produce a table showing the differences between scenarios for the specified series.
Syntax
model_name.compare(options) model_vars
The compare view allows you to quickly compare the results from different scenarios (or the actual values) following a model solve. By default the output table will show any of the series specified in model_vars whose difference between the current active and comparison scenarios exceeds a specified tolerance. You may optionally use the “patt=” option to specify a separate set of comparison series from those in the current comparison scenario.
The list of model_vars may include the following special keywords:
@all
All model variables.
@endog
All endogenous model variables.
@exog
All exogenous model variables.
@addfactor
All add factor variables in the model.
@overides
All currently overridden exogenous variables
@excludes
All currently overridden endogenous variables
Options
tol=num
Set the tolerance level for comparing the series. Any differences below the tolerance will not be reported. Default value is 0.001.
patt=”pattern”
Set the comparison set of series. Without this option, EViews will build the comparison set based upon the current comparison scenario. This option allows you to select a different set of series using pattern matching. pattern should contain an * to represent the variable names given in model_vars.
Examples
mod1.scenario(a="_0") "scenario0"
mod1.scenario(c, a="_1") "scenario1"
mod1.solve(a=t)
mod1.compare gdp unemp infl
The first two lines of this example set the current active scenario “Scenario0”, and set the comparison scenario to “Scenario1”, with a name alias of “_1”. The model is then solved for both scenarios. The compare command is used to produce a table detailing the differences between the two scenarios for the three variables GDP, UNEMP and INFL. Any differences between the solved series GDP_0 and GDP_1, UNEMP_0 and UNEMP_1 or INFL_0 and INFL_1 greater than 0.001 will be shown in the table.
mod1.compare(tol=0.00001) gdp unemp infl
produces the same table, but uses a lower tolerance rate (of 0.00001).
mod1.compare @endog
produces a table comparing all endogenous variables in the model, not just GDP, UNEMP and INFL.
mod1.compare(patt="*_2") gdp unemp infl
produces a table that compares GDP_0 with GDP_2, UNEMP_0 with UNEMP_2 and INFL_0 with INFL_2, even though the current comparison scenario is still “Scenario1”.
Cross-references
See “Models” for a discussion of specifying and solving models in EViews. See also, the discussion in “Specifying Scenarios”.
See Model::scenario and Model::adjust.
control
Solve for values of one or more control variables so that an equal number of target series follow specified trajectories over the current workfile sample.
Syntax
model_name.control(options) controls targets trajectories
The controls, targets, and trajectories parameters are all lists of variable/series names, which may comprise any combination of individual series or group object names. The controls should be exogenous variables and the targets endogenous variables, with the trajectories being arbitrary series. An equal number of control, target, and trajectory series must be specified. These three lists do not need to be ordered strictly as above; they may be interleaved or kept together in blocks. For example, any of the following arrangements of the six arguments for a two-variable control would be acceptable: Examples
control1 control2 target1 target2 trajectory1 trajectory2
control1 target1 trajectory1 control2 target2 trajectory2
control1 control2 target1 trajectory1 target2 trajectory2
The solved values overwrite the original control series unless the ‘create’ or ‘csuffix’ option is specified. When the names for target and trajectory series share a common base, the ‘tsuffix’ option may be used to abridge the parameter list.
Options
create
Store the solved values in series with a given suffix rather than overwriting the original control series. The destination series names are the control names appended with either the active scenario alias suffix (the default) or the suffix specified by the csuffix option.
csuffix=suff
Specifies the series name suffix for storing modified control values. The presence of this option implies the create option above.
tsuffix=suff
Specifies the series name suffix for generating trajectory names from target names. When this option is present, the trajectories argument should be omitted.
Examples
m1.control myvar targetvar trajvar
will alter the values of exogenous variable MYVAR such that the model solution will produce values for endogenous variable TARGETVAR to match series TRAJVAR over the current workfile sample.
m1.control(create) isav irtn ftot ftot_tr gtot gtot_tr
will determine the values of exogenous variables ISAV and IRTN such that the model solution will produce values for endogenous variables FTOT and GTOT that match series FTOT_TR and GTOT_TR, respectively. Assuming the current model scenario suffix is _0, the control values will be stored in series named ISAV_0 and IRTN_0.
m1.control(create, tsuffix=_tr) isav irtn ftot gtot
similar to the previous example, but the trajectory series names are implicitly defined as the target names appended with the _tr suffix, i.e., FTOT_TR and GTOT_TR.
Cross-references
See “Solve Control for Target”. See “Models” for a general discussion of models.
copy
Creates a copy of the model.
Creates either a named or unnamed copy of the model.
Syntax
model_name.copy
model_name.copy dest_name
Examples
m1.copy
creates an unnamed copy of the model M1.
m1.copy m2
creates M2, a copy of the model M1.
Cross-references
See also copy.
display
Display table, graph, or spool output in the model object window.
Display the contents of a table, graph, or spool in the window of the model object.
Syntax
model_name.display object_name
Examples
model1.display tab1
Display the contents of the table TAB1 in the window of the object MODEL1.
Cross-references
Most often used in constructing an EViews Add-in. See “Custom Object Output”.
displayname
Display name for model objects.
Attaches a display name to a model object which may be used in place of the standard model object name.
Syntax
model_name.displayname display_name
Display names are case-sensitive, and may contain a variety of characters, such as spaces, that are not allowed in model object names.
Examples
mod1.displayname Sept 2006
mod1.label
The first line attaches a display name “Sept 2006” to the model object MOD1, and the second line displays the label view of MOD1, including its display name.
Cross-references
See “Labeling Objects” for a discussion of labels and display names.
See also Model::label.
drop
Drop equations for one or more endogenous variables in the model.
Syntax
model_name.drop(options) var_list
Where var_list is a space delimited list of variables whose equations will be dropped from the model. By default if a variable is contained in a multi-equation object, such as a system, VAR or model, the entire object will be dropped, which will also drop the specification for the other variables defined in that object.
Options
nomult
Do not drop multi-equation objects
noerr
Suppress variable not found errors
Examples
m1.drop gdp
will drop the equation/object which has GDP as a dependent variable from the model M1.
m2.drop(nomult) gdp unemp
will drop the equations which have GDP or UNEMP as dependent variables. Systems, VARs, models, etc… will not be dropped.
Cross-references
droplink
Drop linked objects from the model.
Syntax
model_name.droplink(options) obj_list
Where obj_list is a space delimited list of objects to be dropped from the model.
Options
noerr
Suppress object link not found errors
Examples
m1.droplink eq1 mod1
will drop the equation EQ1 and the model MOD1 from the model M1.
Cross-references
endog
Note that endog and makeendog are no longer supported for model objects. See instead, Model::makegroup.
eqs
View of model organized by equation.
Lists the equations in the model. This view also allows you to identify which equations are entered by text, or by link, and to access and modify the equation specifications.
Syntax
model_name.eqs
Cross-references
See “Equation View” for details. See “Models” for a general discussion of models.
See also Model::block, Model::text, and Model::vars for alternative representations of the model.
exclude
Specifies (or merges) excluded endogenous variables in the active scenario.
Syntax
model_name.exclude(options) ser1(smpl) ser2(smpl) ...
Follow the exclude keyword with the argument list containing the endogenous variables you wish to exclude from the solution, along with an optional sample for exclusion. If a sample is not provided, the variable will be excluded for the entire solution sample.
Options
m
Merge into instead of replace the existing exclude list.
actexist = arg
arg may be “t” (true) or “f” (false). When true, EViews will exclude periods for all endogenous variables where values of the actuals exist. (Applies to all endogenous variables, not just those explicitly listed in the proc.)
r
Re-include a variable (drop from the exclude list).
Examples
mod1.exclude fedfunds govexp("1990:01 1995:02")
will create an exclude list containing the variables FEDFUNDS and GOVEXP. FEDFUNDS will be excluded for the entire solution sample, while GOVEXP will only be excluded for the specified sample.
If you then issue the command:
mod1.exclude govexp
EViews will replace the original exclude list with one containing only GOVEXP. To add excludes to an existing list, use the “m” option:
mod1.exclude govexp
The excluded list now contains both GOVEXP and FEDFUNDS.
mod1.exclude(actexist=t,m)
instructs EViews to keep all existing excludes (the “m” option) in the current active scenario and in addition to exclude all endogenous variables in periods where actuals exist.
Cross-references
See the discussion in “Specifying Scenarios”.
See also Model::override, Model::reinclude, and Model::solveopt.
digraph
Display the model dependency graph.
Syntax
model_name.digraph
Examples
model1.digraph
visualizes the dependencies among the model's variables as a directed graph.
Cross-references
See “Dependency Graph View” for further details on the model dependency graph.
fliptype
Symbolically alter the model’s equations to specify a new set of endogenous variables.
Syntax
model_name.fliptype(options) variables [@lock fixed-variables] [@lockafs] [@lockinnovs]
The variables parameter is a list of endogenous and exogenous variables in any order. Group objects may be included in the list. An equal number of endogenous and exogenous variables must be specified. Each listed endogenous variable will be made exogenous and each listed exogenous variable will be made endogenous by rewriting a number of the model’s equations. The number of equations modified will be at least the number of endogenous/exogenous variables specified, e.g., flipping a set of three endogenous and three exogenous variables will require at least three equations to be modified. All modified equations will have any associated add factor or innovation variance dropped from their specification (see the af2exog option below). The optional @lock clause can be used to prevent the modification of any equation whose endogenous variable is listed in fixed-variables. Inclusion of the optional @lockafs or @lockinnovs tags indicates that all equations with either add factors or innovations variances, respectively, should not be modified.
Options
dest=name
Instead of altering the invoking model object, a copy of the model named name will be created and the flip applied to this new model.
noshift
Rewriting an equation may involve a shift in its lag structure (because endogenous variables must be specified at lag zero). For example, flipping the two variables in the single equation “y = x(-1)” produces “x = y(1)”. Such lag shifting is allowed by default, but can be prevented by including this option. Without lag shifting, EViews may have fewer potential ways to rewrite each equation, possibly resulting in a greater number of altered equations or even an inability to find any satisfactory set of rewrites.
af2exog [= suffix]
Add factor series that are dropped are instead converted to exogenous series and explicitly appear in the model’s equations. This allows the resulting model to remain numerically consistent with the original model. With the optional suffix specification, the new exogenous series are named as the add factor series followed by suffix, otherwise the original add factor series names are used.
Examples
mod1.fliptype var1 var2
will flip the endogenous/exogenous role of variables VAR1 and VAR2 in the model by rewriting the model’s equations. For example, if VAR1 is initially endogenous and VAR2 is initially exogenous, the procedure will rewrite the equations of the model so that VAR2 becomes endogenous (the first left-hand side variable of some equation) and VAR1 becomes exogenous (not the first left-hand side variable of any equation). The role of all other variables in the model is unchanged.
Cross-references
See “Solve Control for Target”. See “Models” for a general discussion of models.
See also Model::undoflip.
innov
Solve options for stochastic simulation.
Syntax
model_name.innov var1 option [var2 option, var3 option, ...]
Follow the innov keyword with a list of model variables and options. If the variable is an endogenous variable (or add factor), it identifies a model equation and will use different options than an exogenous variable.
Options
Options for endogenous variables
“i” or “identity”
Specifies that the equation is an identity in stochastic solution.
“s” or “stochastic”
Specifies that the equation is stochastic with unknown innovation variance in stochastic solution. Note: if a value has been previously specified in the positive_num option, it will be kept.
positive_num
Specifies that the equation is stochastic with an equation innovation standard error equal to the positive number positive_num. Note: the innovation standard error is only relevant when used with the Model::stochastic command, with the “v=t” option set.
Options for exogenous variables
number
number specifies the forecast standard error of the exogenous variable. You may use “NA” to specify an unknown (or zero) forecast error.
Examples
usmacro.innov gdp i
specifies that the endogenous variable GDP be treated as an identity in stochastic solution.
model01.innov cons 5600 gdp i cpi s
indicates that the endogenous variable CONS is stochastic with standard error equal to 5600, GDP is an identity, and CPI is stochastic with unknown innovation variance.
model01.innov govexp 12210
specifies that the forecast standard error of the exogenous variable GOVEXP is 12210.
Cross-references
See the discussion in “Stochastic Options”.
See also Model::model, Model::stochastic, and Model::solve.
label
Display or change the label view of a model object, including the last modified date and display name (if any).
As a procedure, label changes the fields in the model object label.
Syntax
model_name.label
model_name.label(options) [text]
Options
The first version of the command displays the label view of the model. The second version may be used to modify the label. Specify one of the following options along with optional text. If there is no text provided, the specified field will be cleared.
c
Clears all text fields in the label.
d
Sets the description field to text.
s
Sets the source field to text.
u
Sets the units field to text.
r
Appends text to the remarks field as an additional line.
p
Print the label view.
Examples
The following lines replace the remarks field of M1 with “Data from CPS 1988 March File”:
m1.label(r)
m1.label(r) Data from CPS 1988 March File
To append additional remarks to M1, and then to print the label view:
m1.label(r) Log of hourly wage
m1.label(p)
To clear and then set the units field, use:
m1.label(u) Millions of bushels
Cross-references
See “Labeling Objects” for a discussion of labels.
See also Model::displayname.
makeendog
Note that in endog and makeendog are no longer supported for model objects. See instead, Model::makegroup.
makegraph
Make graph object showing model series.
Syntax
model_name.makegraph(options) graph_name model_vars
where graph_name is the name of the resulting graph object, and models_vars are the names of the series. The list of model_vars may include the following special keywords:
@all
All model variables.
@endog
All endogenous model variables.
@exog
All exogenous model variables.
@addfactor
All add factor variables in the model.
@overides
All currently overridden exogenous variables
@excludes
All currently overridden endogenous variables
Options
a
Include actuals.
c
Include comparison scenarios.
d
Include deviations.
n
Do not include active scenario (by default the active scenario is included).
t= trans_type (default=level)
Transformation type: “level” (display levels in graph, “pch” (display percent change in graph), “pcha” (display percent change - annual rates - in graph), “pchy” (display 1-year percent change in graph), “dif” (display 1-period differences in graph), “dify” (display 1-year differences in graph).
s=sol_type (default=“d”)
Solution type: “d” (deterministic), “m” (mean of stochastic), “s” (mean and ±2 std. dev. of stochastic), “b” (mean and confidence bounds of stochastic).
g=grouping (default=“v”)
Grouping setting for graphs: “v” (group series in graph by model variable), “s” (group series in graph by scenario), “u” (ungrouped - each series in its own graph).
Examples
mod1.makegraph(a) gr1 y1 y2 y3
creates a graph containing the model series Y1, Y2, and Y3 in the active scenario and the actual Y1, Y2, and Y3.
mod1.makegraph(a,t=pchy) gr1 y1 y2 y3
plots the same graph, but with data displayed as 1-year percent changes.
Cross-references
See “Displaying Data” for details. See “Models” for a general discussion of models.
See Model::makegroup.
makegroup
Make a group out of model series and display dated data table.
Syntax
model_name.makegroup(options) grp_name model_vars
The makegroup keyword should be followed by options, the name of the destination group, and the list of model variables to be created. The options control the choice of model series, and transformation and grouping features of the resulting dated data table view. The list of model_vars may include the following special keywords:
@all
All model variables.
@endog
All endogenous model variables.
@exog
All exogenous model variables.
@addfactor
All add factor variables in the model.
@overides
All currently overridden exogenous variables
@excludes
All currently overridden endogenous variables
Options
a
Include actuals.
c
Include comparison scenarios.
d
Include deviations.
r
Include percentage deviations.
n
Do not include active scenario (by default the active scenario is included).
t= arg (default= “level”)
Transformation type: “level” (display levels), “pch” (percent change), “pcha” (display percent change - annual rates), “pchy” (display 1-year percent change), “dif” (display 1-period differences), “dify” (display 1-year differences).
s=arg (default=“d”)
Solution type: “d” (deterministic), “m” (mean of stochastic), “s” (mean and ±2 std. dev. of stochastic), “b” (mean and confidence bounds of stochastic).
g=arg (default=“v”)
Grouping setting for graphs: “v” (group series in graph by model variable), “s” (group series in graph by scenario).
Examples
model1.makegroup(a,n) group1 @endog
places all of the actual endogenous series in the group group1.
Cross-references
See “Displaying Data” for details. See “Models” for a general discussion of models.
See also Model::makegraph.
merge
Merge equations from an estimated equation, model, pool, system, or var object.
If you supply only the object’s name, EViews first searches the current workfile for the object containing the equation. If the object is not found, EViews looks in the default directory for an equation or pool file (.DBE). If you want to merge the equations from a system file (.DBS), a var file (.DBV), or a model file (.DBL), include the extension in the command and an optional path when merging files. You must merge objects to a model one at a time; merge appends the object to the equations already existing in the model.
Syntax
model_name.merge(options) object_name
Follow the keyword with a name of an object containing estimated equation(s) to merge.
Options
t
Merge an ASCII text file.
Examples
eq1.makemodel(mod1)
mod1.merge eq2
mod1.merge(t) c:\data\test.txt
The first line makes a model named MOD1 from EQ1. The second line merges (appends) EQ2 to MOD1 and the third line further merges (appends) the text file TEST from the specified directory.
model
Declare a model object.
Syntax
model model_name
The keyword model should be followed by a name for the model. To fill the model, you may use Model::append or Model::merge.
Examples
model macro
macro.append cs = 10+0.8*y(-1)
macro.append i = 0.7*(y(-1)-y(-2))
macro.append y = cs+i+g
declares an empty model named MACRO and adds three lines to MACRO.
Cross-references
See “Models” for a discussion of specifying and solving models in EViews.
See also Model::append, Model::merge and Model::solve.
msg
Display model solution messages.
Show view containing messages generated by the most recent model solution.
Syntax
model_name.msg(options)
Options
p
Print the model solution messages.
Cross-references
See “Models” for a discussion of specifying and solving models in EViews.
See also Model::solve and Model::solveopt.
olepush
Push updates to OLE linked objects in open applications.
Syntax
model_name.olepush
Cross-references
See “Object Linking and Embedding (OLE)” for a discussion of using OLE with EViews.
override
Specifies (or merges) overridden exogenous variables and add factors in the active scenario.
Syntax
model_name.override(options) ser1 [ser2 ser3 ...]
Follow the keyword with the argument list containing the exogenous variables or add factors you wish to override.
Options
m
Merge into (instead of replace) the existing override list.
r
Remove the variable from the override list.
Examples
mod1.override fed1 add1
creates an override list containing the variables FED1 and ADD1.
If you then issue the command:
mod1.override fed1
EViews will replace the original exclude list with one containing only FED1. To add overrides to an existing list, use the “m” option:
modl.override(m) add1
The override list now contains both series.
Cross-references
See the discussion in “Specifying Scenarios”. See also “Models” for a general discussion of models.
See Model::exclude. Model::scenario and Model::revert.
printview
Display print view of the model.
Show enhanced display of the model specification.
Syntax
model_name.printview(options)
Options
keeplink
Do not display the underlying equations in linked estimation objects (default is to break links in the display).
idents
Display identities.
innov
Display @innov statements.
addfact
Display add factors.
comments
Display comments.
dispnames
Use display names
decimals= integer
Display numbers using the specified number of decimal digits.
signif= integer
Display numbers using the specified number of significant digits.
p
Print the model solution messages.
Options
mod1.printview(idents, innov)
displays the model with broken links, identities, and @innov statements.
mod1.printview(idents, innov, signif=3)
displays numeric values with three significant digits.
Cross-references
See “Print View” for a discussion
See also Model::text.
reinclude
Removes one or more variables from the excluded variable list.
Syntax
Model_name.reinclude(options) ser1 ser2
The specified variables are removed from the current active scenario’s exclude list, and generates an add factor for each variable so that the solution for the current scenario remains unchanged.
Options
v
Create variable shift add factors in cases where no add factor Is currently associated with the endogenous variable. (Default is to create intercept shifts).
skipidents
Ignore endogenous variables whose associated equation is tagged as an identity.
Examples
M1.reinclude x z
removes both X and Z from the exclude list in the current scenario, and creates add factors for each.
Cross-references
See “Models” for a discussion of specifying and solving models in EViews.
See also Model::exclude.
replace
Replace the text specification for an endogenous variable in the model with a new specification.
Syntax
model_name.replace new_specification
The replace command will only replace the specification for variables that currently have a text specification in the model. Variables defined by a linked object cannot have their specification replace. New_specification should be the new text specification for the variable. Note EViews will automatically detect the endogenous variable in the new specification, even if it is contained in an implicit expression, and will replace the existing specification for that variable.
Examples
model m1
m1.append x = 3*y
m1.replace x = 4*y
this trivial example first creates a model, M1, then adds a text specification for the variable X, setting it equal to 3*Y.  It then changes the specification for X to set it equal to 4*Y.
model m1
m1.append x = 3*y
m1.replace log(x) = 4*y
this example replaces the specification for X by setting the log of X equal to 4*Y.
model m1
m1.append log(x/w) = 3*y
m1.replace x^2 = 4*y
this example first defines using an expression, log(X/W), The replace command is used to change that definition to be in terms of X^2. EViews automatically detects that the new specification, even though it is based in terms of X^2, should be used to replace the current line involving log(X/W).
Examples
See also Model::replacelink and Model::replacevar.
replacelink
Replace a linked object with a different linked object.
Syntax
model_name.replacelink old_obj new_obj
old_obj should be the name of an object currently linked inside the model. That object will be removed from the model and replaced with the new object, new_obj.
Examples
M1.replacelink eq1 eq1_new
replaces the linked equation, EQ1, with a different equation, EQ1_NEW.
Cross-references
See also Model::append, Model::replace and Model::replacevar.
replacevar
Replace all instances of a variable in the text specification of a model with a different variable.
Syntax
model_name.replacevar oldvar newvar
replacevar can only replace variables defined by a text specification inside the model. It will not replace variables contained inside linked objects. Note that replacevar does not do a simple text substitution, and is capable of determining full variable names from other pieces of text.
Examples
Model m1
M1.append y = 3*x
M1.replacevar x z
this example creates a model, M1, and adds a text specification for the variable Y, setting it equal to 3*X. It then replaces all occurrences of X with Z, changing the specification of Y to be equal to 3*Z.
M1.append y=3*log(x(-2))
m1.append w = 4*x1
M1.replacevar x z
this example generates a specification for Y, setting it equal to 3 times the log of the twice lagged value of X, and a specification for W, setting it equal to 4 times X1.  It then replaces all instances of the variable X with the variable Z, changing the specification of Y to be equal to 3 times the log of twice lagged Z.  Note that the specification of W does not change, since X1 is a different variable from X.
Cross-references
See also Model::append, Model::replacelink and Model::replacevar.
revert
Reverts one or more overridden variables in the active model scenario back to their baseline values.
Syntax
model_name.revert ser1 [ser2 ...]
The specified variables will be removed from the override and exclude list of this scenario, and the associated overridden series in the workfile will be deleted.
If an asterisk is provided for the variable name, all overridden series in the active model scenario will be reverted.
Examples
M1.revert x z
removes X and Z from the override list in the current scenario.
Cross-references
See also Model::override, Model::exclude, and Model::scenario.
scenario
Manage the model scenarios.
The scenario procedure is used to set the active and comparison scenarios for a model, to create new scenarios, to initialize one scenario with settings from another scenario, to delete scenarios, and to change the variable aliasing associated with a scenario.
Syntax
model_name.scenario(options) "name"
performs scenario options on a scenario given by the specified name (entered in double quotes). By default the scenario procedure also sets the active scenario to the specified name.
Options
c
Set the comparison scenario to the named scenario.
n
Create a new scenario with the specified name.
i= “name
Copy the Excludes and Overrides from the named scenario.
d
Delete the named scenario.
a=string
Set the scenario alias string to be used when creating aliased variables (string is a 1 to 3 alphanumeric string to be used in creating aliased variables). If an underscore is not specified, one will be added to the beginning of the string. Examples: “_5”, “_T”, “S2”. The string “A” may not be used since it may conflict with add factor specifications.
desc=string
Description of the scenario.
usedesc
Export the description specified in “desc=” to all solution series.
v
Copy the values of any overridden series in the scenario specified in the "i=" option into the overridden series for this scenario, creating new series if necessary.
Examples
The command string,
mod1.scenario "baseline"
sets the active scenario to the baseline, while:
mod1.scenario(c) "actuals"
sets the comparison scenario to the actuals (warning: this action will overwrite any historical data in the solution period).
A newly created scenario will become the active scenario. Thus:
mod1.scenario(n) "Peace Scenario"
creates a scenario called “Peace Scenario” and makes it the active scenario. The scenario will automatically be assigned a unique numeric alias. To change the alias, simply use the “a=” option:
mod1.scenario(a=_ps) "Peace Scenario"
changes the alias for “Peace Scenario” to “_PS” and makes this scenario the active scenario.
The command:
mod1.scenario(n, a=w, i="Peace Scenario", c) "War Scenario"
creates a scenario called “War Scenario”, initializes it with the Excludes and Overrides contained in “Peace Scenario”, associates it with the alias “_W”, and makes this scenario the comparison scenario.
mod1.scenario(i="Scenario 1") "Scenario 2"
copies the Excludes and Overrides in “Scenario 1” to “Scenario 2” and makes “Scenario 2” the active scenario.
Compatibility Notes
For backward compatibility with EViews 4, the single character option “a” may be used to set the comparison scenario, but future support for this option is not guaranteed.
In all of the arguments above the quotation marks around scenario name are currently optional. Support for the non-quoted names is provided for backward compatibility, but may be dropped in the future, thus
mod1.scenario Scenario 1
is currently valid, but may not be in future versions of EViews.
Cross-references
Scenarios are described in detail in “Specifying Scenarios”. “Models” documents EViews models.
See also Model::solve.
scenlist
Display list description of the model scenarios.
Syntax
model_name.scenlist(options)
Options
p
Print the model scenario view.
Examples
model1.scenlist
displays the list of scenarios view of the object MODEL1.
Cross-references
See “Scenario List” for further details on the scenario list view.
See also Model::scenario.
setattr
Set the object attribute.
Syntax
model_name.setattr(attr) attr_value
Sets the attribute attr to attr_value. Note that quoting the arguments may be required. Once added to an object, the attribute may be extracted using the @attr data member.
Examples
a.setattr(revised) never
String s = a.@attr("revised")
sets the “revised” attribute in the object A to the string “never”, and extracts the attribute into the string object S.
Cross-references
See “Adding Custom Attributes in the Label View” and “Adding Your Own Label Attributes”.
setbounds
Set upper and lower boundaries for endogenous variables during model solution.
EViews will warn if any variable’s solved for value is higher than the upper bound or less than the lower bound for any observation during the solve.
Syntax
model_name.setbounds variable1(upper, lower) [variable2(upper, lower)…]
Examples
model1.setbounds gdp(0,1000) unemp(un_lower, un_higher)
specifies a lower bound of 0 and 1,000 for GDP and the series bounds UN_LOWER and UN_HIGHER for UNEMP in model MODEL01.
Cross-references
See “Boundaries” for details.
See also Model::boundscheck.
settrace
Specify the endogenous variables to be traced when solving the model
Specifies the endogenous variables for which you wish to keep intermediate calculations at the next deterministic simulation. The intermediate results of all traced variables will be part of the model solution output. Tracing intermediate values may give you some idea of where to look for problems when a model is generating errors or failing to converge.
Syntax
model_name.settrace [endogenous_list]
If the endogenous_list of variables is omitted, settrace clears out the existing trace specification.
Examples
model1.trace gdp cons interest cpi
specifies that GDP, CONS, INTEREST, and CPI should be traced at the next simulation.
If you then issue the command:
mod1.settrace
EViews will clear the trace list.
Cross-references
See the discussion in “Diagnostics”.
See also Model::trace and Model::track.
solve
Solve the model.
solve finds the solution to a simultaneous equation model for the set of observations specified in the current workfile sample.
Syntax
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.
You should follow the name of the model after the solve command. 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 Model::solveopt. Stochastic solution options should be set using Model::stochastic.
Examples
mod1.solve
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 “Models” for a discussion of models.
See also Model::model, Model::msg, Model::solveopt, and Model::stochastic.
solveopt
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_name.solveopt(options)
Options
s=arg (default=“d”)
Solution type: “d” (deterministic), “m” (stochastic – 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).
d=arg (default=“d”)
Model solution dynamics: “d” (dynamic solution), “s” (static solution), “f” (fitted values – single equation solution).
struct=t
Ignore ARMA terms and use only the structural part of the equations when solving the model.
m=integer (default=5000)
Maximum number of iterations for solution (maximum 100,000).
c=number (default=1e-8)
Convergence criterion. Based upon the maximum change in any of the endogenous variables in the model. You may set a number between 1e-15 and 0.01.
a=arg (default=“f”)
Alternate scenario solution: “t” (true - solve both active and alternate scenario and collect deviations for stochastic), “f” (false - solve only the active scenario).
o=arg (default=“g”)
Solution method: “g” (Gauss-Seidel), “n” (Newton), “b” (Broyden), “w” (E-Newton), “q” (E-QNewton).
i=arg (default=“a”)
Set initial (starting) solution values: “a” (actuals), “p” (values in period prior to start of solution period), “e” (existing solution values if available, otherwise actuals).
n=arg (default=“t”)
NA behavior: “t” (true - stop on “NA” values), “f” (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 (default=“t”)
Excluded variables initialized from actuals: “t” (true), “f” (false).
t=arg (default=“u”)
Terminal condition for forward solution: “u” (user supplied - actuals), “l” (constant level), “d” (constant difference), “g” (constant growth rate).
w=arg
Solve direction: “t” (two-directional), “f” (forwards only).
g=arg (default==7)
Number of digits to round solution: an integer value (number of digits), “n” (do not roundoff).
z=arg (default==1e-7)
Zero value: a positive number below which the solution (absolute value) is set to zero, “n” (do not set to zero).
f=arg (default==”t”)
Order simultaneous blocks for minimum feedback: “t” (true), “f” (false).
v=arg (default==“f”)
Display verbose diagnostic messages: “t” (true), “f” (false).
j=arg (default==“a”)
Use analytic or numeric Jacobians: “a” (analytic), “n” (numeric only).
Cross-references
See “Models” for a discussion of models.
See also Model::model, Model::msg, and Model::solve. Stochastic solution options should be set using Model::stochastic.
spec
Display the text specification view for model objects.
Syntax
model_name.spec(options)
Options
p
Print the specification text.
Examples
model1.spec
displays the specification of the object MODEL1.
Cross-references
See also Model::append, Model::merge, Model::printview.
stochastic
Stochastic solution options for models.
stochastic sets options for stochastic model solution but does not solve the model.
Syntax
model_name.stochastic(options)
Options
Note that these options have no effect on the current solve if deterministic solution has been selected.
i=arg (default=“n”)
Innovation generation: “n” (normal random number) or “b” (bootstrap).
d=arg (default=“f”)
Diagonal covariance matrix (for bootstrap: draw resids independently for each equation): “t” (true), “f” (false).
v=arg (default=“t”)
Scale covariance matrix to equation specified innovation variances: “t” (true), “f” (false). Does not apply to Bootstrap.
m=pos_number (default=1.0)
Multiply resid covariance or bootstrap by the positive number pos_number.
s=quoted_sample
Covariance estimation sample (Bootstrap residual draw sample). For example, s =“1970.1 2003.4”
r=integer (default=1000)
Number of stochastic repetitions.
k
Calculate confidence interval from entire sample.
f=number (default=.02)
Fraction of failed repetitions before stopping.
b=number (default=.95)
Size of stochastic confidence intervals.
c=arg (default=“f”)
Include coefficient uncertainty: “t” (true), “f” (false).
p=page_name
Page name for a new workfile page to save the results of all repetitions of the stochastic solve. If blank (default) only summaries (mean, sd, etc.) of the repetitions are maintained.
Cross-references
See “Models” for a discussion of models. See Model::innov to set options on individual series in stochastic solution.
See also Model::model, Model::solve and Model::solveopt.
text
Display text representation of the model specification.
Syntax
model_name.text(options)
The text command is equivalent to Model::spec.
Options
p
Print the model text specification.
Examples
model1.text
displays the text representation of the object MODEL1.
Cross-references
See “Models” for further details on models.
See also Model::printview.
trace
Display trace view of a model showing iteration history for selected solved variables.
Syntax
model_name.trace(options)
Options
p
Print the block structure view.
Cross-references
See “Diagnostics” for further details on tracing model solutions.
See also Model::msg, Model::solve and Model::solveopt.
track
Specify endogenous variables to track.
Sets the list of endogenous variables that will be tracked at the next simulation. Results of all tracked endogenous variables will be part of the model solution output.
Syntax
model_name.track endog1 [endog2 endog3 ...]
Specify a list of endogenous variables to be tracked. You may use @all to track all endogenous variables.
Examples
model1.track gdp cons interest cpi
specifies that GDP, CONS, INTEREST, and CPI should be tracked at the next simulation.
model1.track @all
tracks all endogenous variables at the next simulation.
Cross-references
See also Model::model and Model::trace.
undoflip
Removes any changes to the model's specification made by the most recent invocation of the fliptype procedure.
Syntax
model_name.undoflip
If the model was previously altered by an invocation of the fliptype procedure, then the model's specification is reverted to its prior/unaltered state. Other model changes that may have been made in the intervening time, such as changes to its scenarios, are not affected by this procedure. This procedure provides only one level of undo (multiple invocations of fliptype cannot be undone) and the undo capability is only available until the workfile is closed (saving and reopening a workfile will not allow alterations from a previous session to be undone).
Examples
mod1.fliptype var1 var2
mod1.solve
mod1.undoflip
The endogenous/exogenous usage of variables VAR1 and VAR2 is flipped and the model then solved for the new set of endogenous variables. The changes made by fliptype are then undone, restoring the original endogenous/exogenous usage of variables VAR1 and VAR2.
Cross-references
See Model::fliptype.
unlink
Break links in models.
Syntax
object.unlink spec
unlink breaks equation links in the model. Follow the name of the model object by a period, the keyword, and a specification for the variables to unlink.
The spec may contain either a list of the endogenous variables to be unlinked, the name of an estimation object, or the keyword “@ALL”, instructing EViews to unlink all equations in the model.
Note: if a link is to another model or a system object, more than one endogenous variable may be associated with the link. If the spec contains any of the endogenous variables in a linked model or system, EViews will break the link for all of the variables found in the link.
Examples
The expressions:
mod1.unlink @all
mod2.unlink z1 z2
unlink all of equations in MOD1, and all of the variables associated with the links for Z1 and Z2 in MOD2.
Cross-references
See “Models” for a discussion of specifying and solving models in EViews. See also Model::append, Model::merge and Model::solve.
update
Update model specification.
Recompiles the model and updates links.
Syntax
model.update [arg]
Follow the name of the model object by a period the keyword update, and optionally a list of estimation objects to update. If no argument is provided, every object is updated.
Examples
mod1.update
recompiles and updates all of the links in MOD1.
mod1.update eq01 var01
updates the links to equation objectEQ01 and VAR object VAR01.
Cross-references
See “Models” for a discussion of specifying and solving models in EViews. See also Model::append, Model::merge and Model::solve.
vars
View of model organized by variable.
Display the model in variable form with identification of endogenous, exogenous, and identity variables, with dependency tracking.
Syntax
model_name.vars
Cross-references
See “Variable View” for details. See “Models” for a general discussion of models.
See also Model::block, Model::text, and Model::eqs for alternative representations of the model.