OLS

The OLS command will perform OLS regressions.

In general, the format is:

  OLS depvar indeps / options


The available options are:

Option Description
ANOVA Prints analysis of variance tables and model selection tests.
AUXRSQR Prints the R-squared statistic for the auxiliary regressions.
DFBETAS Used with the INFLUENCE option if you want the DFBETAS computed.
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.
DUMP DUMPS large amounts of data on the regression.
DWPVALUE Computes the exact Durbin Watson probability.
GF Prints Goodness of Fit tests for normality of residuals, skewness, kurtosis and the Jarque-Bera test.
GRAPH Plots residuals and fitted values with GNUPLOT.
HETCOV Uses Heteroskedastic-Consistent covariance matrix.
INFLUENCE Computes the Belsey-Kuh-Welsch Influence Diagnostics.
LININV Calculates elasticities assuming the dependent variable is linear, but the independent variables are in inverse form.
LINLOG Calculates elasticities assuming the dependent variable is linear, but the independent variables are in LOG form.
LIST Lists the residuals and predicted values of the dependent variable and residual statistics.
LOGINV Calculates elasticities assuming 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.
LOGLOG Used when the dependent variable and all the independent variables are in log form.
MAX Prints analysis of variance tables, variance-covariance matrix, correlation matrix, residuals, residual statistics, goodness of fit test for normality, Jarque-Bera test, and plots residuals.
NOCONSTANT Removes the intercept from the equation.
NOMULSIGSQ When NOMULSIGSQ is specified the estimated covariance matrix will just be X'X inverse.
NONORM Weights are NOT to be normalized.
PCOR Prints the correlation matrix of coefficients.
PCOV Prints the covariance matrix of coefficients.
PIL Polynomial inverse lag.
PLUSH Prints the LUSH residuals.
REPLICATE Used with WEIGHT= if your weights indicate a sample replication factor.
RESTRICT Forces restrictions into the regression.
RSTAT Prints and plots residuals and residual statistics.
UT Used with WEIGHT= if you want the residuals and predicted values to be UnTransformed.
AUTCOV= Autocorrelation equivalent to HETCOV option.
BEG=,END= Specifies the sample size for the given command.
COEF= Stores the coefficients in another variable.
COV= Saves the variance-covariance matrix.
FE=,FX= Specify F values in Stepwise regression.
HATDIAG= Saves the diagonal of the so-called Hat Matrix.
IDVAR= Specifies a variable which contains names to be printed out next to the residuals when the LIST option is used.
INCOEF= Used to specify a vector of coefficients to input if you do not want to estimate the mode.
INCOVAR= Used with the INCOEF= option to specify a covariance matrix.
INDW= Specifies a value for the Durbin-Watson test statistic.
INSIG2= Used with the INCOEF= option described above to specify a value of sigma - squared.
METHOD= Specifies the METHOD; GS (Gram Schmidt) (default), HH (Householder), or NORMAL (Normal Equations).
NPOP= Specifies the population size. The error variance is multiplied by a finite population correction factor.
ORDER= Specifies the order to test with the DWPVALUE option.
PCINFO= The matrix of Information obtained from a previous PC command for regression on Principal Components.
PCOMP= The matrix of Principal Components if this is a regression on Principal Components.
PE=,PX= Specify probability levels in Stepwise regression.
PREDICT= Saves the predicted values of the dependent variables.
RESID= Saves the values of the residuals from the regression.
RIDGE= Specifies a value of k to be used in Ridge regression.
STDERR= Saves the values of the standard errors of the coefficients.
TRATIO= Saves the values of the t-ratios on the coefficients.
WEIGHT= Specifies a weight for a Weighted Least Squares regression.

The temporary variables available 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