The LOGSELECT Procedure

PROC LOGSELECT Statement

  • PROC LOGSELECT <options>;

The PROC LOGSELECT statement invokes the procedure. Table 1 summarizes the available options in the PROC LOGSELECT statement by function.

Table 1: PROC LOGSELECT Statement Options

Option Description
ALPHA= Specifies a global significance level
BINEPS= Specifies the precision for computing association and classification statistics
DATA= Specifies the CAS input data table
INPARMEST= Specifies starting values for the optimization
MAXRESPONSELEVELS= Specifies the maximum number of response levels allowed when you have a polytomous response variable
PAGEOBS= Specifies the maximum number of observations to be computed in each batch
USELASTITER Continues computations when the optimization fails
Output Options
ASSOCIATION Displays association statistics
CORRB Displays the "Parameter Estimates Correlation Matrix" table
COVB Displays the "Parameter Estimates Covariance Matrix" table
CTABLE Requests classification (ROC) statistics
ITHIST Displays the "Iteration History" table
LACKFIT Requests the Hosmer-Lemeshow goodness-of-fit test
NOCHECK Disables checking for infinite parameters
NOCLPRINT Limits or suppresses the display of class levels
NOSTDERR Suppresses computation of the covariance matrix and standard errors
PARTFIT Displays the fit statistics that are produced when your data are partitioned
STB Displays standardized estimates
Optimization Options
ABSCONV= Tunes the absolute function convergence criterion
ABSFCONV= Tunes the absolute function difference convergence criterion
ABSGCONV= Tunes the absolute gradient convergence criterion
ABSXCONV= Tunes the absolute parameter convergence criterion
FCONV= Tunes the relative function difference convergence criterion
FCONV2= Tunes the second relative function difference convergence criterion
GCONV= Tunes the relative gradient convergence criterion
GCONV2= Tunes the second relative gradient convergence criterion
XCONV= Tunes the relative gradient convergence criterion
MAXFUNC= Specifies the maximum number of function evaluations in any optimization
MAXITER= Specifies the maximum number of iterations in any optimization
MAXTIME= Specifies the upper limit of CPU time (in seconds) for any optimization
MINITER= Specifies the minimum number of iterations in any optimization
NORMALIZE= Specifies whether the objective function is normalized during optimization
TECHNIQUE= Selects the optimization technique
LASSO Options
LASSORHO= Specifies the base regularization parameter for the LASSO method
LASSOSTEPS= Specifies the maximum number of steps for the LASSO method
LASSOTOL= Specifies the convergence criterion for the LASSO method


The optimization options are fully described in the section Optimization Options in Chapter 2, Shared Concepts. The following list describes the other options available in the PROC LOGSELECT statement:

ALPHA=number

specifies a global significance level for the construction of confidence intervals. The confidence level is 1–number. The value of number must be between 0 and 1. You can override the global specification by specifying the ALPHA= option in the OUTPUT statement. By default, ALPHA=0.05.

ASSOCIATION

displays measures of association between predicted probabilities and observed responses for binary, binomial, and ordinal response models. These measures assess the predictive ability of the model. The displayed statistics are the concordance index c (the area under the ROC curve, AUC), Somers’ D statistic (Gini’s coefficient), the Goodman-Kruskal gamma statistic, and Kendall’s tau-a statistic. These statistics are based on the number of pairs of observations that have different response values, the number of concordant pairs, and the number of discordant pairs. For more information, see the section Association Statistics.

BINEPS=number

specifies the precision to use for the association, classification, and LACKFIT option computations. The predicted probabilities or scores are rounded to the nearest multiple of number, which effectively bins and sorts the observations. You can specify a number between 0 and 1; if number does not evenly divide the unit interval, then it is reduced to a valid value. By default, BINEPS=1e–5. For more information, see the section Classification Table and ROC Curves.

CORRB

creates the "Parameter Estimates Correlation Matrix" table. The correlation matrix is computed by normalizing the covariance matrix bold upper Sigma. That is, if sigma Subscript i j is an element of bold upper Sigma, then the corresponding element of the correlation matrix is sigma Subscript i j Baseline slash sigma Subscript i Baseline sigma Subscript j, where sigma Subscript i Baseline equals StartRoot sigma Subscript i i Baseline EndRoot.

COVB

