|
Chapter Contents |
Previous |
Next |
| The TRANSREG Procedure |
This example, which is more detailed than the previous one, uses PROC TRANSREG to perform a metric conjoint analysis of tire preference data. Conjoint analysis can be used to decompose preference ratings of products or services into components based on qualitative product attributes. For each level of each attribute of interest, a numerical "part-worth utility" value is computed. The sum of the part-worth utilities for each product is an estimate of the utility for that product. The goal is to compute part-worth utilities such that the product utilities are as similar as possible to the original ratings. Metric conjoint analysis, as shown in this example, fits an ordinary linear model directly to data assumed to be measured on an interval scale. Nonmetric conjoint analysis, as shown in Example 65.2, finds an optimal monotonic transformation of original data before fitting an ordinary linear model to the transformed data.
This example has three parts. In the first part, an experimental design is created. In the second part, a DATA step creates descriptions of the stimuli for the experiment. The third part of the example performs the conjoint analyses.
The stimuli for the experiment are 18 hypothetical tires. The stimuli represent different brands (Goodstone, Pirogi, Machismo)*, prices ($69.99, $74.99, $79.99), expected tread life (50,000, 60,000, 70,000), and road hazard insurance plans (Yes, No).
For a conjoint study such as this, you need to create an experimental design with 3 three-level factors, 1 two-level factor, and 18 combinations or runs. While it is easy to get a design for this situation from ADX software or a table, you can also use the more general approach of using the OPTEX procedure to find an efficient design. First, the PLAN procedure is used to construct a full-factorial design consisting of all possible combinations of the factors. Then, PROC OPTEX is used to find an efficient design for a main-effects model.
The FACTORS statement in PROC PLAN specifies each of the factors and the number of levels. The full-factorial design is output to the data set Candidates, and no displayed output is produced from PROC PLAN. The OPTEX procedure searches the Candidates data set for an efficient experimental design. The option CODING=ORTHCAN specifies an orthogonal coding of the internal design matrix. All factors are designated as CLASS variables, and a main-effects model (no interactions) is specified. The GENERATE statement requests a design with N=18 products using the Modified Federov algorithm. For most conjoint studies, this is the best algorithm to use. The best experimental design is output to a SAS data set called sasuser.TireDesign. For this study, PROC OPTEX has no trouble finding a perfect, 100% efficient experimental design because a standard, balanced, and orthogonal design exists for this problem. (It is frequently the case in practice that 100% efficiency is unobtainable.) Specifying random number seeds on the design procedures, while not strictly necessary, helps ensure that the design is reproducible. However, in examples like this in which PROC OPTEX finds many designs, all tied with the same efficiency, different but equivalent designs are sometimes output. When this happens, you get different results from those shown. The experimental design is displayed, and the SUMMARY procedure is used to examine one-way and two-way frequencies for all of the factors. All frequencies within each crosstabulation are constant, which is consistent with the 100% efficiency reported by PROC OPTEX. Finally, the tires are sorted into a random order and stored into a permanant SAS data set. In the interest of space, only the final design is shown. (The output from PROC OPTEX and PROC SUMMARY is not displayed.)
title 'Tire Study, Experimental Design';
proc format;
value BrandF
1 = 'Goodstone'
2 = 'Pirogi '
3 = 'Machismo ';
value PriceF
1 = '$69.99'
2 = '$74.99'
3 = '$79.99';
value LifeF
1 = '50,000'
2 = '60,000'
3 = '70,000';
value HazardF
1 = 'Yes'
2 = 'No ';
run;
proc plan seed=070787;
factors Brand=3 Price=3 Life=3 Hazard=2 / noprint;
output out=Candidates;
run;
proc optex data=Candidates coding=orthcan seed=080489;
class Brand Price Life Hazard;
model Brand Price Life Hazard;
generate n=18 method=m_federov;
output out=TireDesign;
format Brand BrandF9. Price PriceF9. Life LifeF6. Hazard HazardF3.;
run;
proc sort;
by Brand Price Life Hazard;
run;
proc print;
run;
proc summary print;
class Brand -- Hazard;
ways 1 2;
run;
data TireDesign2; /* Randomize the order of the tires */
set TireDesign;
r = uniform(7);
run;
proc sort out=sasuser.TireDesign(drop=r);
by r;
run;
Output 65.3.1: Tire Study, Experimental Design
Next, the questionnaires are printed, and subjects are given the questionnaires and are asked to rate the tires.
The following statements produce Output 65.3.2. This output is abbreviated; the statements produce stimuli for all combinations.
data _null_;
title;
set sasuser.TireDesign;
file print;
if mod(_n_,4) eq 1 then do;
put _page_;
put +55 'Subject ________';
end;
length hazardstring $ 7.;
if put(hazard, hazardf3.) = 'Yes'
then hazardstring = 'with';
else hazardstring = 'without';
s = 3 + (_n_ >= 10);
put // _n_ +(-1) ') For your next tire purchase, '
'how likely are you to buy this product?'
// +s Brand 'brand tires at ' Price +(-1) ','
/ +s 'with a ' Life 'tread life guarantee, '
/ +s 'and ' hazardstring 'road hazard insurance.'
// +s 'Definitely Would Definitely Would'
/ +s 'Not Purchase Purchase'
// +s '1 2 3 4 5 6 7 8 9 ';
run;
Output 65.3.2: Conjoint Analysis, Stimuli Descriptions|
|
PROC TRANSREG fits the five individual conjoint models, one for each subject. The UTILITIES a-option displays the conjoint analysis results. The SHORT a-option suppresses the iteration histories, OUTTEST=Utils creates an output data set with all of the conjoint results, and the SEPARATORS= option requests that the labels constructed for each category contain two blanks between the variable name and the level value. The ODS select statement is used to limit the displayed output. The MODEL statement specifies IDENTITY for the ratings, which specifies a metric conjoint analysis -the ratings are not transformed. The variables Brand, Price, Life, and Hazard are designated as CLASS variables, and the part-worth utilities are constrained to sum to zero within each factor.
The following statements produce Output 65.3.3:
title 'Tire Study, Data Entry, Preprocessing';
data Results;
input (c1-c18) (1.);
datalines;
366479338236695228
583448157149666228
127799316264575448
335869145193567449
366379238246685229
;
*---Create an Object by Subject Data Matrix---;
proc transpose data=Results out=Results(drop=_name_) prefix=Subj;
run;
*---Merge the Factor Levels With the Data Matrix---;
data Both;
merge sasuser.TireDesign Results;
run;
*---Print Input Data Set---;
proc print;
title2 'Data Set for Conjoint Analysis';
run;
*---Fit Each Subject Individually---;
proc transreg data=Both utilities short outtest=Utils separators=' ';
ods select FitStatistics Utilities;
title2 'Individual Conjoint Analyses';
model identity(Subj1-Subj5) =
class(Brand Price Life Hazard / zero=sum);
run;
The output contains two tables per subject, one with overall fit statistics and one with the conjoint analysis results.
Output 65.3.3: Conjoint Analysis|
|
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
*---Gather the Importance Values---;
data Importance;
set Utils(keep=_depvar_ Importance Label);
if n(Importance);
label = substr(label, 1, index(label, ' '));
run;
proc transpose out=Importance2(drop=_:);
by _depvar_;
id Label;
run;
proc print;
title2 'Importance Values';
run;
proc means;
title2 'Average Importance';
run;
*---Gather the Part-Worth Utilites---;
data Utilities;
set Utils(keep=_depvar_ Coefficient Label);
if n(Coefficient);
run;
proc transpose out=Utilities2(drop=_:);
by _depvar_;
id Label;
idlabel Label;
run;
proc print label;
title2 'Utilities';
run;
Output 65.3.4: Summary of Conjoint Analysis Results|
|
|
|
|
|
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.