Hello
I tried to run the following code:
proc means data=sasuser.sasfile190616;
var TAssets Sales FDtotalFF IDtotalFF ODtotalFF FDtotalFNF IDtotalFNF ODtotalFNF Firmdefi FOWNFF FINFF OTHERFF FOWNFNF FINFNF OTHERFNF ROA Q SalesGro RDSales LTassets LN(Assets) NIAssets CAPAXS LTSTEquity Divsales Marexpsales FirmAgeissue Beta;
class FIRMDEFI;
run;
And got the following errors (more than that, but all of them with the same reason):
ERROR: Variable FDtotalFNF in list does not match type prescribed for this list.
ERROR: Variable IDtotalFNF in list does not match type prescribed for this list.
ERROR: Variable ODtotalFNF in list does not match type prescribed for this list.
These variables are numeric but have a lot of missing values because each of this variable describe only one class out of 3.
What I have to do in order to get the proc means
Thanks a lot!
The log is telling you they are not numeric. Run a proc contents and verify this. Convert them into numeric variables then use proc means.
The log is telling you they are not numeric. Run a proc contents and verify this. Convert them into numeric variables then use proc means.
I'm having the same isssue. I've checked my data that's stored in excel and the header is text (the variable I'm interested in) and the samples are stored as numbers but SAS still states the same issue as discussed above.
Deae @KTstarter
I did as they mentioned above, it means that my code was:
proc contents data=sasuser.yael1;
run;
I found that variables that I thought and also looked like numbers were actually text. I really do not know why it happened, but I changed it in excel to numbers and copied again to SAS as numbers.
I hope it will helps
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.
Ready to level-up your skills? Choose your own adventure.