Object Reference : Object View and Procedure Reference : Model
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.
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.
Set the comparison scenario to the named scenario.
Create a new scenario with the specified name.
i= “name
Copy the Excludes and Overrides from the named scenario.
Delete the named scenario.
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.
Description of the scenario.
Export the description specified in “desc=” to all solution series.
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.
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.
Scenarios are described in detail in “Specifying Scenarios”. “Models” documents EViews models.
See also Model::solve.