G7 Commands: A

ac <series> [<n>]
Calculate the autocorrelation function for the named series over the period specified by the latest limits command. The optional <n> is the maximum number of terms to be calculated; its default value is 20. The output shows the autocorrelation function and the autoregression coefficients determined by the Yule-Walker equations. Taking the rightmost elements of each line of the autoregression coefficients gives the partial autocorrelation function. The function also is placed into the workspace with a name derived by adding “_ac” to the variable’s name. This facilitates graphing of the function. If the command was “ac vi 20”, then the graphing command would be “gr vi_ac :0 20”.

Example:

ac vin$ 11

Related Topics: ARIMA, bj

add <addfilename> [Arguments]
The add file is one of the most powerful features of G7 and is used intensively by those who are familiar with the G7 command set. Although the graphical user interface is a useful tool for teaching and for remembering features, the add file is necessary when you need to get large jobs done quickly, in unattended operation. Think of the add file as the batch file for G7. Only the basic syntax of the add command will be described in this section, as a complete discussion of its use, with examples, is provided in the section entitled “Command Files, Groups, and Do Lists.”

The commands in the <addfilename> are executed almost as if they were being typed in at the keyboard. G7 knows whether the commands are coming from an add file or not, so sometimes it may behave slightly differently to help speed up the operation. As indicated by the syntax above, the arguments are optional. There may be 99 arguments, and they are passed as text strings. If a long text string with separators such as spaces or arithmetic operators needs to be passed, it should be enclosed in double quotes (“”). The limit of the length of an argument is 90 characters.

Within the add file, the places where the arguments are to be substituted are indicated by “%1” up to “%99”. Strings passed in quotes will be inserted without the quotes.

Add files also may have a group on the command line. A group is a certain way of coding a list of numbers that may represent industries, categories, or other numbers. For example, “1-85” the list of numbers from 1 to 85 inclusive. To use a group as an argument, we must enclose those sectors in parentheses like this:

(1-85)

An add command allows its last two arguments to be groups. For example one could write out 85 add commands as follows:

add agr out 1
add agr out 2
...
add agr out 85

or equivalently, write them out in only one add command:

add agr out (1-85)

Up to two group arguments are allowed. However, group arguments only can be the last ones on the argument list. If two group arguments are used, by default, the outer loop is controlled by the first group argument, and the inner loop by the second group argument. For example,

add invest.reg (32-34) (52-54)

is equivalent to:

add invest.reg 32 (52-54)
add invest.reg 33 (52-54)
add invest.reg 34 (52-54)

There is an variation to the double loop, parallel matching, with an ‘m’ option after the second group. For example:

add invest.reg (32-34) (52-55(53)) m

is equivalent to:

add invest.reg 32 52
add invest.reg 33 54
add invest.reg 34 55

That is, the first members of each group are matched to be the first pair of arguments, the second member of each group to be the second pair, and so on. The two groups must have equal number of members in parallel matching.

Related Topics: Command Files, Groups and Do Lists, catch, do, fadd, function, hesitate, title, #

(addp)rint <n|y>
(addt)ype <n|y>
(addp)ype
The addprint command is used to control the quantity of output going to the screen. If it is invoked with an ‘n’ or “no”, this command turns off the typing on the screen of the contents of the add files. This significantly speeds up the processing of large data files. If you want to turn printing back on, use “addp y” for “yes”.

Related Topics: add, do, fadd, print, type

autocomplete [<setting> ]
The command box provides an auto-complete feature to speed the typing of repeated commands. Sometimes this feature proves troublesome. It can be turned off by clicking File | Autocomplete, or it can be turned off by typing the autocomplete command in the command box. Settings may be <0|1>, <yes|no>, <false|true>, or <off|on>. If no setting is given, then the current setting is displayed. The setting will be saved when G7 is closed, and the same setting will be restored when G7 next is run.
(autop)rint <y | n>
This command sets the global autoprint flag in G7, which is ‘n’ (no), or false, by default.

Example: When you set the flag to true, with:

autoprint y

then graphs will be printed as soon as they are drawn.

Related Topics: graph, zip