Regressions on Industry DataΒΆ

eqpunch <filename> | “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 [-<options>] [<stub_len>] [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 <stub_len> 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. <str1>, <str2>, ..., <strn> are strings to be printed to explain the coefficients. Therefore, <str1> might be “intercept”, <str2> 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 [<sur_which>] <sector> [<”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 <str_len> 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 <punchfile | “off”>

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 [<which>] <label> <sector> [<type>] [<psn1>] ... [<psnN>] [extra <var1> .. <varN>]

The ipch (InterDyme punch) command is used for creating equation files for use in building InterDyme models, where:

which:is the suffixed number.
label:is the name of the vector for which the equation is estimated.
sector:is the number of the sector to which the equation applies.
type:is a character (‘a’, ‘b’, etc.) to signal the type or form of the equation. The type should not be a numeral.
psn1:(optional) the column number in the matrix where the first regression coefficient belongs.
psnN:The column number in the matrix where the nth regression coefficient belongs.

At the end of the command, type the word “extra” (without the quotes), and then type several variable names that hold the values of extra parameters you would like to pass to the file. For example, for an investment equation that calculates capital stocks and replacement investment, a physical service life is needed to calculate the spill rate. The following code would write the physical life at the end of the parameter list:

f plf1 = 4.9
r eqi1 = out1, out1[1], out1[2]
ipch eqi 1 a extra plf1

The ipch command is not useful unless an equation file already has been opened with the punch command. See the InterDyme manual, Chapter 4, for more information on the punch and ipch commands and on detached-coefficient equations in InterDyme.

Previous topic

Titles for Vam Files

Next topic

Vam2Vam – Selective Copying From One Vam File to Another

This Page