OUTPUT Statement
- OUTPUT < OUT=SAS-data-set >
< keyword=name ...keyword=name > / ;
The OUTPUT statement creates a new SAS data set that
contains all the variables in the input data set and, optionally, the
estimated linear predictors (XBETA) and their standard error estimates,
the weights for the Hessian matrix,
predicted values of the mean, confidence limits for predicted values,
and residuals.
You can also request these statistics with the OBSTATS, PREDICTED, RESIDUALS,
CL, or XVARS options in
the MODEL statement. You can then create a SAS data set containing
them with ODS OUTPUT commands. You may prefer to specify the OUTPUT statement for
requesting these statistics since
- the OUTPUT statement produces no tabular output
- the OUTPUT statement creates a SAS data set more
efficiently than ODS. This can be an advantage for
large data sets.
- you can specify the individual statistics to be included
in the SAS data set
If you use the multinomial distribution with one of
the cumulative link functions for ordinal data, the data set also
contains variables named _ORDER_ and _LEVEL_ that indicate the
levels of the ordinal response variable and the values of the variable
in the input data set corresponding to the sorted levels.
These variables indicate that the predicted value for a given observation
is the probability that
the response variable is as large as the value of the Value variable.
The estimated linear predictor, its standard error estimate, and the
predicted values and their confidence intervals are computed
for all observations in which the explanatory variables are all
nonmissing, even if the response is missing. By adding observations
with missing response values to the input data set, you can compute
these statistics for new observations or for settings of the
explanatory variables not present in the data without affecting the
model fit.
The following list explains specifications in the
OUTPUT statement.
- OUT= SAS-data-set
-
specifies the output data set.
If you omit the OUT=option, the output data set is created
and given a default name using the DATAn convention.
- keyword=name
-
specifies the statistics to be included in the output data set and
names the new variables that contain the statistics.
Specify a keyword for each desired statistic (see the following
list of keywords), an equal sign, and the name of the new variable or
variables to
contain the statistic. You can list
only one variable after the equal sign.
Although you can use the OUTPUT statement without any
keyword=name specifications, the output data set then contains
only the original variables and, possibly,
the variables Level and Value (if you use
the multinomial model with ordinal data).
Note that the residuals are not available for the
multinomial model with ordinal data.
Formulas for the statistics are given in the section "Predicted Values of the Mean"
and the "Residuals" section. The keywords allowed and the statistics
they represent are as follows:
-
HESSWGT
- diagonal element of the weight matrix used in computing the Hessian
matrix
-
LOWER | L
- lower confidence limit for the predicted value of the mean,
or the lower confidence
limit for the probability that the response is less than or equal to the
value of Level or Value.
The confidence coefficient is determined by the ALPHA=number option in
the MODEL statement as (1 - number)×100%. The default confidence
coefficient is 95%.
-
PREDICTED | PRED | PROB | P
- predicted value of the mean
or the predicted probability that the response
variable is less than or equal to the value of Level or Value
if the multinomial model for ordinal data is used
(in other words, Pr, where Y is
the response variable)
-
RESCHI
- Pearson (Chi) residual for identifying observations
that are poorly accounted for by the model
-
RESDEV
- deviance residual for identifying poorly fitted observations
-
RESLIK
- likelihood residual for identifying poorly fitted observations
-
STDXBETA
- standard error estimate of XBETA (see the XBETA keyword)
-
STDRESCHI
- standardized Pearson (Chi) residual for identifying observations
that are poorly accounted for by the model
-
STDRESDEV
- standardized deviance residual for identifying poorly fitted observations
-
UPPER | U
- upper confidence limit for the predicted value of the mean,
or the lower confidence
limit for the probability that the response is less than or equal to the
value of Level or Value.
The confidence coefficient is determined by the ALPHA=number option in
the MODEL statement as (1 - number)×100%. The default confidence
coefficient is 95%.
-
XBETA
- estimate of the linear predictor for
observation i, or
, where j
is the corresponding ordered
value of the response variable for the
multinomial model with ordinal data.
If there is an offset, it is included in .
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.