I want to do Discriminant Analysis by using SAS. But there is something wrong in my data set after I transfered the character data into numeric data.
At first, the dataset were character, so my first step was to tranform it into numeric data, by using following data:
【
data newalcohol;
set alcohol(rename=(Meoh=old1 Acet=old2 Bu1=old3 Mepr=old4 Acal=old5 Lnpr01=old6));
Meoh = input (old1,best5.);
Acet= input (old2,best5.);
Bu1 = input (old3,best5.);
Mepr = input (old4,best5.);
Acal = input (old5,best5.);
Lnpr01 = input (old,best5.);
drop old1 old2 old3 old4 old5 old6;
run;
】
And then, I used the following data to do the test:
【title'Discriminant Analysis of Alcohol';
title2'Using Discriminant Function';
proc discrim data = newalcohol outstat=newalcohol
wcov pcov method = normal pool = test
distance anova manova listerr crosslisterr;
class type;
var Meoh Acet Bu1 Mepr Acal Lnpr01;
run;】
However, the warnings showed up here:
【
】
I believe there must be something wrong within my dataset, but I didn't know how to fix it.
Can anyone help me? Thank you.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.