/* Lesson 13-01 */ /* File Name = les1301.sas 01/29/19 */ options nocenter linesize=78 pagesize=30; proc printto print = 'Kougi/les1301_results.txt' new; data gakusei; infile 'Kougi/all08c_sjis.csv' firstobs=2 dlm=','; input sex $ shintyou taijyuu kyoui jitaku $ kodukai carryer $ tsuuwa; if shintyou='.' or taijyuu='.' or kyoui='.' then delete; if carryer="au+willc" then carryer="au+Willc"; if carryer="docomo" then carryer="DoCoMo"; if carryer="docomo+w" then carryer="DoCoMo+W"; if carryer="vodafone" then carryer="Vodafone"; proc format; value clshint low-<150=' -149' 150-<160='150-159' 160-<170='160-169' 170-<180='170-179' 180-high='180- ' other ='missing'; run; proc print data=gakusei(obs=5); run; proc means data=gakusei; run; proc fastclus data=gakusei out=outclust maxclusters=2; var shintyou taijyuu kyoui; run; proc plot data=outclust; plot shintyou*taijyuu=cluster; plot taijyuu*kyoui=cluster; plot kyoui*shintyou=cluster; run; data _null_; set outclust; file 'Kougi/les1301_out.txt'; put shintyou taijyuu kyoui cluster; run;