/* Lesson 8-4 */
/* File Name = les0804.sas 06/24/99 */
data gakusei;
infile 'all99.dat';
input seibetsu $ height weight chest jitaku $ kodukai;
proc format;
value clheight low-<150=' -149'
150-<160='150-159'
160-<170='160-169'
170-high='170- '
other ='missing';
run;
proc print data=gakusei(obs=10);
run;
:
proc tabulate data=gakusei; : 帳票の作成
class height seibetsu; : 特性変数であることの宣言
var weight; : 集計する変量名
tables weight*(n mean std),height*seibetsu; : 表示内容、分類変量名
format height clheight.; : 身長のクラス分けの定義
run; :
SAS システム 2
21:06 Wednesday, June 23, 1999
----------------------------------------------------------------------
| | HEIGHT |
| |---------------------------------------------------|
| | -149 | 150-159 | 160-169 |
| |------------+-------------------------+------------|
| | SEIBETSU | SEIBETSU | SEIBETSU |
| |------------+-------------------------+------------|
| | F | F | M | F |
|----------------+------------+------------+------------+------------|
|WEIGHT |N | 1.00| 4.00| 1.00| 3.00|
| |--------+------------+------------+------------+------------|
| |MEAN | 38.00| 47.50| 61.00| 51.67|
| |--------+------------+------------+------------+------------|
| |STD | .| 3.87| .| 3.21|
----------------------------------------------------------------------
(CONTINUED)
SAS システム 3
21:06 Wednesday, June 23, 1999
---------------------------------------------------------
| | HEIGHT |
| |--------------------------------------|
| | 160-169 | 170- |
| |------------+-------------------------|
| | SEIBETSU | SEIBETSU |
| |------------+-------------------------|
| | M | F | M |
|----------------+------------+------------+------------|
|WEIGHT |N | 24.00| 0.00| 58.00|
| |--------+------------+------------+------------|
| |MEAN | 59.97| .| 62.64|
| |--------+------------+------------+------------|
| |STD | 7.88| .| 6.12|
---------------------------------------------------------