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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.