/* x7_1.sas */ /* Purpose: */ title1 'Example 7.1.'; 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 1 pop2 COV X2 1 2 pop2 MEAN 1 1 pop2 N 1000000 1000000 ; proc print; title2 'List of data. NB special SAS-dataset (type=cov). Nobs set "high".'; data b; input x1 x2; cards; 5 6 0 0 1 0 2 0 3 0 4 0 ; 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; title2 'Linear discriminant analysis - equal prior probabilities.'; proc discrim data=a testdata=b testlist pool=yes; class pop; priors 'pop1'=0.1 'pop2'=0.9; var x1 x2; title2 'Linear discriminant analysis - unequal prior probabilities.'; run;