creates the "Parameter Estimates Covariance Matrix" table. The covariance matrix is computed as the inverse of the negative of the matrix of second derivatives of the log-likelihood function with respect to the model parameters (the Hessian matrix).

CTABLE<(options)>

displays a table for binary or binomial response models that, for a set of probabilities or cutpoints, contains the frequencies of observations that are correctly and incorrectly classified as events and nonevents, and optionally the sensitivity, the 1–specificity, the positive and negative predictive values, the correct classification rate, the error rate, and the lift.

Because the number of cutpoints that are generated from your data can be very large, you can write the classification table to an output data table, or you can specify your own list of cutpoints.

If you specify the PRIOR= option, then the reported predicted probabilities are unchanged, but the statistics that are specified by the keywords PPV, NPV, PC, ACCURACY, MISCLASS, and LIFT are modified.

If you specify a PARTITION statement, then a table is created for each role. If you do not specify the PRIOR= option, then the training proportions are used as the prevalences for computing the statistics that are specified by the keywords PPV, NPV, PC, ACCURACY, MISCLASS, and LIFT for the validation and test data.

You can specify the following options. For more information, see the section Classification Table and ROC Curves.

ALL

requests all the statistics that are listed in Table 2.

CUTPT=number-list

specifies cutpoints to include in the classification table.

NOCOUNTS

suppresses the classification table columns that contain the number of true positives, the number of true negatives, the number of false positives, and the number of false negatives.

OUT=CAS-libref.data-table

suppresses the display of the classification table and names the output data table in which to store the classification table. CAS-libref.data-table is a two-level name, where CAS-libref refers to the caslib and session identifier, and data-table specifies the name of the output data table. For more information about this two-level name, see the DATA= option and the section Using CAS Sessions and CAS Engine Librefs.

keyword <=name>

specifies statistics to include in the classification table and optionally names the statistics. If you do not provide a name, the LOGSELECT procedure uses the keyword as the name. Table 2 lists the available keywords.

Table 2: CTABLE Option Keywords

Keyword Description
ACCURACY Requests and names the accuracy
FNF Requests and names the false negative fraction
FPF Requests and names the false positive fraction. Also called 1–specificity.
LIFT Requests and names the lift
MISCLASS Requests and names the misclassification rate. Also called the error rate.
NPV Requests and names the negative predictive value
PC Requests and names the proportion classified correctly
PPV Requests and names the positive predictive value. Also called the precision.
TNF Requests and names the true negative fraction. Also called the specificity.
TPF Requests and names the true positive fraction. Also called the sensitivity or recall.


DATA=CAS-libref.data-table

names the input data table for PROC LOGSELECT to use. The default is the most recently created data table. CAS-libref.data-table is a two-level name, where

CAS-libref

refers to a collection of information that is defined in the LIBNAME statement and includes the caslib, which includes a path to the data, and a session identifier, which defaults to the active session but which can be explicitly defined in the LIBNAME statement. For more information about CAS-libref, see the section Using CAS Sessions and CAS Engine Librefs.

data-table

specifies the name of the input data table.

INPARMEST=CAS-libref.data-table

names an input data table that contains starting values. CAS-libref.data-table is a two-level name, where CAS-libref refers to the caslib and session identifier, and data-table specifies the name of the output data table. For more information about this two-level name, see the DATA= option and the section Using CAS Sessions and CAS Engine Librefs.

The input data table must contain an Estimate column and a ParmName column, and it can optionally contain your BY variables. You can create a version of this table by using an ODS OUTPUT statement to produce the "Parameter Estimates" table from a PROC LOGSELECT program. For example:

ods output parameterestimates=pe;

You can then modify the parameter estimates in this table and read them back in by using the following statement:

proc logselect inparmest=pe;
ITHIST

generates the "Iteration History" table.

LACKFIT<(options)>

performs the Hosmer-Lemeshow goodness-of-fit test for binary and polytomous response models (Hosmer and Lemeshow 2000; Fagerland, Hosmer, and Bofin 2008; Fagerland and Hosmer 2013, 2016). The subjects are divided into at most G groups of approximately the same size. You can specify G as any integer greater than or equal to 5; by default, G = 10. The discrepancies between the observed and expected numbers of observations in these groups are summarized by the Pearson chi-square statistic, which is then compared to a chi-square distribution. The number of degrees of freedom that PROC LOGSELECT uses for this test depends on the specified model; you can override this number by specifying a nonnegative integer, df, and by modifying the reduction, r. A small p-value suggests that the fitted model is not an adequate model. For more information, see the section The Hosmer-Lemeshow Goodness-of-Fit Test.

