The *catch* command captures most screen output (except graphs) to the named <catchfile>. The default flag “-w” causes a new file to be created. The optional “-a” flag causes *G7* to open an existing file and append text to the end. This command is used to capture the set up of a regression and its results into a file. A regression display is caught as it stands when you proceed to the next command. To turn off the catching type “catch off”. The *catch* command can also be used as a clever way to create new add files. Simply catch the results of a session, go in and edit out the extraneous output, and voila, a new add file!

The *cbk* command assigns a compressed bank (.CBK, .CIN). The <bank_location> is optional, and may be a letter between ‘a’ and ‘z’. If no letter is given, the position will be ‘a’. The compressed bank comes in two files. The first file, with extension .CBK, holds the data series in compressed format, and the second file, with extension .CIN, holds an index of names of series. When you give the <bank_name>, give only the “root name”, that is, without the file extension.

This has no effect in *G7* or *Build,* but the C-language statement is passed through to the file HEART.CPP, 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.

Related Topics: Model Building

Change the current working directory to <path>. This is equivalent to the menu option File | Directory.

Normally when starting

G7, you are asked to specify the location of the G.CFG you would like to use for identifying the default assigned bank and current working directory. Using thecdcommand, you can change the current working directory. After giving this command,G7will look in that directory when searching for .add files, .reg files, and databanks.Related Topics: G.CFG,

pwd

The *chow* command is a test of homogeneity. In the calling format above, <n> is the number of regressions involved in the test.

A Chow test is a special case of the Fisher

Ftest used to test the homogeneity of a sample. Typically, one runs two or more regressions covering parts of a sample and compares the sum of squared errors with that of a single regression covering the whole sample. If we were going to break up the sample into two parts, the command would bechow 3Then we run first the two regressions over the separate halves of the sample, and finally the single regression over the whole sample. After this last regression, one will be greeted by the results of the Chow test.

There is a special case in which the second portion of the sample is too small to run the regression. In that case, give the command:

chow 2and then run the regression over the reduced sample and then again over the whole sample. After the second regression, the Chow tests appear.

Related Topics: Regression Tests

The *clear* command can be used to clear the contents of the results window. This window can be useful for viewing the history of a *G7* session, but as it gets larger it may scroll more slowly. This command is equivalent to the File | Clear Results command from the menu.

The close command is used to close a bank, multiple banks, or all banks.

Examples

close all # close all open banks except the workspace bank close a # close bank 'a' close c d e # close banks 'c', 'd', and 'e'

If “yes”, the simple correlation matrix and the standard deviation of each variable will be typed before the regression results. The default is “no.”

Convert the named flow matrix to a coefficient matrix by dividing each column of the matrix by the corresponding element of the named vector. If no year is named, the command works over the *fdates* range. If the ‘-r’ option is specified, then each row of the matrix will be divided by the corresponding vector element; otherwise, the default ‘-c’ setting is assumed or may be specified to indicate that column elements should be divided by vector elements.

It happens fairly frequently that we have similar data sets collected at different times or in different places. We then may wish to estimate regressions which combine the data sets in various ways. The *comcoef* command in *G7* is designed for this purpose. It allows one to specify a number of “common coefficients” in the regressions that follow. The method may be explained best with an example. In the following example, “cps78” and “cps85” are data banks of from the Current Population Surveys of 1978 and 1985, respectively. The first has data on 550 individuals, the second on 534 individuals. We want to regress the logarithm of an individual’s wage, lnwage, on the individuals education, ed. We want the coefficient of lnwage to be the same in both samples, but the interecepts may be different in the two years.

Here is what we do.

f one = 1 comcoef 1 4 hbk cps78 lim 1 550 r lnwage = ! ed, one hbk cps85 lim 1 534 r lnwage = ! ed, one doIn the

comcoefcommand, the “1” tells the program to use the same coefficient for the first 1 variable(s) in all the following regressions. The “4” is the total number of variables, counting the dependent variable, in the combined or “pooled” regression. Once thecomcoefcommand has been received,G7accumulates regressions until thedocommand is reached. Only a limited set of commands are a permitted between thecomcoefcommand and thedocommand. They are thebank,hbk,lim,f,add,pause,quit, andrcommands. Thequitcommand only quitscomcoef, notG7.The

comcoefcommand can be used under thechowcommand and under thecatchcommand. It also puts the estimated coefficients into thercoefseries in the workspace bank, as usual. It does not enter a series of predicted values into the workspace bank, sogr *will not work following acomcoefregression, nor are the variable names shown on the display of the results, for in general the variables with a common coefficient may have different names while variables with different coefficients may have the same name, such as “one” in the above example.

These provide control over the command-line cache, where each command-box entry is recorded. Commands allow printing of the cached commands, clearing of the cache, and execution of the cached commands.

The *con* command imposes a “soft constraint” on a regression. The <top> (trade-off) parameter determines how “soft” is the constraint. The higher is this number, the harder the constraint. The constraint counts as *top*T* observations, where *T* is the number of regular observations in the regression. Soft constraints are also know as “Theil’s mixed estimation,” as “stochastic constraints,” and are also a particular type of Bayesian regression.

Remember to put the value <c> of the constraint on the left hand side. Note that one parameter may appear in one or more constraints, but be careful not to impose constraints that are inconsistent!

We often use soft constraints when theory suggests that a parameter should be near a certain value, but ordinary regression gives a raw parameter that is not consistent with what theory suggests. Often, the theoretically sensible parameters also are those that lend stability to our models. The use of soft constraints also is implicit in the estimation of Almon lags, imposed using the

smacommand.The

concommands must be given before the regression to that they apply, and they will be cleared after that regression is estimated.Examples:

con 100 1 = a3 + a4 + a5 con 200 0 = a7 - 3a6 + 3a7 - a8

The *ctrl* command imposes the values of <x> series as a control total on a <group> of sectors of a given <concept> (such as exports). Results are stored in the workspace bank with names formed by <concept> and the given sectors.