/*Import the CSV file into a temporary SAS data set*/
PROC IMPORT OUT= WORK.BANKNOTE_FORGERY
DATAFILE= "D:\Projects\SarahM\banknote.csv"
DBMS=CSV REPLACE;
GETNAMES=YES;
DATAROW=2;
GUESSINGROWS=500;
RUN;
/*Rename Columns to meaningful terms*/
data WORK.BANKNOTE_FORGERY;
length Forged_Class $ 16;
set WORK.BANKNOTE_FORGERY(rename=(V1=Variance_of_Wavelet
V2=Skewness_of_Wavelet
V3=Kurtosis_of_Wavelet
V4=Entropy_of_Wavelet
Class=Forgery_Status));
If Forgery_Status=1 then Forged_Class="Genuine";
else Forged_Class="Forged";
run;
/*Provide Summary Statistics and Graphical Summaries of All Variables*/
ods path work.templat(update) sasuser.templat(read) sashelp.tmplmst(read);
options orientation = landscape;
ods graphics on / reset width=900px height=600px border=off ANTIALIASMAX=50100;
proc univariate data=WORK.BANKNOTE_FORGERY plot;
var Variance_of_Wavelet Skewness_of_Wavelet Kurtosis_of_Wavelet
Entropy_of_Wavelet;
histogram
Variance_of_Wavelet Skewness_of_Wavelet Kurtosis_of_Wavelet
Entropy_of_Wavelet/ kernel;
inset mean std="Std Deviation" median / pos = ne format = 6.3;
run;
ods path work.templat(update) sasuser.templat(read) sashelp.tmplmst(read);
options orientation = landscape;
ods graphics on / reset width=900px height=600px border=off ANTIALIASMAX=50100;
proc univariate data=WORK.BANKNOTE_FORGERY ;
class Forged_Class;
var Variance_of_Wavelet Skewness_of_Wavelet Kurtosis_of_Wavelet
Entropy_of_Wavelet;
histogram
Variance_of_Wavelet Skewness_of_Wavelet Kurtosis_of_Wavelet
Entropy_of_Wavelet/ kernel;
inset mean std="Std Deviation" median / pos = ne format = 6.3;
run;
proc freq data=banknote_forgery;
tables forged_class;
run;
data banknote_forgery;
set banknote_forgery;
y=rannor(1); /* random response variable */
run;
ods select none;
proc robustreg data=banknote_forgery method=lts seed=54321;
model y
= Variance_of_Wavelet
Skewness_of_Wavelet