The Most Commonly Used Compare Commands

*

Go to the top of a new page and print the titles of the alternatives runs as given in the “.FIX” file. In Excel spreadsheets, a new worksheet will be created.

* <m>

If there is not room for <m> more items on the page, then 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. Note that this has changed from the ‘@’ used in older versions! This is so that the ‘@’ can be used for function names.

#

Any line beginning with this character as the first non-blank character will be treated as a comment. This allows you to selectively remove portions of a table by commenting them and then include them again later by removing the comment characters.

\dates

Provide the dates for the run. Use either 4-digit (prefered) digit or 2-digit (deprecated) dates; Compare can understand either. To specify the number of digits with which dates are printed, see the \yearformat command below. Annual dates are printed as integers, or with a ‘.0’. Quarterly dates are printed with 1 decimal point, and monthly dates with 3 decimal points. Examples: 1992 or 92 means 1992 at an annual rate. 1992.2 means 1992, 2nd quarter. 1993.011 means November 1993.

Growth rates also can be specified with the \dates command. To request growth rates, enter two numbers separated with a dash, such as “1992-1995”. Growth rates and levels can be mixed in the same table.

There also is a code that can be given in the \dates line of a stub file to provide finer control over the column layout of the table. The “s” code is followed by an integer. The integer tells how many columns to skip before printing the next column, if the file format is text or printer mode, or it provides the column width if the \xls option is employed. This may be useful in quarterly or monthly printouts, where you want to clearly mark out where the year begins and ends. For example:

\dates 1993.1 1993.2 1993.3 1993.4 s4 1994.1 1994.2 1994.3 1994.4 s4 1995.1 1995.2

Other uses of the \dates command are for calculating sums or averages of variables over a number of periods. If you specify the column heading “1995+1997”, then Compare will calculate the sum over the periods from 1995 to 1997 and print it in that column. If you specify a column heading such as “1995|1997”, then Compare will calculate the average over that interval and print it in that column. Finally, you should note that a shorthand version for specifying a continuous interval of dates exists. For example, if you want to make a large table with all series from 1950 to 1997 quarterly, you could specify your dates as:

\\dates 1950.1:1997.4
\ti <title>

This command can be used to specify a title, which will be centered on each subsequent page. It is positioned as many lines down from the top as is specified by the top margin.

\head <header>

The header is different than a title. The header is put at the top left margin, on the first line of each page. It is directly to the left of the page number. This is useful as the header for an entire set of tables, where each table has its own title given by the \ti command. Note: if the <header> is the word “title”, the title of the first bank will be used as the header.

\center <text to center>

This command inserts centered text into the table. The centering is done not with respect to the current page width but rather to the “right end” of the table, which is defined as the end of the last column of data.

\line <linechar>

This command inserts a line of <linechar> characters, out to the “right end” of the table. (The right end is the end of the last column of data.) If no character is supplied, the default character will be employed: the dash (‘-’) character.

\add <stubfilename> [<arg1>] [<arg2>] …

This command allows you to include the contents of another stub file into the current stub file. This is convenient when you want to make a large table which is an agglomeration of other tables. For example, with a large model such as LIFT, you may keep separate special-interest tables around, but then you may want to add them together for one large table. Note that command line arguments work just as in G7, where arguments are replaced by “%1” for the first argument, “%2” for the second, etc.

\fadd <stubfile> <argfile>

This command is also patterned after the corresponding G7 command. The <stubfile> is a stub file with arguments that could be used with the \add command. The <argfile> is a file containing a list of arguments. The <stubfile> is called once for each line of the <argfile>, just as in G7.

\mode

This command allows you to change the mode of comparison in selected areas of the table. “\mode a” means that data are to be compared as levels (“actuals”). “\mode d” means that data are to be compared as first differences. “\mode p” means that data are to be compared in terms of percentage differences from the base. Note that this same information is requested from the user in the interactive running of the Compare program. The \mode command in the stub file overrides this default mode of comparison.

\printbase <true | false>

Set \printbase to “true” (or “1” or “on” or “yes”) to print the baseline levels. Set \printbase to “false” (or “0” or “off” or “no”) to print only deviations from baseline levels. Deviations may be presented in differences or percentage differences, and this is controlled with the \mode command.

\gt
\growthtype
This command only is relevant if you have multi-period growth rates, such as 2005-2008. The \gt command can take three possible arguments. “\gt e” specifies exponential growth, “\gt c” specifies a compound growth rate, and “\gt p” specifies percentage growth. The relevant formulas used are displayed in the table below:

Growth Type

Formula

e

\(g = \frac{100}{T} \times \log\left(\frac{x_T}{x_0}\right)\)

p

\(g = \frac{100}{T} \times \left(\frac{x_T-x_0}{x_0}\right)\)

c

\(g = 100 \times \left(exp\left(\frac{\log(\frac{x_T}{x_0})}{T}\right)-1\right)\)

where:

\(g\):

The growth rate

\(x_T\):

The ending period data point

\(x_0\):

The starting period data point

\(T\):

The number of periods

\(\exp()\):

The exponential function

\(\log()\):

The natural logarithm function

Note that the default growth rate type is exponential (‘e’), and this will be applied if no alternative is specified.

\g

Show the growth rates in percent per year for the variables named on the following lines. Annual dates with a quarterly file will give growth of one year over the previous year. Quarterly dates with quarterly data will give quarter to quarter growth and this will be at an annual rate if the \ar command is in effect. Be careful not to use this command if you already have growth rates (such as “2002-2005”) specified in your \dates command.

\n

Cancels a previous \g command.

\div <number>

This divides every table entry in levels following this command by the specified factor. This is helpful if you would like to convert an entire table from millions to billions, for example. To turn off the effect of this command, merely issue the command “\div 1”.