.. index:: single: G7 Command; eqpunch single: G7 Command; titpch single: G7 Command; tpch single: G7 Command; ipch single: G7 Command; punch Regressions on Industry Data ============================ **eqpunch | "off"** The *eqpunch* command is for writing equation results to a file in a tabular format. We follow the precedent of giving those files an .EQP extension, but of course, any file name will do. The use of the *eqpunch* command is analogous to the *ipch* command, and in fact, both often are used in the same regression .REG file. The *eqpunch* command sets up a file for writing by the *titpch* and *tpch* commands. The *titpch* writes a header for the table and the *tpch* command writes out regression results, one line per sector. See the documentation on the *tpch* command for a complete example. **titpch [-] [] [str1 str2 ... strn]** The *titpch* command defines a header line that will be provided for a regression table, and it defines the regression output that will be displayed on subsequent *tpch* commands. Before using either the *titpch* or *tpch* commands, an equation table punch file (.EQP) first must be opened using the *eqpunch* command. The is a number that indicates how long the "stub" or title for the line should be. You should ensure that the width you specify in the *tpch* command is the same so that the table will line up properly. See the example below for the *tpch* command. , , ..., are strings to be printed to explain the coefficients. Therefore, might be "intercept", is the second explanatory variable name, and so on. The option string starts with a '-' character, followed by one or more of: :b: rbar-squared :o: rho :r: r-squared :s: see :d: double-line format :f: floating point f format, instead of *G7* format. **tpch [] [<"label">] [str_len] [(coef numbers)]** The *tpch* command writes a line of parameters to an equation table file (.EQP). In order to use this command, the file first must be opened with the *eqpunch* command and a header definition supplied by the *titpch* command. The arguments for this command are as follows: :sur_which: is used only when an equation has been estimated with the *stack* or *sur* commands so that the coefficients are in *rcoef1*, *rcoef2*, etc. :sector: is the number of the sector or category for which the equation is estimated. :label: is a sector or category title in quotes. If used, you also should specify the length that you want to be printed in the argument :str_len: is the length of the sector or category label in the printout. Note that this should be equal to the stub length specified in the *titpch* command. :coef numbers: are used when there is a superset of regression parameters possible and each equation uses some subset of that. Example:: eqpunch ven.eqp # Note: 30 is stub length. Be sure to use the same for tpch! titpch -rsf 30 const use usedif add vena.reg 1 "Oilseed farming" ... eqpunch off [contents of vena.reg] :: ti %1 %2 subti Inventory Change Regression f usedif = use%1-use%1[1] r ven%1 = use%1, usedif #gr * ipch ven %1 a tpch %1 "%2" 30 **punch ** The *punch* command opens an equation file for writing with the *ipch* command. These files usually have the extension .EQN and are used by *InterDyme* models to construct an Equation object that contains regression parameters, values of rho, equation types, and other information for multisectoral regression equations. To close the file, use *punch off*. The *punch* command usually is given at the beginning of a large regression add file. It often is useful to use the fadd command, along with an argument file that contains sector numbers, titles, equation types, starting dates and other information that changes with each sector. Within the body of the fadd, a regress command will be followed by an *ipch* command. This will estimate the regression and put the equation results into the equation file. **ipch []