Model Building¶
This help topic discusses some of the G7 commands that are useful for model building. See The Craft of Economic Modeling by Clopper Almon for more on the use of G7 and Build to build macroeconomic models.
- save <filename>
Opens the named file which then receives all (ti)tle, f, fex, id, and cc commands exactly as they appear on the screen. It also catches the output of (ty)pe commands but with the (ty)pe changed to update. Most important, the file receives the results of regressions in the form of equations with the variable names and values of the regression coefficients. Use save off to close the saved file and stop saving. By convention, not necessity, all “save” files are given the extension “.SAV”.
f, fex, and fdup all do the same thing in G7, but when passed to Build through a G7 “save” file:
- f:
Computes the left-side variable and puts it and all of the right-side variables into the workspace, and also puts an identity into the model.
- fex:
Computes the left-left side variable and puts it into the workspace. It does NOT put the right-side variables into the workspace and does NOT put an identity into the model. It is used to define historical values of exogenous variables, such as tax rates, and historical values of dependent variables of behavioral equations.
- fdup:
This has no effect whatsoever in Build.
- id <identity>
This has no effect in G7 but, when passed to Build, puts all variables (without computing the left-side one) into the workspace and puts an identity into the model.
- check <variable name> <tolerance>
This command can only be placed in a “master” file for input into Build. It causes the named variable to be checked for convergence to within the specified tolerance. The values of the checked variables will be printed on the screen as the model runs. It generally is necessary to check only a few of the variables in a model.
- cc <C language statement>
This has no effect in G7 or Build, but the C-language statement is passed through to the file HEART.C, which contains the model written in the C language and is ready for compilation. Such passed-through statements may be used to do special tasks for which G7 and Build have no convenient mechanism – such as scaling one group of variables to sum to another variable. For many models, no cc statements are needed.
- sty <variable name>
Silent type. Prints the variable to the file being saved, but does not show it on the screen. See also the type command.
Matrix Operations in Models
For models involving matrices that vary over time, the InterDyme system should be used. However, constant matrices can be built into a model as described here. The following matrix commands can be placed only in a master file for input into Build. When they are used, the value of dimmax in COMMON.INC must be set equal to the largest dimension of the largest matrix.
Example:
vec fd = 2,1,auto,food vec nulv = 1,4
Example:
mat iomat = 78, 78, io77.usa mat cmat = 78, 34