/****************************************************************/ /* S A S S A M P L E L I B R A R Y */ /* */ /* NAME: CANDISC */ /* TITLE: CANDISC analysis of Fisher iris data */ /* PRODUCT: SAS */ /* KEYS: MULTIV */ /* PROCS: CANDISC PLOT */ /* */ /****************************************************************/ %include data(iris); title 'Canonical discriminant analysis: Fisher (1936) iris data'; proc glm data=iris; class species; model sepallen sepalwid petallen petalwid = species/nouni; manova h=species / printe printh short; title2 'GLM output'; proc candisc tcorr wcorr out=disc outstat=discstat; classes species; var sepallen sepalwid petallen petalwid; title2 'CANDISC output'; proc plot data=disc; plot can2*can1=spec_no; title2 'Plot of canonical discriminant functions'; proc print data=discstat; title2 'CANDISC OUTSTAT dataset'; id _type_; by _type_ notsorted; run;