/* This is an example taken from McCullagh and Helder (1989, p. 175).
The SAS/STAT User's Guide, Volume 2, Version 6, fourth edition,
p. 1099 uses it as a "Multiple-Response Cheese Tasting Experiment."
Here we are going to use ordered probit and logit to analyze the
data. This experiment was concerned with the effect on taste
of four cheese additives. The nine response categories range
from strong dislike (1) to excellent taste (9). Let Y be the
response variable that takes on values ranging from 1 to 9.
We will create four dummy variables, DUM1, DUM2, DUM3, and DUM4
That represent the four different cheese additives. */
data cheese;
input rating additive;
if additive = 1 then dum1=1;
else dum1=0;
if additive = 2 then dum2=1;
else dum2=0;
if additive = 3 then dum3=1;
else dum3=0;
if additive = 4 then dum4=1;
else dum4=0;
datalines;
3 1
4 1
4 1
4 1
4 1
4 1
4 1
4 1
5 1
5 1
5 1
5 1
5 1
5 1
5 1
5 1
6 1
6 1
6 1
6 1
6 1
6 1
6 1
6 1
7 1
7 1
7 1
7 1
7 1
7 1
7 1
7 1
7 1
7 1
7 1
7 1
7 1
7 1
7 1
7 1
7 1
7 1
7 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
8 1
9 1
1 2
1 2
1 2
1 2
1 2
1 2
2 2
2 2
2 2
2 2
2 2
2 2
2 2
2 2
2 2
3 2
3 2
3 2
3 2
3 2
3 2
3 2
3 2
3 2
3 2
3 2
3 2
4 2
4 2
4 2
4 2
4 2
4 2
4 2
4 2
4 2
4 2
4 2
5 2
5 2
5 2
5 2
5 2
5 2
5 2
6 2
6 2
6 2
6 2
6 2
6 2
7 2
1 3
2 3
3 3
3 3
3 3
3 3
3 3
3 3
4 3
4 3
4 3
4 3
4 3
4 3
4 3
4 3
5 3
5 3
5 3
5 3
5 3
5 3
5 3
5 3
5 3
5 3
5 3
5 3
5 3
5 3
5 3
5 3
5 3
5 3
5 3
5 3
5 3
5 3
5 3
6 3
6 3
6 3
6 3
6 3
6 3
6 3
7 3
7 3
7 3
7 3
7 3
8 3
4 4
5 4
5 4
5 4
6 4
6 4
6 4
6 4
6 4
6 4
6 4
7 4
7 4
7 4
7 4
7 4
7 4
7 4
7 4
7 4
7 4
7 4
7 4
7 4
7 4
8 4
8 4
8 4
8 4
8 4
8 4
8 4
8 4
8 4
8 4
8 4
8 4
8 4
8 4
8 4
8 4
9 4
9 4
9 4
9 4
9 4
9 4
9 4
9 4
9 4
9 4
9 4
;
/* Here we fit an ordered multinomial probit model to the data. */
proc logistic data=cheese;
model rating = dum1 dum2 dum3/link=normit;
output out=result pred=pred;
/* Here we print out the probabilities of each classification by
observation using the ordered multinomial probit model above. */
proc print data=result;
/* Here we fit an ordered multinomial logit model to the data. */
proc logistic data=cheese;
model rating = dum1 dum2 dum3/link=logit;
output out=result pred=pred;
/* Here we print out the probabilities of each classification by
observation using the ordered multinomial logit model above. */
proc print data=result;
run;
/* According to the summary of the analysis in the SAS/STAT User's
Guide, the preference ordering among the additives should be:
fourth, first, third, and, last, second. The way to determine
this is to look at the estimated cdf's of the taste ranks by
cheese additive. The cheese additives that are preferred should
have more of the probability mass concentrated in the higher
ranks, say, rank > 5. Also one can look at the signs and relative
magnitudes of the coefficients associated with the additives and
guage which additives have a greater tendency toward the lower
(worse) rankings. For example, consider the ordered logit results.
The coefficient on additive one (relative to additive four) is
1.6128. This indicates that relative to additive four, additive
one has a greater tendency toward the lower ratings (worse),i.e.,
for example, Pr(y=1) is greater for additive one than for additive
four. The coefficient for additive two is 4.9645 while the
coefficient for additive 3 is 3.3227. Thus, additive four appears
to be preferred with additive one being next followed by additive
three and then additive four. Looking at the coefficients from
the ordered probit analysis we get the same ranking.
When looking at Pr(Y>5) as a ranking criterion, we get slightly
disparate results. By the ordered probit model we have additive
four is best, followed by additives additive one, three, and
two in that order. When considering the ordered logit model,
we have the previously mentioned ordering of additives four,
one, three, and two in that order. */