The LOGISTIC Procedure

Example 73.3 Ordinal Logistic Regression

(View the complete code for this example.)

Consider a study of the effects on taste of various cheese additives. 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 set 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 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 LOGISTIC 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. The COVB option displays the estimated covariance matrix, and the NOODDSRATIO option suppresses the default odds ratio table. The ODDSRATIO statement computes odds ratios for all combinations of the Additive levels. The PLOTS option produces a graphical display of the odds ratios, and the EFFECTPLOT statement displays the predicted probabilities.

ods graphics on;
proc logistic data=Cheese plots(only)=oddsratio(range=clip);
   freq freq;
   class Additive (param=ref ref='4');
   model y=Additive / covb nooddsratio;
   oddsratio Additive;
   effectplot / polybar;
   title 'Multiple Response Cheese Tasting Experiment';
run;

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

The score chi-square for testing the proportional odds assumption is 17.287, which is not significant with respect to a chi-square distribution with 21 degrees of freedom . This indicates that the proportional odds assumption is reasonable. The positive value (1.6128) for the parameter estimate for Additive1 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. 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 73.3.1: Proportional Odds Model Regression Analysis

Multiple Response Cheese Tasting Experiment

The LOGISTIC Procedure

Model Information
Data SetWORK.CHEESE 
Response VariableyTaste Rating
Number of Response Levels9 
Frequency Variablefreq 
Modelcumulative logit 
Optimization TechniqueFisher's scoring 

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.



Note:8 observations having nonpositive frequencies or weights were excluded since they do not contribute to the analysis.

Class Level Information
ClassValueDesign Variables
Additive1100
 2010
 3001
 4000

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

Score Test for the Proportional
Odds Assumption
Chi-SquareDFPr > ChiSq
17.2866210.6936

Model Fit Statistics
CriterionIntercept OnlyIntercept and
Covariates
AIC875.802733.348
SC902.502770.061
-2 Log L859.802711.348

Testing Global Null Hypothesis: BETA=0
TestChi-SquareDFPr > ChiSq
Likelihood Ratio148.45393<.0001
Score111.26703<.0001
Wald115.15043<.0001

Type 3 Analysis of Effects
EffectDFWald
Chi-Square
Pr > ChiSq
Additive3115.1504<.0001

Analysis of Maximum Likelihood Estimates
Parameter DFEstimateStandard
Error
Wald
Chi-Square
Pr > ChiSq
Intercept11-7.08010.5624158.4851<.0001
Intercept21-6.02490.4755160.5500<.0001
Intercept31-4.92540.4272132.9484<.0001
Intercept41-3.85680.390297.7087<.0001
Intercept51-2.52050.343153.9704<.0001
Intercept61-1.56850.308625.8374<.0001
Intercept71-0.06690.26580.06330.8013
Intercept811.49300.331020.3439<.0001
Additive111.61280.377818.2265<.0001
Additive214.96450.4741109.6427<.0001
Additive313.32270.425161.0931<.0001

Association of Predicted Probabilities and
Observed Responses
Percent Concordant67.6Somers' D0.578
Percent Discordant9.8Gamma0.746
Percent Tied22.6Tau-a0.500
Pairs18635c0.789


The odds ratio results in Output 73.3.2 show the preferences more clearly. For example, the "Additive 1 vs 4" odds ratio says that the first additive has 5.017 times the odds of receiving a lower score than the fourth additive; that is, the first additive is 5.017 times more likely than the fourth additive to receive a lower score. Output 73.3.3 displays the odds ratios graphically; the range of the confidence limits is truncated by the RANGE=CLIP option, so you can see that "1" is not contained in any of the intervals.

Output 73.3.2: Odds Ratios of All Pairs of Additive Levels

Odds Ratio Estimates and Wald Confidence Intervals
Odds RatioEstimate95% Confidence Limits
Additive 1 vs 20.0350.0150.080
Additive 1 vs 30.1810.0870.376
Additive 1 vs 45.0172.39310.520
Additive 2 vs 35.1652.48210.746
Additive 2 vs 4143.24156.558362.777
Additive 3 vs 427.73412.05563.805


Output 73.3.3: Plot of Odds Ratios for Additive

Plot of Odds Ratios for Additive


The estimated covariance matrix of the parameters is displayed in Output 73.3.4.

