WWW | Community | Store | Account | Contact Us
SHAZAM Homepage

MLE

The MLE command provides Maximum Likelihood Estimation of linear regression models for a range of distributional assumptions. If the desired form of the model is not listed with the TYPE= option see the LOGDEN option in on the NL Command where a user-specified density function may be estimated. In regression applications where the dependent variable is strictly positive the assumption of normally distributed errors may be inappropriate and this command should be considered.

In general, the format is:

MLE 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.
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.
conv= Specifies the CONVergence criterion for the coefficients. This value will be multiplied by each coefficient starting value to compute the convergence condition for each coefficient. The default is CONV=.00001.
cov= Saves the COVariance matrix of coefficients in the variable specified.
dump DUMPS large amounts of output mainly useful to SHAZAM Consultants
end= Specifies the ENDing observation to be used in estimation. This option overrides the SAMPLE command and defaults to the sample range in effect.
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.
in= Reads back the values of the coefficients and log-likelihood function that were saved with the OUT= option. This option is only useful when there is something to INput from a previous run. This option may be combined with the OUT= option to insure that the IN= file always contains the values of the coefficients from the most recent iteration. The COEF command should only be used with the IN= option if the starting values of some of the coefficients are to be modified. When both OUT= and IN= are used the same unit number is usually used. A binary file should be assigned to the unit with the SHAZAM FILE command or an operating system command.
iter= Specifies the maximum number of ITERations. The default is 100.
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.
lm Performs a Lagrange Multiplier test of some models against a less restricted model. If TYPE=EXP is used, two LM Tests for the GAMMA or WEIBULL models will be done. If TYPE=WEIBULL or TYPE=GAMMA is used the LM test of a Generalized Gamma distribution is performed.
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 nonlinear algorithm to use. The choices are BFGS (the default) or DFP. These METHODs are described in the chapter NONLINEAR REGRESSION in the SHAZAM Reference Manual.
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.
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.
numeric Uses the NUMERIC difference method to compute derivatives in the algorithm. SHAZAM normally computes analytic derivatives which are more accurate. However, in some models with many equations and parameters, considerable savings in required memory will result if the NUMERIC option is used to compute numeric derivatives. In some cases the NUMERIC option may even be faster. For large models SHAZAM may automatically switch to numeric derivatives. If this happens then analytic derivatives can be forced with the NONUMERIC option (this will not be effective if functions other than LOG() and EXP() are used in the model).
out= Writes OUT on the unit specified the values of the coefficients and log-likelihood function after each iteration. This is quite useful for restarting the model in another run with the IN= option described above. When this option is used, a file must be assigned to the output unit as described in the chapter DATA INPUT AND OUTPUT in the SHAZAM Reference Manual. The values will be written in double precision (binary) all on one line. Units 11-49 are available for use.
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.
piter= Specifies the frequency with which ITERations will be Printed in the output. The default PITER=15 indicates that one out of every 15 iterations will be printed.
predict= Saves the PREDICTed values of the dependent variable in the variable specified.
resid= Saves the values of the RESIDuals from the regression in the variable specified.
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.
type= Specifies the TYPE of distribution to be assumed for the errors. The available TYPEs are WEIBULL, EWEIBULL, GAMMA, EGAMMA, GG (Generalized Gamma), EGG, LOGNORM (Lognormal), BETA, EBETA, EXP (Exponential), EXTREMEV (Extreme Value Distribution), MBETA, POISSON and EPOISSON. The default is TYPE=EXP. The types EWEIBULL, EGAMMA, EGG and EXTREMEV are used when the dependent variable is in log form. They correspond to the WEIBULL, GAMMA, GG, and EXP forms respectively.
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.

The available temporary variables on the MLE command are:

$DF, $DW, $ERR, $K, $LLF, $N, $R2, $R2OP, $RAW, $RHO, $SIG2, $SSE, $SSR, $SST, $ZDF, $ZSSR, $ZSST.