libname datapath "E:\EC\kie\nbo\20170613";
data mba;
set datapath.Nbo_trans;
keep CustomerID newname;
run;
/********************关联分析****************/
proc sort data=mba; by customerid descending newname;run;
proc dmdb batch data=mba out=dmassoc dmdbcat=catassoc;
id customerid ;
class newname(desc);
run;
proc assoc data=mba dmdbcat=catassoc
out=datassoc(label='Output from Proc Assoc')
items=3 support=1;
cust customerid;
target newname;
run;
proc rulegen in=datassoc
out=datrule(label='Output from Proc Rulegen')
minconf=1;
run;
data datapath.nbo;
set datrule;
where SET_SIZE >1 and LIFT>1 and SUPPORT>=0.1;
run;
PROC EXPORT DATA= datapath.nbo
OUTFILE= "E:\EC\kie\nbo\20170613\kie_nbo_20170530.xlsx"
DBMS=xlsx REPLACE;
RUN;