Output 73.3.4: Estimated Covariance Matrix

Estimated Covariance Matrix
ParameterIntercept_1Intercept_2Intercept_3Intercept_4Intercept_5Intercept_6Intercept_7Intercept_8Additive1Additive2Additive3
Intercept_10.3162910.2195810.1762780.1476940.1140240.0910850.0578140.041304-0.09419-0.18686-0.13565
Intercept_20.2195810.2260950.1778060.1479330.114030.0910810.0578130.041304-0.09421-0.18161-0.13569
Intercept_30.1762780.1778060.1824730.1488440.1140920.0910740.0578070.0413-0.09427-0.1687-0.1352
Intercept_40.1476940.1479330.1488440.1522350.1145120.0911090.057780.041277-0.09428-0.14717-0.13118
Intercept_50.1140240.114030.1140920.1145120.1177130.0918210.0577210.041162-0.09246-0.11415-0.11207
Intercept_60.0910850.0910810.0910740.0911090.0918210.095220.0583120.041324-0.08521-0.09113-0.09122
Intercept_70.0578140.0578130.0578070.057780.0577210.0583120.070640.04878-0.06041-0.05781-0.05802
Intercept_80.0413040.0413040.04130.0412770.0411620.0413240.048780.109562-0.04436-0.0413-0.04143
Additive1-0.09419-0.09421-0.09427-0.09428-0.09246-0.08521-0.06041-0.044360.1427150.0940720.092128
Additive2-0.18686-0.18161-0.1687-0.14717-0.11415-0.09113-0.05781-0.04130.0940720.224790.132877
Additive3-0.13565-0.13569-0.1352-0.13118-0.11207-0.09122-0.05802-0.041430.0921280.1328770.180709


Output 73.3.5 displays the probability of each taste rating y within each additive. You can see that Additive=1 mostly receives ratings of 5 to 7, Additive=2 mostly receives ratings of 2 to 5, Additive=3 mostly receives ratings of 4 to 6, and Additive=4 mostly receives ratings of 7 to 9, which also confirms the previously discussed preference orderings.

Output 73.3.5: Model-Predicted Probabilities

Model-Predicted Probabilities


Alternatively, you can use an adjacent-category logit model. The following statements invoke PROC LOGISTIC to fit this model:

proc logistic data=Cheese
   plots(only)=effect(x=y sliceby=additive connect yrange=(0,0.4));
   freq freq;
   class Additive (param=ref ref='4');
   model y=Additive / nooddsratio link=alogit;
   oddsratio Additive;
   title 'Multiple Response Cheese Tasting Experiment';
run;

You can see that the parameter estimates for the intercepts in Output 73.3.6 are no longer strictly increasing, as they are for the cumulative model in Output 73.3.1.

Output 73.3.6: Adjacent-Category Logistic Regression Analysis

Multiple Response Cheese Tasting Experiment

The LOGISTIC Procedure

Analysis of Maximum Likelihood Estimates
Parameter DFEstimateStandard
Error
Wald
Chi-Square
Pr > ChiSq
Intercept11-2.22620.554216.1350<.0001
Intercept21-2.42380.462027.5216<.0001
Intercept31-1.98520.380027.2909<.0001
Intercept41-1.81640.329430.4096<.0001
Intercept51-0.69080.30974.97370.0257
Intercept61-1.04330.284113.49020.0002
Intercept710.03220.26670.01460.9040
Intercept810.51600.35272.14020.1435
Additive110.71720.178316.1776<.0001
Additive211.98380.246364.8748<.0001
Additive311.38260.212242.4478<.0001


The odds ratio results in Output 73.3.7 show the same preferences that you obtain from the proportional odds model. Output 73.3.8 displays the probability of each additive according to the taste rating.

Output 73.3.7: Odds Ratios of All Pairs of Additive Levels

Odds Ratio Estimates and Wald Confidence Intervals
Odds RatioEstimate95% Confidence Limits
Additive 1 vs 20.2820.1920.414
Additive 1 vs 30.5140.3770.700
Additive 1 vs 42.0491.4442.906
Additive 2 vs 31.8241.3552.456
Additive 2 vs 47.2714.48711.782
Additive 3 vs 43.9852.6296.040


Output 73.3.8: Model-Predicted Probabilities

Model-Predicted Probabilities