/* Lesson StatM23-2 */ /* File Name = StatM2301-2.sas 10/08/23 */ options nocenter linesize=78 pagesize=30; options locale='en_US'; /* options locale='ja_JP'; */ proc printto print = '/home/sasnitech0/StatM23/StatM2301-2-Results.txt' new; ods listing gpath='SAS_GraphDir'; data stud2x; infile '/home/sasnitech0/StatM23/StatM01_Questionnaire2.csv' firstobs=2 dlm=',' dsd /* missover truncover */ /* encoding=sjis termstr=crlf */ ; input /* Name Group Email */ Data : $10. Xa1 : $10. Xa2 : $10. Xb : $10. Xc : $10. Xd : $10. Xe : $10. Xf : $10. Xg : $50. Xh1 $ Xh2 Xh3 Xh4 Xh5 : $10. Xh6 Xh7 Xi : $10. ; label Xa2='学年' Xg ='Q3 のみならず Q4 も受講する予定ですか?' Xh1='性別' Xh2='身長' Xh3='体重' Xh4='胸囲' Xh5='自宅生/下宿生の別' Xh6='仕送り月額' Xh7='スマホの月額通信料' ; /* proc print data=stud2x(obs=10); run; */ /* proc freq data=stud2x order=freq; table Xa2 Xg; run; */ proc freq data=stud2x order=internal; table Xa2 Xg; run; proc means data=stud2x; run; proc sort data=stud2x; by Xh1; run; proc means data=stud2x; var Xh2; by Xh1; run; proc freq data=stud2x order=freq; table Xh1 Xh5 Xh5*Xh1; run; proc chart data=stud2x; hbar Xh2 / midpoints=150 to 190 by 5; run; proc chart data=stud2x; hbar Xh3 / midpoints=40 to 100 by 5; run; proc chart data=stud2x; hbar Xh4 / midpoints=30 to 100 by 10; run; proc chart data=stud2x; hbar Xh6 / midpoints=0 to 120000 by 10000; run;