SAVE Subcommand (GENLIN command)
The SAVE
subcommand adds predicted,
residual, leverage, or Cook's distance values to the working dataset.
- Specify one or more temporary variables, each followed by an optional new name in parentheses.
- The optional names must be unique, valid variable names.
- If new names are not specified, then
GENLIN
uses the default names. If the default names conflict with existing variable names, then a suffix is added to the default names to make them unique.
The following rules describe the functionality of the SAVE
subcommand when the response variable—either
the dependent variable or the events or trials variable—has
an invalid value for a case.
- If all factors and covariates in the model have valid
values for the case, then the procedure computes predicted values
but not the residuals. (The
MISSING
subcommand setting is taken into account when defining valid/invalid values for a factor.) - An additional restriction for factors is that only those values of the factor actually used in building the model are considered valid. For example, suppose factor A takes values 1, 2, and 3 when the procedure builds the model. Also suppose there is a case with an invalid dependent variable value, a value of 4 on factor A, and valid values on all other factors and covariates. For this case, no predicted value is saved because there is no model coefficient corresponding to factor A = 4.
XBPRED (varname | rootname:n). Predicted value(s) of the linear predictor. For all distributions except the multinomial, XBPRED
creates one variable and the default variable
name is XBPredicted. Specify a
variable name in parentheses to override the default.
For the multinomial distribution, one variable is created for each
dependent variable category except the last (see the dependent variable ORDER
keyword in the section Variable List (GENLIN command)). XBPRED
saves the predicted values of the linear predictor for the first
25 categories, up to but not including the last, by default. The
default root name is XBPredicted, and the default variable names are XBPredicted_1, XBPredicted_2, and so on, corresponding
to the order of the dependent variable categories. Specify a root
name in parentheses to override the default. Specify a colon and
a positive integer giving the number of categories to override the
default 25. To specify a number without a root name, simply enter
a colon before the number.
XBSTDERROR (varname | rootname:n). Estimated standard error(s) of the predicted
value of the linear predictor. For all distributions except
the multinomial, XBSTDERROR
creates
one variable and the default variable name is XBStandardError. Specify a variable name in parentheses
to override the default.
For the multinomial distribution, one variable is created for each
dependent variable category except the last (see the dependent variable ORDER
keyword in the section Variable List (GENLIN command)). XBSTDERROR
saves the estimated standard errors for the first 25
categories, up to but not including the last, by default. The default
root name is XBStandardError, and
the default variable names are XBStandardError_1, XBStandardError_2, and so on,
corresponding to the order of the dependent variable categories.
Specify a root name in parentheses to override the default. Specify
a colon and a positive integer giving the number of categories to
override the default 25. To specify a number without a root name,
simply enter a colon before the number.
MEANPRED (varname | rootname:n). Predicted value(s) of the mean of the response. For all distributions except the multinomial, MEANPRED
creates one variable and the default variable
name is MeanPredicted. Specify
a variable name in parentheses to override the default.
If the binomial distribution is used and the dependent variable
is in single variable format, then MEANPRED
computes a predicted probability. Suppose the dependent variable
has data values 0 and 1. If the default reference category is in effect,
that is, REFERENCE = LAST
on
the GENLIN
command line, then
1 is the reference category and MEANPRED
computes the predicted probability that the dependent variable equals
0. To compute the predicted probability that the dependent variable
equals 1 instead, specify REFERENCE = FIRST
on the GENLIN
command line.
If the binomial distribution is used and the dependent variable
is in events/trials format, then MEANPRED
computes the predicted number of events.
For the multinomial distribution, one variable is created for each
dependent variable category except the last (see the dependent variable ORDER
keyword in the section Variable List (GENLIN command)). MEANPRED
saves the cumulative predicted probability for the first 25 categories,
up to but not including the last, by default. The default root name
is CumMeanPredicted, and the default
variable names are CumMeanPredicted_1, CumMeanPredicted_2, and so on,
corresponding to the order of the dependent variable categories.
Specify a root name in parentheses to override the default. Specify
a colon and a positive integer giving the number of categories to
override the default 25. To specify a number without a root name,
simply enter a colon before the number.
CIMEANPREDL (varname | rootname:n). Lower bound(s) of the confidence interval
for the mean of the response. For all distributions except
the multinomial, CIMEANPREDL
creates
one variable and the default variable name is CIMeanPredictedLower. Specify a variable name in parentheses
to override the default.
For the multinomial distribution, one variable is created for each
dependent variable category except the last (see the dependent variable ORDER
keyword in the section Variable List (GENLIN command)). CIMEANPREDL
saves the lower bound of the cumulative predicted probability for
the first 25 categories, up to but not including the last, by default.
The default root name is CICumMeanPredictedLower, and the default variable names are CICumMeanPredictedLower_1, CICumMeanPredictedLower_2, and
so on, corresponding to the order of the dependent variable categories.
Specify a root name in parentheses to override the default. Specify
a colon and a positive integer giving the number of categories to
override the default 25. To specify a number without a root name,
simply enter a colon before the number.
CIMEANPREDU (varname | rootname:n). Upper bound(s) of the confidence interval
for the mean of the response. For all distributions except
the multinomial, CIMEANPREDU
creates
one variable and the default variable name is CIMeanPredictedUpper. Specify a variable name in parentheses
to override the default.
For the multinomial distribution, one variable is created for each
dependent variable category except the last (see the dependent variable ORDER
keyword in the section Variable List (GENLIN command)). CIMEANPREDU
saves the upper bound of the cumulative predicted probability for
the first 25 categories, up to but not including the last, by default.
The default root name is CICumMeanPredictedUpper, and the default variable names are CICumMeanPredictedUpper_1, CICumMeanPredictedUpper_2, and
so on, corresponding to the order of the dependent variable categories.
Specify a root name in parentheses to override the default. Specify
a colon and a positive integer giving the number of categories to
override the default 25. To specify a number without a root name,
simply enter a colon before the number.
PREDVAL (varname). Predicted category value for binomial or multinomial
distribution. The class or value predicted by the model
if the binomial or multinomial distribution is in effect. This keyword
is honored only if the binomial distribution is used, that is, if DISTRIBUTION = BINOMIAL
is specified or
implied on the MODEL
subcommand
and the dependent variable is in single variable format, or the multinomial
distribution is used (DISTRIBUTION = MULTINOMIAL
). Otherwise, the PREDVAL
keyword
is ignored with a warning. The default variable name is PredictedValue.
LEVERAGE (varname). Leverage value. The default variable name is Leverage. Leverage values are not available for the multinomial distribution or generalized estimating equations.
RESID (varname). Raw residual. The default variable name is Residual. Raw residuals are not available for the multinomial distribution.
PEARSONRESID (varname). Pearson residual. The default variable name is PearsonResidual. Pearson residuals are not available for the multinomial distribution.
DEVIANCERESID (varname). Deviance residual. The default variable name is DevianceResidual. Deviance residuals are not available for the multinomial distribution or generalized estimating equations.
STDPEARSONRESID (varname). Standardized Pearson residual. The default variable name is StdPearsonResidual. Standardized Pearson residuals are not available for the multinomial distribution or generalized estimating equations.
STDDEVIANCERESID (varname). Standardized deviance residual. The default variable name is StdDevianceResidual. Standardized deviance residuals are not available for the multinomial distribution or generalized estimating equations.
LIKELIHOODRESID (varname). Likelihood residual. The default variable name is LikelihoodResidual. Likelihood residuals are not available for the multinomial distribution or generalized estimating equations.
COOK (varname). Cook's distance. The default variable name is CooksDistance. Cook's distances are not available for the multinomial distribution or generalized estimating equations.