The following options are available:

CUTPT=value-list

specifies a list of cut points for grouping the subjects.

DF=df

specifies the number of degrees of freedom of the test, where df greater-than-or-equal-to 1. By default, df = Gr.

DFREDUCE=r

specifies the reduction in degrees of freedom. This option is ignored when you specify the DF= option. By default, DFREDUCE=2.

NGROUPS=G

specifies the number of groups in which to divide the subjects. You can specify G greater-than-or-equal-to 5. By default, NGROUPS=10.

NONCENTRALITY=value

requests that a noncentral chi-square test be performed, where value is the noncentrality parameter.

POWERADJ

for binary response data, chooses the number of groups G to maintain the same power as grouping 1,000 observations into 10 groups (Paul, Pennell, and Lemeshow 2013). If you have fewer than 1,000 observations, then G = 10 groups are used. If you have 1,000 to 25,000 observations, then the number of groups that are formed is

where n equals n Subscript e Baseline plus n Subscript n is the number of observations, n Subscript e is the number of events, and n Subscript n is the number of nonevents. If you have more than 25,000 observations, then this option is ignored.

LASSORHO=r

specifies the base regularization parameter for the LASSO model selection method. The regularization parameter for step i is rSuperscript i. By default, LASSORHO=0.8.

LASSOSTEPS=n

specifies the maximum number of steps for LASSO model selection. By default, LASSOSTEPS=20.

LASSOTOL=r

specifies the convergence tolerance for the optimization algorithm that solves for the LASSO parameter estimates at each step of LASSO model selection. By default, LASSOTOL=1E–6.

MAXRESPONSELEVELS=value

specifies the maximum number of response levels that are allowed when you have a polytomous response variable. By default, MAXRESPONSELEVELS=100.

NOCHECK

disables the checking process that determines whether maximum likelihood estimates of the regression parameters exist. For more information, see the section Existence of Maximum Likelihood Estimates.

NOCLPRINT<=number>

suppresses the display of the "Class Level Information" table if you do not specify number. If you specify number, the values of the classification variables are displayed for only those variables whose number of levels is less than number. Specifying number helps to reduce the size of the "Class Level Information" table if some classification variables have a large number of levels.

NOSTDERR

suppresses computation of the covariance matrix and the standard errors of the regression coefficients. When the model contains many variables (thousands), the inversion of the Hessian matrix to derive the covariance matrix and the standard errors of the regression coefficients can be time-consuming. The CORRB, COVB, and TYPE3 options are not available when the NOSTDERR option is specified. This option also disables the quasi-complete separation check; for more information, see the section Existence of Maximum Likelihood Estimates.

PAGEOBS=number | AUTO
MAXOPTBATCH=number | AUTO

specifies the maximum number of observations to be included in a batch. During the optimization, the LOGSELECT procedure reads at most number observations from the data table into memory, performs the appropriate log-likelihood, gradient, and Hessian computations on that batch of observations, then discards those observations and reads in the next batch of data for processing. Generally, a smaller number decreases memory usage but might lead to longer computation times, whereas a larger number might lead to shorter computation times but increases memory usage. The default PAGEOBS=AUTO option determines whether the entire data table can be conveniently held in memory; if it cannot, then number is set to 256. For more information, see the section Memory Usage.

PARTFIT

displays fit statistics in the "Fit Statistics" table that are usually produced when your data are partitioned. This option is not required when you specify a PARTITION statement.

The additional statistics include the R-square, the adjusted R-square, McFadden’s R-square, the average square error (Brier score), the misclassification rate, the null-model log likelihood, and the difference in means.

STB

displays the standardized estimates of the parameters in the "Parameter Estimates" table. The standardized estimate of beta Subscript i is given by ModifyingAbove beta With caret Subscript i Baseline slash left-parenthesis s slash s Subscript i Baseline right-parenthesis, where s Subscript i is the total sample standard deviation for the ith explanatory variable and

The sample standard deviations for parameters that are associated with CLASS variables are computed using their codings. The standardized estimates are not computed for the intercept parameters.

USELASTITER

continues to perform computations by using the last iteration of the optimization when the optimization fails. By default, computations cease when a failure occurs.

Last updated: November 05, 2020