/* x7_3.sas */ /* Purpose: */ title1 'Example 7.3.'; data a (type=cov); length _type_ $ 8 _name_ $ 8; input pop$ _type_ @; if _type_='COV' or _type_='CORR' then input _name_ x1 x2; else input x1 x2; cards; pop1 COV X1 1 1 pop1 COV X2 1 2 pop1 MEAN 4 2 pop1 N 1000000 1000000 pop2 COV X1 1 0 pop2 COV X2 0 1 pop2 MEAN 1 1 pop2 N 1000000 1000000 ; proc print data=a; title2 'List of data. NB special SAS-dataset (type=cov). Nobs set "high".'; data b; input x1 x2; cards; 9 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0 ; proc print data=b; title2 'List of testdata.'; proc discrim data=a testdata=b testlist pool=no bcov pcov tcov wcov bcorr pcorr tcorr wcorr simple; class pop; var x1 x2; title2 'Quadratic discriminant analysis - equal prior probabilities.'; run;