WWW | Store | Account | Contact Us
SHAZAM Homepage

OLS

The OLS command will perform Ordinary Least Squares regressions and produce standard regression diagnostics. In addition, the OLS command has an extensive list of options that provides many features for estimation and testing of the linear regression model.

In general, the format is:

OLS depvar indeps / options

The available options are:

OPTION DESCRIPTION
anova Prints the ANalysis Of VAriance tables and the F-statistic for the test that all coefficients are zero. In some restricted models, the F-test from an ANOVA table is invalid. In these cases the F-statistic will not be printed, but may be obtained with the TEST command. Model Selection Tests are also printed.
autcov= Specifies the lag length L to use in the Newey and West [1987] variance estimator for models with autocorrelated disturbances. This option is the autocorrelation equivalent to the HETCOV option. Use AUTCOV=1 until you really understand the method.
auxrsqr Prints the R-squared statistics for the auxiliary regressions of each independent variable on all other independent variables. These R-squared statistics are useful in detecting multicollinearity. This option is not implemented when the HETCOV option is specified.
beg= Specifies the BEGinning observation to be used in estimation. This option overrides the SAMPLE command and defaults to the sample range in effect.
coef= Saves the COEFficients in the variable specified. If there is an intercept it will be stored as the last coefficient.
cov= Saves the COVariance matrix of coefficients in the variable specified.
dfbetas Used with the INFLUENCE option if you want the DFBETAS computed. Also see the INFLUENCE option.
dlag Used to compute Durbin's h statistic when there is a LAGged Dependent variable. DN Uses a divisor of N instead of N-K for SIGMA**2. The lagged dependent variable must be the first listed independent variable when this option is used. The h statistic is useful since the Durbin-Watson statistic may not be valid in such situations. Durbin's h statistic cannot always be computed since the square root of a negative number may be required. In such cases, the h statistic will neither be computed nor printed. It is essential to remember that when lagged variables have been generated a SAMPLE command must be included to delete the beginning observations.
dn Estimates the error variance by Dividing the residual sum of squares by N instead of N-K
dump DUMPS large amounts of output mainly useful to SHAZAM Consultants
dwpvalue Computes the Durbin Watson Probability-VALUE. Suppose the Durbin-Watson test statistic d has a calculated value of DW. For a test of the null hypothesis of no autocorrelation in the errors against the alternative hypothesis of positive autocorrelation the p-value is P(d less than DW). For the alternative hypothesis of negative autocorrelation the p-value is 1-P(d less than DW).
end= Specifies the ENDing observation to be used in estimation. This option overrides the SAMPLE command and defaults to the sample range in effect.
fe= Specifies the entry criteria in terms of F-values rather than probability levels when running Stepwise regressions. SHAZAM will use the user-supplied values of FE= and FX= only when no values are supplied for PE= or PX=. If either FE= or FX= is not specified, it will be defaulted to the other value. If FX>FE then SHAZAM will set FX to FE. If FE=0 then all of the step variables will be allowed to enter. If the value specified for FX= is a large number then all of the step variables may be removed.
fx= Specifies the exit criteria in terms of F-values rather than probability levels when running Stepwise regressions. SHAZAM will use the user-supplied values of FE= and FX= only when no values are supplied for PE= or PX=. If either FE= or FX= is not specified, it will be defaulted to the other value. If FX>FE then SHAZAM will set FX to FE. If FE=0 then all of the step variables will be allowed to enter. If the value specified for FX= is a large number then all of the step variables may be removed.
gf Prints Goodness of Fit tests for normality of residuals. Coefficients of skewness and excess kurtosis and the Jarque-Bera test for normality of the residuals are also computed.
graph Prepares Graphs of the residuals and the fitted values.
hatdiag= Saves the diagonal of the so-called Hat Matrix to the specified variable
hetcov Uses Heteroskedastic-Consistent covariance matrix to correct the estimates for an unknown form of heteroskedasticity. This option is not available with METHOD=HH. If this option is used, the forecast standard errors computed by the FC command will not be correct. See the chapter ORDINARY LEAST SQUARES in the SHAZAM Reference Manual.
idvar= Specifies a character variable that contains observation labels to be displayed when the LIST or MAX options are used. The WIDE option should also be specified.
incoef= Specifies a vector of COEFficients to INput if you know what the coefficients are and do not want to estimate the equation.
incovar= Specifies a COVARiance matrix to be used with the INCOEF= option. The covariance matrix must be a symmetric matrix stored in lower-triangular form such as that produced by the COV= option or the SYM function on the MATRIX command. When this option is used the NOMULSIGSQ option is automatically in effect.
indw= Specifies a value for the Durbin-Watson test statistic. This option may be used with the DWPVALUE option to get a p-value for the Durbin-Watson statistic.
influence Computes the Belsley-Kuh-Welsch diagnostics for detecting influential observations. See also the DFBETAS and HATDIAG= options. The INFLUENCE option is not valid with the RIDGE=, HETCOV, AUTCOV=, RESTRICT or Stepwise Regression options.
insig2= Used with the INCOEF= option described above to specify a value of sigma - squared
lininv Used when the dependent variable is LINear, but the independent variables are in INVerse form. This type of model is known as the reciprocal model. This option only affects the calculation of the elasticities. NOTE: This option does not transform the data. The data must be transformed by the user with the appropriate GENR commands or the Data Editor. See the chapter ORDINARY LEAST SQUARES in the SHAZAM Reference Manual.
linlog Used when the dependent variable is LINear, but the independent variables are in LOG form. This option only affects the calculation of the elasticities. NOTE: This option does not transform the data. The data must be transformed by the user with the appropriate GENR commands or the Data Editor. See the chapter ORDINARY LEAST SQUARES in the SHAZAM Reference Manual.
list LISTs and plots the residuals and predicted values of the dependent variable and residual statistics. When LIST is specified RSTAT is automatically turned on.
loginv Used when the dependent variable is in LOG form, and the independent variables are in INVerse form.
loglin Used when the dependent variable is in LOG form, but the independent variables are LINear. This option only affects the calculation of the elasticities. NOTE: This option does not transform the data. The data must be transformed by the user with the appropriate GENR commands or the Data Editor. See the chapter ORDINARY LEAST SQUARES in the SHAZAM Reference Manual.
loglog Used when the dependent variable is in LOG form, and the independent variables are in LOG form. This option only affects the calculation of the elasticities. NOTE: This option does not transform the data. The data must be transformed by the user with the appropriate GENR commands or the Data Editor. See the chapter ORDINARY LEAST SQUARES in the SHAZAM Reference Manual.
max Prints Analysis of Variance Tables, Variance-covariance matrix, Correlation matrix, Residuals, Residual Statistics and Goodness of Fit Test for Normality. This option is equivalent to using the ANOVA, LIST, PCOV, PCOR and GF options. Users should be sure the MAX output is necessary, otherwise unnecessary calculations are required.
method= Specifies the computational METHOD to use; GS (Gram Schmidt) (default), HH (Householder), or NORMAL (Normal Equations). All methods should yield nearly identical results with most data, however GS is probably the most accurate in most situations.
noanova Specifies not to print Analysis of Variance tables and model selection tests
noconstant There will be NO CONSTANT (intercept) in the estimated equation. This option is used when the intercept is to be suppressed in the regression or when the user is supplying the intercept. This option should be used with caution as some of the usual output may be invalid. In particular, the usual R^2 is not well defined and could be negative. However, when this option is used, the raw moment R^2 may be of interest. The ANALYSIS OF VARIANCE - FROM MEAN table will not be computed if this option is used.
nogf Specifies not to print Goodness of Fit tests for normality of residuals, skewness, kurtosis and the Jarque-Bera test
nomulsigsq When NOMULSIGSQ is specified the estimated covariance matrix will just be X'X inverse. i.e. the complete covariance matrix of the estimated coefficients and is NOt MULtiplied by Sigma-squared.
nonorm Used with WEIGHT= if you do not want normalized weights. Interpretation of output is sometimes difficult when weights are not normalized. Sometimes, the weights can be viewed as a sampling replication factor. Users are expected to know exactly what their weights represent.
nowide Uses a narrower page width for the display of results. For printing, the page set-up can be set to portrait orientation.
npop= Specifies the population size N^P. When this option is used it is considered that the sample size N is not a small fraction of the population size. The error variance is multiplied by the finite population correction factor (N^P-N)/N^P.
order= Specifies the order of autocorrelation to test if the DWPVALUE option is used. The default is ORDER=1.
pcinfo= The matrix of Information obtained from a previous PC command for regression on Principal Components. This option is only used on OLS commands in conjunction with the PC command.
pcomp= The matrix of Principal Components if this is a regression on Principal Components. This option is only used on OLS commands in conjunction with the PC command.
pcor Prints the CORrelation matrix of the estimated coefficients. This should not be confused with a correlation matrix of variables which can be obtained with a STAT command.
pcov Prints the COVariance matrix of coefficients. This should not be confused with the covariance matrix of variables which can be obtained with the STAT command.
pe= Entry probability level in Stepwise regression. It is used to specify the Probability levels for Entering (PE=) variables that may be stepped into the equation when a Stepwise regression is being run. If a variable is more significant than the PE level, it will be included. If at any step a variable becomes less significant than PX it will be deleted from the equation. The default values are PE=.05 and PX=.05. If either value is not specified it will be defaulted to the other value. If PX is less than PE then PX will be set to equal PE. If PE=1 then all of the step variables will be allowed to enter. If PX=0 then all of the step variables will be removed.
pil Estimation with the Polynomial Inverse Lag technique proposed by Mitchell and Speaker [1986].
plush Prints the LUSH (Linear Unbiased with Scalar covariance matrix using Householder transformation) residuals.
predict= Saves the PREDICTed values of the dependent variable in the variable specified.
px= Exit probability levels in Stepwise regression. It is used to specify the Probability levels for Exiting (PX=) variables that may be stepped into the equation when a Stepwise regression is being run. If a variable is more significant than the PE level, it will be included. If at any step a variable becomes less significant than PX it will be deleted from the equation. The default values are PE=.05 and PX=.05. If either value is not specified it will be defaulted to the other value. If PX less than PE then PX will be set to equal PE. If PE=1 then all of the step variables will be allowed to enter. If PX=0 then all of the step variables will be removed.
replicate Used with WEIGHT= when the weights indicate a sample replication factor. When this option is specified the NONORM option is often desirable. The effective sample size will then be adjusted upward to be equal to the sum of the weights. The UT option is automatically in effect.
resid= Saves the values of the RESIDuals from the regression in the variable specified.
restrict Forces linear RESTRICTions into the regression. It tells SHAZAM that RESTRICT commands follow. Restrictions must be linear. This option may not be used with DWPVALUE or METHOD=HH.
ridge= Specifies a value of k to use to convert the OLS regression to a RIDGE regression. This option only permits ordinary RIDGE regression where the diagonal elements of the matrix are augmented by k. In order to do a RIDGE regression, a value for k must be specified. It may be necessary to run several regressions using different values of k in order to examine the stability of the coefficients. The value of k should be between zero and one. A value of k equal to zero will be an OLS regression. The user should be familiar with RIDGE regression before using this option.
rstat Prints Residual Summary STATistics. The output includes the Durbin-Watson statistic and related residual test statistics. It also includes the Runs Test. When the LIST option is specified RSTAT is automatically turned on.
stderr= Saves the values of the STanDard ERRors of the coefficients in the variable specified.
tratio= Saves the values of the T-RATIOs in the variable specified.
ut Used with WEIGHT= for residuals and predicted values that are UnTransformed. The estimated coefficients are used with unweighted data to obtain predicted values. The regression estimates are not affected by this option. This option is not available with METHOD=HH.
weight= Specifies a variable to use as the weight for a WEIGHTed Least Squares regression. OLS with the WEIGHT= option is similar to a GLS regression with a diagonal Omega matrix. Users should also examine the NONORM, UT and REPLICATE options described above which can be used with the WEIGHT= option. More details and an example are given in the SHAZAM Reference Manual.
wide Uses a wider page width for the display of results. For printing, the page set-up should be set to landscape orientation.

The available temporary variables on the OLS command are:

$ADR2, $ANF, $DF, $ERR, $CDF, $DW, $K, $LLF, $N, $PI, $R2, $R2AN, $R2OP, $RAW, $RHO, $SIG2, $SSE, $SSR, $SST, $ZANF, $ZSSR, $ZSST ANOVA option: $FPE, $LAIC, $LSC, $GCV, $HQ, $RICE, $SHIB, $SC, $AIC DLAG option: $DURH LM option: $JB.