LOGSELECT Procedure

Example 18.4 Ordinal Logistic Regression

(View the complete code for this example.)

Consider a study of the effects of various cheese additives on taste. Researchers tested four cheese additives and obtained 52 response ratings for each additive. Each response was measured on a scale of nine categories ranging from strong dislike (1) to excellent taste (9). The data, given in McCullagh and Nelder (1989, p. 175) in the form of a two-way frequency table of additive by rating, are saved in the data table mylib.Cheese by using the following program. The variable y contains the response rating. The variable Additive specifies the cheese additive (1, 2, 3, or 4). The variable freq gives the frequency with which each additive received each rating.

data mylib.Cheese;
   do Additive = 1 to 4;
      do y = 1 to 9;
         input freq @@;
         output;
      end;
   end;
   label y='Taste Rating';
   datalines;
0  0  1  7  8  8 19  8  1
6  9 12 11  7  6  1  0  0
1  1  6  8 23  7  5  1  0
0  0  0  1  3  7 14 16 11
;

The response variable y is ordinally scaled. A cumulative logit model is used to investigate the effects of the cheese additives on taste. The following statements invoke PROC LOGSELECT to fit this model with y as the response variable and three indicator variables as explanatory variables, with the fourth additive as the reference level. With this parameterization, each Additive parameter compares an additive to the fourth additive.

proc logselect data=mylib.Cheese;
   freq freq;
   class Additive(ref='4') / param=ref;
   model y=Additive;
run;

Results from the logistic analysis are shown in Output 18.4.1 through Output 18.4.3.

The "Response Profile" table in Output 18.4.1 shows that the strong dislike (y=1) end of the rating scale is associated with lower OrderedValue values in the "Response Profile" table; hence the probability of disliking the additives is modeled.

Output 18.4.1: Proportional Odds Model Regression Analysis

The LOGSELECT Procedure

Model Information
Data SourceCHEESE
Response Variabley
Number of Response Levels9
Frequency Variablefreq
DistributionMultinomial
Link TypeCumulative
Link FunctionLogit
Optimization TechniqueNewton-Raphson with Ridging

Number of Observations Read36
Number of Observations Used28
Sum of Frequencies Read208
Sum of Frequencies Used208

Response Profile
Ordered
Value
yTotal
Frequency
117
2210
3319
4427
5541
6628
7739
8825
9912

Probabilities modeled are cumulated over the lower Ordered Values.


Class Level Information
ClassLevelsValues
Additive41 2 3 4


Output 18.4.2: Proportional Odds Model Regression Analysis

Convergence criterion (GCONV=1E-8) satisfied.

Dimensions
Columns in Design11
Number of Effects2
Max Effect Columns8
Rank of Design11
Parameters in Optimization11

Testing Global Null Hypothesis: BETA=0
TestDFChi-SquarePr > ChiSq
Likelihood Ratio3148.4539<.0001

Fit Statistics
-2 Log Likelihood711.34790
AIC (smaller is better)733.34790
AICC (smaller is better)734.69484
SBC (smaller is better)770.06082


The positive value (1.6128) for the parameter estimate for Additive=1 in Output 18.4.3 indicates a tendency toward the lower-numbered categories of the first cheese additive relative to the fourth. In other words, the fourth additive tastes better than the first additive. Similarly, the second and third additives are both less favorable than the fourth additive. The relative magnitudes of these slope estimates imply the preference ordering: fourth, first, third, second.

Output 18.4.3: Proportional Odds Model Regression Analysis

Parameter Estimates
ParameteryDFEstimateStandard
Error
Chi-SquarePr > ChiSq
Intercept11-7.0801660.564010157.5844<.0001
Intercept21-6.0249800.476431159.9230<.0001
Intercept31-4.9254160.425651133.8992<.0001
Intercept41-3.8568010.38802298.7968<.0001
Intercept51-2.5205520.34526853.2940<.0001
Intercept61-1.5685380.31220825.2408<.0001
Intercept71-0.0668750.2738190.05960.8071
Intercept811.4929740.33569619.7794<.0001
Additive 1 11.6127910.38054417.9617<.0001
Additive 2 14.9646400.476721108.4546<.0001
Additive 3 13.3226830.42183062.0444<.0001


Multinomial-Trial Syntax for Grouped Data

These data can be grouped according to the value of the Additive variable in the following DATA step:

data mylib.Cheese;
   do Additive = 1 to 4;
      input y1-y9;
      output;
   end;
   datalines;
0  0  1  7  8  8 19  8  1
6  9 12 11  7  6  1  0  0
1  1  6  8 23  7  5  1  0
0  0  0  1  3  7 14 16 11
;

The analysis proceeds as before with multinomial-trial syntax:

proc logselect data=mylib.Cheese;
   class Additive(ref='4') / param=ref;
   model y1-y9=Additive;
run;

Parameter estimates and tests are the same as for the preceding analysis and are not displayed here. The tables displayed in Output 18.4.4 and Output 18.4.5 are different from those produced by the preceding analysis: the "Model Information" and "Response Profile" tables include the nine response variables, there are only four observations in the data, and the fit statistics are modified by the inclusion of the constant term in the log likelihood.

Output 18.4.4: Information Tables with Multinomial-Trial Syntax

The LOGSELECT Procedure

Model Information
Data SourceCHEESE
Response Variabley1
Response Variabley2
Response Variabley3
Response Variabley4
Response Variabley5
Response Variabley6
Response Variabley7
Response Variabley8
Response Variabley9
Number of Response Levels9
DistributionMultinomial
Link TypeCumulative
Link FunctionLogit
Optimization TechniqueNewton-Raphson with Ridging

Number of Observations Read4
Number of Observations Used4

Response Profile
Ordered
Value
ResponseTotal
Frequency
1y17
2y210
3y319
4y427
5y541
6y628
7y739
8y825
9y912

Probabilities modeled are cumulated over the lower Ordered Values.



Output 18.4.5: Fit Statistics with Multinomial-Trial Syntax

Fit Statistics
-2 Log Likelihood95.33994
AIC (smaller is better)117.33994
AICC (smaller is better)118.68687
SBC (smaller is better)154.05285


Last updated: June 22, 2026