/* x7_4.sas */ /* Purpose: */ title1 'Example 7.4.'; data a (type=cov); length _type_ $ 8 _name_ $ 8; input pop$ _type_ @; if _type_='COV' or _type_='CORR' then input _name_ @; input x1 x2 x3; cards; Gregaria COV X1 4.7350 0.5622 1.4685 Gregaria COV X2 0.5622 0.1413 0.2174 Gregaria COV X3 1.4685 0.2174 0.5702 Gregaria MEAN 25.80 7.81 10.77 Gregaria N 20 20 20 Intermed COV X1 4.7350 0.5622 1.4685 Intermed COV X2 0.5622 0.1413 0.2174 Intermed COV X3 1.4685 0.2174 0.5702 Intermed MEAN 28.35 7.41 10.75 Intermed N 72 72 72 ; proc print; title2 'List of data. NB special SAS-dataset (type=cov).'; proc candisc data=a distance pcov simple; class pop; var x1 x2 x3; data b; input x1 x2 x3; cards; 27.06 8.03 11.36 ; proc print data=b; title2 'List of testdata.'; proc discrim data=a testdata=b testlist pool=yes bcov pcov tcov wcov bcorr pcorr tcorr wcorr simple; class pop; var x1 x2 x3; title2 'Linear discriminant analysis - equal prior probabilities.'; run;