hi everybody.
i am trying to use proc corr to find correlation between my numeric variable ,but gives me error for those variable that had missing values even after i removed missing values .the error is: Variable ...... in list does not match type prescribed for this list.
some of my variables had missing values which were shown by NA that i had to remove all the missing rows from my data set then i used proc corr .i guess the reason that sas gives me error for proc corr is that sas may still read those variables as character variables.is there any way in sas to confirm that my variables are numeric ?
appreciate any help.
proc corr data=mydata;
var _all_;
run;
Change your code to
proc corr data=mydata;
var _numeric_;
run;
You'll see who's missing.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.