I am running the PROC Discrim function to do the classification, however I am getting the below error while testing the results.
Does anyone know what does this mean? I had doublecheckd and ensured that there are more than two classes available in the dependant variable.
ERROR: At least 2 complete classes are required in DATA= data set or
Here are the steps I am following.
Proc discrim data = test_data outstat=test_result METHOD=NORMAL POOL = no CROSSVALIDATE;
var var1 var2 var3 var4 ; PRIORS PROPORTIONAL; RUN;
Step 2 - Here I need to test me previous results in data set
Proc discrim data = test_result TESTDATA=universe_data TESTOUT = UNIVPRED;
Error : At least 2 complete classes are required in DATA= data set or
I tested keeping the trend blank and keping some dummy names used in the test data, but same error message.
Seems like your TESTDATA= dataset must contain observations from at least two of your classes. I don't know why.
proc discrim data=sashelp.iris outstat=irisstat
var SepalLength SepalWidth PetalLength PetalWidth;
proc discrim data=irisstat testdata=sashelp.iris testout=testout;
where species = "Setosa";
The early bird rate has been extended! Register by March 18 for just $695 - $100 off the standard rate.
Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for:
View all other training opportunities.