*********************************************************************************; * donnees Jus d'orange ; * Tennenhaus https://studies2.hec.fr/jahia/webdav/site/hec/shared/sites/tenenhaus/acces_anonyme/home/fichier_excel/orange.xls ; * Pierre DESMET Janvier 2012 ; *********************************************************************************; title3 "Analyse sensorielle jus d'orange"; data in ; length produit $20 ; input Produit $ Glucose Fructose Saccharose Pouvoir_sucrant pH_brut pH_apres_centrif Titre Acide_citrique VitamineC int_odeur typ_odeur car_pulpeux int_goût car_acide car_amer car_sucre Juge1-Juge96 @@; * x1-x9 : donnees instrumentales ; * x10-x17 : donnees sensorielles ; * juge = preference des juges ; cards ; pampryl_ambiant 25.32 27.36 36.45 89.95 3.59 3.55 13.98 0.84 43.44 2.82 2.53 1.66 3.46 3.15 2.97 2.6 2 1 2 4 2 2 3 2 4 1 2 2 2 2 4 4 5 2 1 1 2 3 2 2 3 4 4 4 3 3 2 3 2 4 2 2 4 3 4 3 3 4 2 3 3 3 4 1 3 2 3 2 2 4 1 3 2 2 2 3 3 5 2 3 3 2 4 2 1 3 2 2 2 4 4 4 2 1 1 2 3 5 4 2 3 3 3 3 2 3 1 2 4 1 4 3 tropicana_ambiant 17.33 20 44.15 82.55 3.89 3.84 11.14 0.67 32.7 2.76 2.82 1.91 3.23 2.55 2.08 3.32 2 3 3 4 3 4 2 2 3 3 4 3 2 2 5 3 5 2 3 2 2 3 2 4 4 5 3 4 4 3 3 3 2 3 4 2 3 4 5 2 3 4 1 2 4 1 5 3 2 2 5 3 1 2 2 2 3 4 4 5 5 4 3 3 4 2 4 3 2 3 3 3 2 4 3 2 3 3 2 2 3 2 2 4 1 3 4 5 2 2 4 4 2 3 2 3 fruvita_refrigere 23.65 25.65 52.12 102.22 3.85 3.81 11.51 0.69 37 2.83 2.88 4 3.45 2.42 1.76 3.38 3 3 4 4 2 5 3 3 2 2 4 4 1 1 3 2 3 4 3 5 5 3 2 2 4 3 4 3 2 4 3 4 3 4 4 3 4 3 4 3 2 3 4 4 2 2 3 4 5 4 4 4 4 3 3 2 2 3 3 5 4 4 3 2 1 4 3 3 5 4 4 4 5 3 3 3 2 4 3 3 3 2 4 4 1 5 4 2 4 3 4 4 2 3 4 4 joker_ambiant 32.42 34.54 22.92 90.71 3.6 3.58 15.75 0.95 36.6 2.76 2.59 1.66 3.37 3.05 2.56 2.8 2 2 2 2 2 3 2 3 5 2 2 2 2 3 3 1 4 1 4 1 3 4 3 3 2 4 4 3 2 2 3 2 2 2 3 3 1 3 4 2 3 5 2 4 4 2 3 3 2 3 3 2 4 1 2 3 3 2 3 2 1 2 3 3 4 2 4 1 1 2 3 4 2 4 3 4 1 4 1 2 4 3 3 2 3 3 4 3 3 2 2 2 5 2 3 2 tropicana_refrigere 22.7 25.32 45.8 94.87 3.82 3.78 11.8 0.71 39.5 3.2 3.02 3.69 3.12 2.33 1.97 3.34 4 4 3 4 3 3 2 4 2 2 3 5 1 1 2 3 3 3 3 3 4 2 1 3 4 4 2 2 3 3 3 2 4 2 4 3 2 3 5 3 4 3 4 3 4 3 2 4 1 4 2 3 3 2 3 2 1 4 4 5 4 4 3 2 1 3 2 3 4 2 3 4 4 3 4 3 3 2 4 2 2 3 4 4 1 4 3 4 3 3 3 2 2 1 4 4 pampryl_refrigere 27.16 29.48 38.94 96.51 3.68 3.66 12.21 0.74 27 3.07 2.73 3.34 3.54 3.31 2.63 2.9 3 1 1 2 2 3 1 2 3 2 2 3 4 2 2 1 4 3 1 4 4 4 4 3 3 3 3 2 3 3 2 4 3 2 3 3 4 3 4 4 4 3 1 4 3 1 4 1 4 2 4 2 4 2 1 4 3 1 4 2 2 1 2 4 2 4 2 3 2 2 3 3 3 4 3 3 3 3 2 1 2 3 3 3 2 2 2 5 3 3 2 3 2 1 1 1 ; run; ods rtf ; ods graphics on ; ********************************************************************************************; * analyse multidimensionnelle des préférences ; * PrinQual généralise l'ACP à des variables de rang et nominales ; * procédure de scoring ; * http://www.psych.yorku.ca/lab/sas/prinqual.htm ; ********************************************************************************************; title1 "Analyse multidimensionnelle des preferences (MDPREF)Prinqual" ; Proc prinqual data=in MDPREF n=2 replace standard scores correlations out=out_orange ; /* transform identity(Juge1-Juge96); /* analyse metrique */ transform monotone(Juge1-Juge96); /* analyse non-metrique */ id produit Glucose -- VitamineC int_odeur--car_sucre; /* transférer les variables dans le data */ run; Proc print data= out_orange ; run ; proc sort data=out_orange ; by _name_ ; run ; title1 "Graphique ACP sur juges données transformées" ; proc factor data= out_orange method=prin plots=all scree nfactors=2 out=out_juges; var Juge1-Juge96; where _type_='SCORE'; run ; title1 "Graphique ACP des préférences" ; data work ; set out_juges; X=factor1 ;Y=factor2; text=produit ; * variable d'identification ; size=2; xsys='2'; ysys='2'; Label X='Facteur 1' Y='Facteur 2' ; keep X Y Xsys Ysys text size color ; run; Proc gplot data=work; symbol1 V=none i=none ; plot Y*X=1 / annotate=work Frame Href=0 Vref=0; run; ********************************************************************************************; * typologie des juges sur les deux premiers axes ; ********************************************************************************************; ods graphics on ; Proc cluster data=out_orange method=ward simple pseudo rsquare ccc outtree= tree print=8 ; /* le nombre de classes présentées dans les tableaux */ var prin1 prin2 ; id _name_ ; /* copy var pour copier des variables */ where _TYPE_="CORR" ; run ; data outtree; set tree; if _parent_ eq '' and _name_ ne 'CL1' then delete; run; Title2 "Dendrogramme de la typologie hiérarchique des juges (average)"; proc tree data=outtree horizontal out=out_type Nclusters=3 ;* un tableau "data_type" avec 3 clusters sera constitué ; * copy prin1 prin2; run; title1 'Carte des Preferences (PREFMAP)var objectives et subjectives'; * modele vectoriel pour les variables dont les optima sont à l'infini; * transreg cherche la combinaison optimale des Y corrélée à la combinaison des X (régression); Proc transreg data=out_orange; Model identity(Glucose -- VitamineC int_odeur--car_sucre )=identity(Prin1 Prin2); output tstandard=center coordinates replace out=TResult1; id produit; run; /* * modele point ideal pour la conduite (optimum fini); Proc transreg data=out_orange; Model identity(conduite)=point(Prin1 Prin2); output tstandard=center coordinates replace noscores out=TResult2; id Modele; run; */ /* model linear(y1-y3) = linear(x1-x4); ordinary multivariate multiple regression model monotone(y) = linear(x1-x4); monotone multiple regression model mspline(y) = linear(x1-x4); smooth monotone (quadratic spline) multiple regression model linear(y) = class(gp) parallel monotone curves,spline(x/degree=1); separate intercepts model monotone(y1) = class(x1-x3); monotone ANOVA (conjoint analysis), main effects model model monotone(y1) = point(x1-x3); PREFMAP or ideal point regression */