Hey all,
I tried importing excel file into SAS which has no variables declared and then i had renamed it into the variables and when i tried performing the following command to :
1. Prepare the dataset for input for a Discriminant analysis via SAS.
2. Generate the means and the variance-covariance matrix of the data for the genuine note(Genuine = 1 and Fake =2 indicator column in the dataset).
Dataset contains six variables measured on 100 genuine and 100 forged (counterfeit/fake).
proc import datafile = '/home/u49442084/sasuser.v94/Swiss Bank data as excel-2.xlsx'
out = SwissBank
dbms = xlsx
replace;
GETNAMES=NO;
run;
proc print data=SwissBank (rename=(a=length b=left c=right d=bottom e=top f=diag g=type));
run;
proc corr data=SwissBank cov;
Where type="1";
run;
when checking for genuine notes I got the following error:
You have not created a variable named TYPE in data set SwissBank, so when you run PROC CORR, SAS can't find it and writes an ERROR to the log.
Perhaps you mean this:
proc corr data=SwissBank (rename=(a=length b=left c=right d=bottom e=top f=diag g=type)) cov;
Still getting the same error, variable type here is a categorical datatype and if i am renaming it as type$ it throws an error there too. So i just had to convert it into CSV file and there it worked well
Thanks
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.