Example 22.1: Linear Response Function, r=2 Responses
In an example from Ries and Smith (1963), the choice of
detergent brand (Brand= M or X) is related
to three other categorical variables: the softness of the
laundry water (Softness= soft, medium, or hard), the
temperature of the water (Temperature= high or low),
and whether the subject was a previous user of brand M
(Previous= yes or no).
The linear response function, which could also be specified
as RESPONSE MARGINALS, yields one probability,
Pr(brand preference=M), as the response function to be analyzed.
Two models are fit in this example: the first model is a
saturated one, containing all of the main effects and interactions,
while the second is a reduced model containing only the main effects.
The following statements produce Output 22.1.1 through Output 22.1.4:
title 'Detergent Preference Study';
data detergent;
input Softness $ Brand $ Previous $ Temperature $ Count @@;
datalines;
soft X yes high 19 soft X yes low 57
soft X no high 29 soft X no low 63
soft M yes high 29 soft M yes low 49
soft M no high 27 soft M no low 53
med X yes high 23 med X yes low 47
med X no high 33 med X no low 66
med M yes high 47 med M yes low 55
med M no high 23 med M no low 50
hard X yes high 24 hard X yes low 37
hard X no high 42 hard X no low 68
hard M yes high 43 hard M yes low 52
hard M no high 30 hard M no low 42
;
proc catmod data=detergent;
response 1 0;
weight Count;
model Brand=Softness|Previous|Temperature
/ freq prob nodesign;
title2 'Saturated Model';
run;
Output 22.1.1: Detergent Preference Study: Linear Model Analysis
Detergent Preference Study |
Saturated Model |
Response |
Brand |
Response Levels |
2 |
Weight Variable |
Count |
Populations |
12 |
Data Set |
DETERGENT |
Total Frequency |
1008 |
Frequency Missing |
0 |
Observations |
24 |
|
The "Data Summary" table (Output 22.1.1) indicates
that you have two response levels and twelve populations.
Output 22.1.2: Population Profiles
Detergent Preference Study |
Saturated Model |
Population Profiles |
Sample |
Softness |
Previous |
Temperature |
Sample Size |
1 |
hard |
no |
high |
72 |
2 |
hard |
no |
low |
110 |
3 |
hard |
yes |
high |
67 |
4 |
hard |
yes |
low |
89 |
5 |
med |
no |
high |
56 |
6 |
med |
no |
low |
116 |
7 |
med |
yes |
high |
70 |
8 |
med |
yes |
low |
102 |
9 |
soft |
no |
high |
56 |
10 |
soft |
no |
low |
116 |
11 |
soft |
yes |
high |
48 |
12 |
soft |
yes |
low |
106 |
|
The "Population Profiles" table in Output 22.1.2
displays the ordering of independent variable levels as used in
the table of parameter estimates.
Output 22.1.3: Response Profiles, Frequencies, and Probabilities
Detergent Preference Study |
Saturated Model |
Response Profiles |
Response |
Brand |
1 |
M |
2 |
X |
Response Frequencies |
Sample |
Response Number |
1 |
2 |
1 |
30 |
42 |
2 |
42 |
68 |
3 |
43 |
24 |
4 |
52 |
37 |
5 |
23 |
33 |
6 |
50 |
66 |
7 |
47 |
23 |
8 |
55 |
47 |
9 |
27 |
29 |
10 |
53 |
63 |
11 |
29 |
19 |
12 |
49 |
57 |
Response Probabilities |
Sample |
Response Number |
1 |
2 |
1 |
0.41667 |
0.58333 |
2 |
0.38182 |
0.61818 |
3 |
0.64179 |
0.35821 |
4 |
0.58427 |
0.41573 |
5 |
0.41071 |
0.58929 |
6 |
0.43103 |
0.56897 |
7 |
0.67143 |
0.32857 |
8 |
0.53922 |
0.46078 |
9 |
0.48214 |
0.51786 |
10 |
0.45690 |
0.54310 |
11 |
0.60417 |
0.39583 |
12 |
0.46226 |
0.53774 |
|
Since Brand M is the first level in the "Response
Profiles" table (Output 22.1.3), the RESPONSE statement
causes Pr(Brand=M) to be the single response function modeled.
Output 22.1.4: Analysis of Variance and WLS Estimates
Detergent Preference Study |
Saturated Model |
Analysis of Variance |
Source |
DF |
Chi-Square |
Pr > ChiSq |
Intercept |
1 |
983.13 |
<.0001 |
Softness |
2 |
0.09 |
0.9575 |
Previous |
1 |
22.68 |
<.0001 |
Softness*Previous |
2 |
3.85 |
0.1457 |
Temperature |
1 |
3.67 |
0.0555 |
Softness*Temperature |
2 |
0.23 |
0.8914 |
Previous*Temperature |
1 |
2.26 |
0.1324 |
Softnes*Previou*Temperat |
2 |
0.76 |
0.6850 |
Residual |
0 |
. |
. |
Analysis of Weighted Least Squares Estimates |
Effect |
Parameter |
Estimate |
Standard Error |
Chi- Square |
Pr > ChiSq |
Intercept |
1 |
0.5069 |
0.0162 |
983.13 |
<.0001 |
Softness |
2 |
-0.00073 |
0.0225 |
0.00 |
0.9740 |
|
3 |
0.00623 |
0.0226 |
0.08 |
0.7830 |
Previous |
4 |
-0.0770 |
0.0162 |
22.68 |
<.0001 |
Softness*Previous |
5 |
-0.0299 |
0.0225 |
1.77 |
0.1831 |
|
6 |
-0.0152 |
0.0226 |
0.45 |
0.5007 |
Temperature |
7 |
0.0310 |
0.0162 |
3.67 |
0.0555 |
Softness*Temperature |
8 |
-0.00786 |
0.0225 |
0.12 |
0.7265 |
|
9 |
-0.00298 |
0.0226 |
0.02 |
0.8953 |
Previous*Temperature |
10 |
-0.0243 |
0.0162 |
2.26 |
0.1324 |
Softnes*Previou*Temperat |
11 |
0.0187 |
0.0225 |
0.69 |
0.4064 |
|
12 |
-0.0138 |
0.0226 |
0.37 |
0.5415 |
|
The "Analysis of Variance" table in Output 22.1.4
shows that all of the interactions are nonsignificant.
Therefore, a main-effects model is fit with the following
statements:
model Brand=Softness Previous Temperature / noprofile;
title2 'Main-Effects Model';
run;
quit;
The PROC CATMOD statement is not required due to the
interactive capability of the CATMOD procedure.
The NOPROFILE option suppresses the redisplay of the
"Response Profiles" table. Output 22.1.5 through
Output 22.1.7 are produced.
Output 22.1.5: Main-Effects Design Matrix
Detergent Preference Study |
Main-Effects Model |
Response |
Brand |
Response Levels |
2 |
Weight Variable |
Count |
Populations |
12 |
Data Set |
DETERGENT |
Total Frequency |
1008 |
Frequency Missing |
0 |
Observations |
24 |
Sample |
Response Function |
Design Matrix |
1 |
2 |
3 |
4 |
5 |
1 |
0.41667 |
1 |
1 |
0 |
1 |
1 |
2 |
0.38182 |
1 |
1 |
0 |
1 |
-1 |
3 |
0.64179 |
1 |
1 |
0 |
-1 |
1 |
4 |
0.58427 |
1 |
1 |
0 |
-1 |
-1 |
5 |
0.41071 |
1 |
0 |
1 |
1 |
1 |
6 |
0.43103 |
1 |
0 |
1 |
1 |
-1 |
7 |
0.67143 |
1 |
0 |
1 |
-1 |
1 |
8 |
0.53922 |
1 |
0 |
1 |
-1 |
-1 |
9 |
0.48214 |
1 |
-1 |
-1 |
1 |
1 |
10 |
0.45690 |
1 |
-1 |
-1 |
1 |
-1 |
11 |
0.60417 |
1 |
-1 |
-1 |
-1 |
1 |
12 |
0.46226 |
1 |
-1 |
-1 |
-1 |
-1 |
|
The design matrix in Output 22.1.5 displays the results of the
factor effects modeling used in PROC CATMOD.
Output 22.1.6: ANOVA Table for the Main-Effects Model
Detergent Preference Study |
Main-Effects Model |
Analysis of Variance |
Source |
DF |
Chi-Square |
Pr > ChiSq |
Intercept |
1 |
1004.93 |
<.0001 |
Softness |
2 |
0.24 |
0.8859 |
Previous |
1 |
20.96 |
<.0001 |
Temperature |
1 |
3.95 |
0.0468 |
Residual |
7 |
8.26 |
0.3100 |
|
The analysis of variance table in Output 22.1.6 shows that previous use of
Brand M, together with the temperature of the laundry water, are
significant factors in preferring Brand M laundry detergent.
The table also shows that the additive model
fits since the goodness-of-fit statistic
(the Residual Chi-Square) is nonsignificant.
Output 22.1.7: WLS Estimates for the Main-Effects Model
Detergent Preference Study |
Main-Effects Model |
Analysis of Weighted Least Squares Estimates |
Effect |
Parameter |
Estimate |
Standard Error |
Chi- Square |
Pr > ChiSq |
Intercept |
1 |
0.5080 |
0.0160 |
1004.93 |
<.0001 |
Softness |
2 |
-0.00256 |
0.0218 |
0.01 |
0.9066 |
|
3 |
0.0104 |
0.0218 |
0.23 |
0.6342 |
Previous |
4 |
-0.0711 |
0.0155 |
20.96 |
<.0001 |
Temperature |
5 |
0.0319 |
0.0161 |
3.95 |
0.0468 |
|
The negative coefficient for Previous (-0.0711) in
Output 22.1.7 indicates that the first level of Previous
(which, from the table of population profiles, is `no') is
associated with a
smaller probability of preferring Brand M than the second level
of Previous (with coefficient constrained to be 0.0711 since
the parameter estimates for a given effect must sum to zero).
In other words, previous users of Brand M are much more
likely to prefer it than those who have never used it before.
Similarly, the positive coefficient for Temperature
indicates that the first level of Temperature (which,
from the "Population Profiles" table, is `high') has a larger
probability of preferring Brand M than the second level of
Temperature.
In other words, those who do their laundry in
hot water are more likely to prefer Brand M
than those who do their laundry in cold water.
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.