/****************************************************************/ /* S A S S A M P L E L I B R A R Y */ /* */ /* NAME: TREGEX6 */ /* TITLE: Preference ratings for automobiles manufactured in */ /* 1980 */ /* PRODUCT: STAT */ /* SYSTEM: ALL */ /* KEYS: PSYCHOME MARKET TRANSFOR */ /* PROCS: TRANSREG PRINQUAL PRINT PLOT */ /* DATA: */ /* */ /* SUPPORT: WFK */ /* REF: PROC TRANSREG, EXAMPLE 6 */ /* MISC: THIS EXAMPLE HAS BEEN MODIFIED SINCE IT APPEARED */ /* IN THE RELEASE 6.06 SAS/STAT USER'S GUIDE */ /* */ /****************************************************************/ title 'Preference Ratings for Automobiles Manufactured in 1980'; data carpref; length model $ 20; input make $ 1-10 model $ 12-22 @25 (judge1-judge25) (1.) mpg reliable ride; label mpg = 'Miles per gallon' reliable = 'Reliability' ride = 'Ride'; cards; Cadillac Eldorado 8007990491240508971093809 3 2 4 Chevrolet Chevette 0051200423451043003515698 5 3 2 Chevrolet Citation 4053305814161643544747795 4 1 5 Chevrolet Malibu 6027400723121345545668658 3 3 4 Ford Fairmont 2024006715021443530648655 3 3 4 Ford Mustang 5007197705021101850657555 3 2 2 Ford Pinto 0021000303030201500514078 4 1 1 Honda Accord 5956897609699952998975078 5 5 3 Honda Civic 4836709507488852567765075 5 5 3 Lincoln Continental 7008990592230409962091909 2 4 5 Plymouth Gran Fury 7006000434101107333458708 2 1 5 Plymouth Horizon 3005005635461302444675655 4 3 3 Plymouth Volare 4005003614021602754476555 2 1 3 Pontiac Firebird 0107895613201206958265907 1 1 5 Volkswagen Dasher 4858696508877795377895000 5 3 4 Volkswagen Rabbit 4858509709695795487885000 5 4 3 Volvo DL 9989998909999987989919000 4 5 5 ; *---Compute Coordinates for a 2-Dimensional Scatterplot of Cars---; proc prinqual data=carpref out=presults(drop=judge1-judge25) n=2 replace standard scores; id model mpg reliable ride; transform monotone(judge1-judge25); title2 'Multidimensional Preference (MDPREF) Analysis'; title3 'Optimal Monotonic Transformation of Preference Data'; run; *---Compute Endpoints for MPG and Reliability Vectors---; proc transreg data=presults; model untie(mpg reliable)=identity(prin1 prin2); output tstandard=center coefficients replace out=tresult1; id model; title2 'Preference Mapping (PREFMAP) Analysis'; run; *---Compute Ride Ideal Point Coordinates---; proc transreg data=presults; model untie(ride)=point(prin1 prin2); output tstandard=center coordinates replace noscores out=tresult2; id model; title2 'Preference Mapping (PREFMAP) Analysis'; run; *---Create Plotting Data Set---; data plot; set tresult1 tresult2; if _type_ = 'SCORE' then sym = '00'x; /* Pointer Symbols for Cars */ else sym = '*'; /* Asterisk For Ideal Points*/ run; proc plot vtoh=2; title3 'Plot of Automobiles and Ratings'; plot prin2 * prin1 $ model = sym / haxis=by 1 vaxis=by 1 box href=0 vref=0 place=((s=right left : h=2 -2) (h=0 1 to 5 by alt * v=0 1 -1 2 -2)); run; quit;