options ls=85 ps=65;

title1 'SAS discrim example2';

 

data admission;

  infile 'D:\T11-6.DAT';

  input gpa gmat status$;

  gpa1=200*gpa;

run;

 

proc print data=admission;

run;

 

proc plot data=admission;

   plot gpa*gmat=status;

run;

 

title2 "scatter plot of gpa and gmat";

%plotit(data=admission,labelvar=_blank_, symvar=status,

plotvars=gpa1 gmat, color=black, colors=blue);

run;

 

proc discrim data=admission method=normal pool=test

     wcov pcov manova listerr crosslisterr;

   class status;

   var gpa gmat;

   *priors equal/propotional/1=0.3 2=0.5 3=0.1;

run;

 

proc discrim data=admission method=normal pool=yes wcov pcov

      listerr crosslisterr;

      class status;

      var gpa gmat;

run;

 

proc discrim data=admission method=normal pool=no wcov pcov

      listerr crosslisterr;

      class status;

      var gpa gmat;

run;