This documentation is for a version of the software that is not covered by Standard Support. Select a different version from the version selector in the banner, or access the latest documentation.
The MODEL statement defines the statistical model in terms of a response variable (the target) or an events/trials specification, model effects that are constructed from variables in the input data table, and model-options. An intercept is included in the model by default. You can remove the intercept by specifying the NOINT option.
You can specify a single response variable that contains your response values. When you have binomial data, you can specify the events/trials form of the response, where one variable contains the number of positive responses (or events) and another variable contains the number of trials. Note that the values of both events and (trials – events) must be nonnegative and the value of trials must be positive.
There are two sets of options in the MODEL statement. The response-options determine how the LOGSELECT procedure models probabilities for binary and multinomial data. The model-options control other aspects of model formation and inference. Table 6 summarizes these options.
Response variable options determine how the LOGSELECT procedure models probabilities for binary and multinomial response data. You can specify the following response-options by enclosing them in parentheses after the response or trials variable.
DESCENDING
DESC
reverses the order of the response categories.
If you specify both the DESCENDING and ORDER= options, PROC LOGSELECT orders the response categories according to the ORDER= option and then reverses that order.
EVENT='category' | FIRST | LAST
specifies the event category for the binary response model. PROC LOGSELECT models the probability of the event category. The EVENT= option has no effect when there are more than two response categories.
You can specify one of the following:
'category'
specifies the value (formatted, if a format is applied) of the event category in quotation marks.
FIRST
designates the first ordered category as the event.
LAST
designates the last ordered category as the event.
By default, EVENT=FIRST.
For example, the following statements specify that observations with the formatted value '1' represent events in the data. The probability that the LOGSELECT procedure models is thus the probability that the variable def takes on the (formatted) value '1'.
proc logselectdata=mycas.MyData;class A B C;
model def(event ='1')= A B C x1 x2 x3;run;
ORDER=FORMATTED | FREQ | INTERNAL
specifies the sort order for the levels of the response variable. When ORDER=FORMATTED (the default) for numeric variables for which you have supplied no explicit format (that is, for which there is no corresponding FORMAT statement in the current PROC LOGSELECT run or in the DATA step that created the data table), the levels are ordered by their internal (numeric) value. The following table shows how the ORDER= option is interpreted:
ORDER=
Levels Sorted By
FORMATTED
External formatted value, except for numeric variables with no explicit format, which are sorted by their unformatted (internal) value; the sort order is machine-dependent.
FREQ
Descending frequency count (levels with the most observations come first in the order)
INTERNAL
Unformatted value; the sort order is machine-dependent.
specifies the reference category for the generalized logit model and the binary response model. For the generalized logit model, each logit contrasts a nonreference category with the reference category. For the binary response model, specifying one response category as the reference is the same as specifying the other response category as the event. You can specify one of the following:
'category'
specifies the value (formatted, if a format is applied) of the reference category in quotation marks.
FIRST
designates the first ordered category as the reference.
LAST
designates the last ordered category as the reference.
By default, REF=LAST.
Model Options
CENTER
requests that continuous main effects be centered and scaled internally. (Continuous main effects are centered and scaled to aid in computing maximum likelihood estimates.) Parameter estimates and related statistics are always reported on the original scale.
CENTERLASSO
requests that all effects, including categorical effects, be centered and scaled internally. (Effects are centered and scaled to aid in model selection by the LASSO method.) Parameter estimates and related statistics are always reported on the original scale.
CLB
constructs confidence limits for each of the parameter estimates. The confidence level is 0.95 by default; you can change it by specifying the ALPHA= option.
forces effects to be included in all models. If you specify INCLUDE=n, then the first n effects that are listed in the MODEL statement are included in all models. If you specify INCLUDE=single-effect or if you specify INCLUDE=(effect-list), then the specified effects are forced into all models. The effects that you specify in this option must be explanatory effects that are specified in the MODEL statement before the slash (/).
INFORMATIVE
models missing values by using extra model effects. These effects consist of dummy variables that take the value 1 when the value of a continuous model variable involved in the effect is missing, and take the value 0 otherwise. The missing value in the original model effect is replaced by the average value of the effect for the nonmissing values. For continuous-by-class effects, such as A*x, where A is a classification variable and x is a continuous variable, informative missingness creates multiple dummy columns and substitutes the effect mean of x that corresponds to the respective level of A. Missing values for classification variables are treated as valid levels. For more information about informative missingness, see the section Informative Missingness in Chapter 2, Shared Concepts.
LINK=keyword
specifies the link function for the model. The default link is the logit. The keywords and the associated link functions are shown in Table 7.
Table 7: Built-In Link Functions of the LOGSELECT Procedure
Keyword
Link Function
CLOGLOG | CLL
Complementary log-log
GLOGIT
Generalized logit
LOGIT
Logit
LOGLOG
Log-log
PROBIT
Probit
For the probit and cumulative probit links, denotes the quantile function of the standard normal distribution.
If the response variable has more than two categories, the LOGSELECT procedure fits a model that has a cumulative link function that is based on the specified link. However, if you specify LINK=GLOGIT, the procedure assumes a generalized logit model for nominal (unordered) data.
NOINT
requests that no intercept be included in the model. An intercept is included by default. The NOINT option is not available for multinomial models.
OFFSET=variable
specifies a variable to be used as an offset to the linear predictor. An offset plays the role of an effect whose coefficient is known to be 1. The offset variable cannot appear in the CLASS statement or elsewhere in the MODEL statement. Observations that have missing values for the offset variable are excluded from the analysis.
PRIOR=number | number-list
specifies prior probabilities (prevalences) that are used for computing posterior predicted probabilities. When you know what percentage of the population has a rare event and you oversample that rare event, specifying the prior probabilities as the prevalence of events in your population enables you to produce posterior probabilities that reflect the population, not the data. The priors do not affect the model-fitting process.
If you specify a number-list that has the same number of entries as there are response levels, then these values are scaled to sum to 1. If you specify a number-list that has one entry less than there are response levels, then the specified values should sum to less than 1, and the last response level is assigned the remaining value. For binary and binomial response models, you can thus specify the probability of an event as a single number. The scaled priors are displayed in the ResponseProfile table.
If your response Y takes values that have observed empirical training probabilities , you specify priors , and your model predicted probabilities are , then the posterior predicted probabilities are computed as
The POST= option in the OUTPUT statement writes the posterior to the output data set. If your priors are identical to the empirical probabilities, then the posteriors are identical to the model-predicted probabilities.
The priors adjust the "Classification" table statistics PPV, NPV, adequacy, percentage correct, misclassification rate, and lift as discussed in the section Classification Table and ROC Curves. If you specify a PARTITION statement, then the posterior probabilities and the preceding statistics for the validation and test data also use the specified priors.
START=n
START=single-effect
START=(effects)
begins the selection process from the designated initial model for the forward and stepwise selection methods. If you specify START=n, then the starting model includes the first n effects that are listed in the MODEL statement. If you specify START=single-effect or if you specify START=(effects), then the starting model includes those specified effects. The effects that you specify in the START= option must be explanatory effects that are specified in the MODEL statement before the slash (/). This option is not available when you specify METHOD=BACKWARD in the SELECTION statement.
TYPE3
requests that Wald statistics for Type 3 contrasts be computed for each effect that is specified in the MODEL statement. For more information, see the section Joint Tests and Type 3 Tests.