WWW | Store | Account | Contact Us
SHAZAM Homepage

GLS

The GLS command does Generalized Least Squares Regressions. GLS is applied when the variances of the observations are unequal (heteroscedasticity), or when there is a certain degree of correlation between the observations. In these cases Ordinary Least Squares can be statistically inefficient, or even give misleading inferences.

In general, the format is:

GLS depvar indeps / options

The user must specify one of PMATRIX=, OMEGA= or OMINV= as one of the GLS options to tell SHAZAM which matrix to use for estimation.

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.
beg= Specifies the BEGinning observation to be used in estimation. This option overrides the SAMPLE command and defaults to the sample range in effect.
blup The predicted values are adjusted using information obtained from previous period residuals according to the transformation specified by the P matrix. This option is not effective in forecasts using the GLS coefficients.
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.
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 Prints the Omega, Omega Inverse and P matrices used. It is important to be aware that each of these matrices is of the order N x N and in large samples could require many pages of printout. The DUMP option is useful for checking to see if the input of the matrix has been done correctly.
end= Specifies the ENDing observation to be used in estimation. This option overrides the SAMPLE command and defaults to the sample range in effect.
fullmat If the FULLMAT option is not specified, SHAZAM assumes that the specified matrix contains the diagonals of Omega (OMEGA=), Omega Inverse (OMINV=) or the P matrix (PMATRIX=).
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.
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.
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.
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.
nomulsigsq When the matrix is the actual covariance matrix of the parameter estimates this option is specified so the matrix is not multiplied by sigma squared.
omega= Specifies the matrix to be used for estimation as Omega (OMEGA=). One of OMEGA=, OMINV= or PMATRIX= options must be specified on each GLS command. The FULLMAT option must be used if the complete matrix, rather than just the diagonals of the matrix, is given. When just the diagonals are given the matrix must be set-up as follows. The main diagonal is entered in the first column in rows 1 to N. The first lower diagonal (if required) is entered in the second column in rows 1 to N-1 (the element in row N is ignored). The second lower diagonal (if required) is entered in the third column in rows 1 to N-2 (the elements in rows N-1 and N are ignored), etc.
ominv= Specifies the matrix to be used for estimation as Omega Inverse (OMINV=). One of OMEGA=, OMINV= or PMATRIX= options must be specified on each GLS command. The FULLMAT option must be used if the complete matrix, rather than just the diagonals of the matrix, is given. When just the diagonals are given the matrix must be set-up as follows. The main diagonal is entered in the first column in rows 1 to N. The first lower diagonal (if required) is entered in the second column in rows 1 to N-1 (the element in row N is ignored). The second lower diagonal (if required) is entered in the third column in rows 1 to N-2 (the elements in rows N-1 and N are ignored), etc.
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.
pmatrix= Specifies the matrix to be used for estimation as the P matrix (PMATRIX=). One of OMEGA=, OMINV= or PMATRIX= options must be specified on each GLS command. The FULLMAT option must be used if the complete matrix, rather than just the diagonals of the matrix, is given. When just the diagonals are given the matrix must be set-up as follows. The main diagonal is entered in the first column in rows 1 to N. The first lower diagonal (if required) is entered in the second column in rows 1 to N-1 (the element in row N is ignored). The second lower diagonal (if required) is entered in the third column in rows 1 to N-2 (the elements in rows N-1 and N are ignored), etc.
predict= Saves the PREDICTed values of the dependent variable in the variable specified.
resid= Saves the RESIDuals in the variable specified. For details on which residuals are saved see the UT and BLUP options.
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 The estimated coefficients will be used with the original data to compute predicted values and residuals that are UnTransformed. Without this option, the residual output and predicted values given are transformed.

For available temporary variables see the OLS command.