SUMMARIZE Instruction |
SUMMARIZE( options )
# list of regressors to sum (omit with VECTOR or ALL option)
or
SUMMARIZE( options ) expression
SUMMARIZE has two functions: It can compute the sum of the coefficients for the listed variables and print the sum, its standard error, the t-statistic (for a test that the sum is zero) and the significance level of the t-statistic. It can also be used to analyze any function of the coefficients of the regression.
Parameters
expression |
To analyze a linear or nonlinear combination of the coefficients, supply the desired expression as a parameter, using elements of the %BETA vector or nonlinear parameters (with PARMSET option) to represent the coefficients. Omit the supplementary card. |
Supplementary Card
On the supplementary card, list in regression format the set of variables from the previous regression that you want to sum. Omit this if you use the VECTOR or ALL options, or if you are using the expression parameter to analyze your own function of the coefficients.
Applicability
SUMMARIZE, in the first form described above, can be used only after LINREG, STWISE, AR1, DDV (logit and probit), LDV, SUR or ITERATE, as those instructions use regressor lists either directly or indirectly. It can be used after estimation instructions that use parameter sets (such as MAXIMIZE) with the use of the VECTOR option or by using the expression form with references to elements of %BETA. You can also use the original parameters in the expression form if you use the PARMSET option.
Options
[PRINT]/NOPRINT
TITLE="title for output" ["Summary of xxx of Coefficients"]
Use NOPRINT to suppress output (if you just need to set the variables shown below). Use TITLE to add to the output a description of what is being computed.
ALL/[NOALL]
Use ALL to test whether all of the coefficients can be excluded. Omit the supplementary card if you use this. This option was called WHOLE in older versions.
VECTOR=VECTOR of weights [unused]
VECTOR allows you to compute any linear combination of coefficients, not just the sum. The VECTOR should have dimension equal to the number of regressors and give the weights to apply to the regressors in computing the linear combination. If you are using VECTOR to compute the standard error of a non-linear function of the coefficients (that is, you have done the linearization yourself), you need to use VALUE to input the value of that function.
VALUE=input value for function [not used]
As an alternative to using the expression parameter to compute a standard error of a non-linear function of the coefficients, you can use VECTOR to input the weights on the function, and the VALUE option to input the value of that function.
FORM=F/CHISQUARED
This determines the form of the test statistic. By default, RATS selects the appropriate form based on the estimation technique used last. Use FORM to manually select a distribution if you have made changes to the regression that require a different distribution, such as altering the %XX matrix in a way which incorporates the residual variance into %XX.
PARMSET=PARMSET to use [default internal]
Use this option to apply the SUMMARIZE operation to the elements of a nonlinear parameter set, rather than to the coefficients in %BETA.
DERIVES=(output) VECTOR of derivatives
NUMERICAL/[NONUMERICAL]
DERIVES returns the VECTOR of derivatives of the expression with respect to the (full set of) parameters in case you need them for further calculations. By default, SUMMARIZE uses analytical derivatives, which aren't always available (for instance, RATS doesn't differentiate matrix operations). With NUMERICAL, it does numerical derivatives instead.
ENTRIES=number of entries to use from supplementary card [ALL]
Variables Defined
%CDSTAT |
the computed test statistic for the linear combination or expression equaling zero (REAL) |
%SIGNIF |
the marginal significance level (REAL) |
%SUMLC |
sum of the linear combination or expression (REAL) |
%VARLC |
variance of the linear combination or expression (REAL) |
Examples
This estimates an unrestricted distributed lag and uses SUMMARIZE to compute the sum of the lag coefficients. This is from example DISTRIBLAG.RPF.
linreg longrate
# constant shortrate{0 to 24}
summarize
# shortrate{0 to 24}
This estimates several parameters by "indirect least squares", as non-linear functions of the coefficients on a linear regression.
set cumsqr = cumsales^2
linreg sales
# constant cumsales{1} cumsqr{1}
summarize(title="Coefficient of Innovation") -.5*%beta(2)+.5*sqrt(%beta(2)^2-4*%beta(1)*%beta(3))
compute p=%sumlc
summarize(title="Coefficient of Imitation") +.5*%beta(2)+.5*sqrt(%beta(2)^2-4*%beta(1)*%beta(3))
compute q=%sumlc
summarize(title="Ceiling") (-.5*%beta(2)-.5*sqrt(%beta(2)^2-4*%beta(1)*%beta(3)))/%beta(3)
compute m=%sumlc
This estimates the moments of a series using the method of moments with a robust covariance calculation, then uses those to compute estimates of the mean, variance, skewness and excess kurtosis with standard errors for all of them.
nonlin(parmset=meanparms) m1 m2 m3 m4
frml f1 = s{0}-m1
frml f2 = (s{0}-m1)^2-m2
frml f3 = (s{0}-m1)^3-m3
frml f4 = (s{0}-m1)^4-m4
*
compute m1=0.0
compute m2=1.0
compute m3=0.0
compute m4=0.5
instruments constant
nlsystem(robust,lags=4,lwindow=newey,parmset=meanparms,inst) 2 * f1 f2 f3 f4
summarize(title="Mean",parmset=meanparms) m1
summarize(title="Standard Deviation",parmset=meanparms) sqrt(m2)
summarize(title="Skewness",parmset=meanparms) m3/m2^1.5
summarize(title="Excess Kurtosis",parmset=meanparms) m4/m2^2.0-3.0
The example below demonstrates a technique commonly referred to as the “delta method”. It computes a non-linear function from a linear regression and prints the value and the estimated standard errors from a linearization. This example estimates the long-run marginal propensity to consume from the regression
\({C_t} = {b_1} + {b_2}{Y_t} + {b_3}{C_{t - 1}}\)
The non-linear function required is \({b_2}/\left( {1 - {b_3}} \right)\). This is from example 5.6 in Greene (2012).
linreg(vcv) logc
# constant logy logc{1}
summarize(title="Long-run MPC") %beta(2)/(1-%beta(3))
Technical Information
If the preceding estimation instruction produces \(\hat \beta \) as the estimator, with covariance matrix
(1) \({\hat \sigma ^2}{\left( {{\bf{X'}}{\kern 1pt} {\bf{X}}} \right)^{ - 1}}\)
then the linear combination \({\bf{c}}\hat \beta \) will have variance
(2) \({\hat \sigma ^2}{\bf{c}}{\left( {{\bf{X'}}{\kern 1pt} {\bf{X}}} \right)^{ - 1}}{\bf{c'}}\)
The test statistic for \({\bf{c}} \beta = 0\)
(3) \(\frac{{\left( {{\bf{c}}\hat \beta } \right)}}{{\hat \sigma \sqrt {{\bf{c}}{{\left( {{\bf{X'}}{\kern 1pt} {\bf{X}}} \right)}^{ - 1}}{\bf{c'}}} }}\)
will be treated as a t with degrees of freedom from the last regression.
If, instead, the covariance matrix is \({\Sigma _X}\), that is, a factor of \({\hat \sigma ^2}\) can’t be pulled out of it, then the test statistic of
(4) \(\frac{{{\bf{c}}\hat \beta }}{{\sqrt {{\bf{c}}{\Sigma _{\bf{X}}}{\bf{c'}}} }}\)
is treated as a standard Normal.
For evaluating the general expression \(f(\hat \beta )\), the calculations of the variance and test statistics are done using the “delta” method with \({\bf{c}} = \nabla f(\beta )\) .
Output
This is from the first example above.
Summary of Linear Combination of Coefficients
SHORTRATE Lag(s) 0 to 24
Value 0.92602224 t-Statistic 75.73293
Standard Error 0.01222747 Signif Level 0.0000000
This is from the second example. The "Value" is the computed value of the expression, while the "Standard Error" is computed using the "delta" method.
Coefficient of Innovation
Value 0.06420618 t-Statistic 3.37721
Standard Error 0.01901160 Signif Level 0.0149091
Coefficient of Imitation
Value 0.68625618 t-Statistic 7.93101
Standard Error 0.08652817 Signif Level 0.0002135
Ceiling
Value 9469.81170 t-Statistic 44.93156
Standard Error 210.76082 Signif Level 0.0000000
Copyright © 2025 Thomas A. Doan