|
<< Click to Display Table of Contents >> CREATE |
![]() ![]()
|
This statement creates a new series in the first-position databank. The series contains no data, and the statement is normally only used in so-called sim-mode for modeling (cf. MODE). (If you just need to construct an empty series x, you can always write x = m();, putting missing values into the series).
create variables;
variables |
Variablename(s) or list(s) |
•If a variable is stated without databank, the databank is assumed to be the first-position databank.
The reason for CREATE in sim-mode is to avoid accidentally creating a new variable because of misspelling etc. Imagine a model with exogenous variable b_vat = 0.25. The user thinks that the variable name is vat. Without a mandatory CREATE, setting vat = 0.26 will just create a new series that has no relation to the model, and hence has no effect on the mode. With mandatory CREATE, setting vat = 0.26 will result in an error, and the user will hopefully discover that the proper name is b_vat.
There is an exception to the create rule: names beginning with xx can always be auto-created even in sim-mode (useful for temporary series variables).
In sim-mode, variables cannot be created on the fly, for instance:
reset; |
Here, x cannot be auto-created. The following will work:
reset; |
Series beginning with xx are always auto-created even in sim-mode.
option databank create auto = yes;