G7 Commands: C¶
Related Topics: Model Building
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 the cd command, you can change the current working directory. After giving this command, G7 will look in that directory when searching for .add files, .reg files, and databanks.
Related Topics: G.CFG, pwd
A Chow test is a special case of the Fisher F test 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 be
chow 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
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'
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 comcoef command, 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 the comcoef command has been received, G7 accumulates regressions until the do command is reached. Only a limited set of commands are a permitted between the comcoef command and the do command. They are the bank, hbk, lim, f, add, pause, quit, and r commands. The quit command only quits comcoef, not G7.
The comcoef command can be used under the chow command and under the catch command. It also puts the estimated coefficients into the rcoef series in the workspace bank, as usual. It does not enter a series of predicted values into the workspace bank, so gr * will not work following a comcoef regression, 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.
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 sma command.
The con commands 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