Making Tables

The Compare program is used to make tables with the results of running the model or to present other data. As the name suggests, it is particularly adapted to comparing results of several runs of a model, but it can also list the contents of a data bank or the results of a single run of a model. When being used to show a base case and several alternatives, it can show the alternatives as actual values, as deviations from the base, or as percentage deviations from the base. The results can be written to a file that can be sent directly to a printer, or results can be printed as plain text, or spreadsheets can be created in Excel format. To use Compare, one first must prepare a stub file. Details are given below.

Compare is a companion program that is not part of the G7 program. However, Compare can be run from the G7 menu by selecting Model | Tables. Selection of this menu item opens a form that asks for the information necessary for Compare to run. Clicking OK then executes Compare. If you know that you want to run Compare with exactly the same entries on the form as the last time that Compare was run, you can skip the form by clicking Model | Express Tables.

Details on the Stub File

Here is an example of a stub file:

\xls
\dates 1995.0 1996.0 1997.0 1996.1 1996.2 1996.3 1996.4 1995-1996 1996-1997
\*
;
;THE AMI MODEL
;
&
gdpR         ;Gross national product
cR           ;Personal consumption
pibgR        ;Personal income w/o gov't
pidisR       ;Personal disposable income
taxrate\*100 ;taxrate\*100
gtnisR       ;Gov trans, net int, sub.
cpcR         ;Consumption per capita
pop\*1000    ;Population (in millions)
emp\*0.001   ;Employment

The first line indicates that the results should be printed in a spreadsheet document. The next line gives the dates of the periods which are to be printed. In a quarterly data bank or model, an annual date such as “1998.0” will print the annual average for the year. Dates shown with a hyphen will display the growth rate between the two periods shown. For instance, the above stub file will make a table with the annual growth rates between 1995 and 1996 and then 1996 and 1997. Alternatively, the first line may say “Ask dates”; Compare then will ask the user to provide the dates from the keyboard.

Compare has several editing features that are controlled by special characters at the beginning of a line. They are:

*:

Go to the top of a new page and print the titles of the alternatives runs as given in the .FIX file.

*m:

If there is not room for <m> more items on the page, go to a new page and print the dates across the top.

*m n:

If there is not room on the page for <m> more items plus <n> lines, go to a new page and print the names of the base and alternative runs.

;:

Print the line just as it stands.

&:

Print the dates across the page above the appropriate columns.

\fw dp pl tm bm tw:

where <fw> <dp> <pl> <tm> <bm> and <tw> all are numbers. This is an optional command to set the field width of each printed number to <fw>, the number of decimal places to be printed to <dp>, the page length to <pl> lines, the top margin to <tm> lines, the bottom margin to <bm> lines, and the width of the titles to <tw>. The last three may be omitted. The default values are “7 1 60 3 9 32”.

\g:

where ‘g’ is the letter ‘g’. Show the growth rates in percent for the variables named on the following lines. The growth rate will be for the time period between adjacent columns in the table.

\dates:

Do not use this if you have specified growth rates in your dates command using the hyphenated dates.

\n:

where ‘n’ is the letter ‘n’. Cancel a previous \g.

\ar:

use if monthly or quarterly data is given at annual rates (the default). (ar = annual rates)

\pr:

use if monthly or quarterly data is given at monthly or quarterly rates (pr = period rates).

\xls:

Use to direct output to a spreadsheet document.

Many other commands that begin with the ‘\’ character are available. A line beginning in any other way will be presumed to begin with a variable name, such as gnp$, or an expression. For the expressions, all the functions available in G7 are also available in Compare. After the name or expression comes a ‘;’ and after the “;” come up to thirty characters which will be printed at the left side of the line. Leading blanks – blanks between the “;” and the first visible letter on the line – will be printed and can be used to indent the titles.

Please see the Compare documentation for more details on using the software. Additional details are available elsewhere in these Help files.