1. 问问题是不是选<疑难解惑>??
2. 如果在proc tabulate里面使用class variable crossed with itself,就会出现WARNING: A class variable is crossed with itself in the table statement at line 1106.
比如下面这个例子,
proc tabulate data=sashelp.class;
class age sex;
var weight height;
table (sex all) (age all), (sex*rowpctn='' age*rowpctn='' weight*mean height*mean);
run;
log:
WARNING: A class variable is crossed with itself in the table statement at line 1264. This may cause unpredictable results.
WARNING: A class variable is crossed with itself in the table statement at line 1264. This may cause unpredictable results.
NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: PROCEDURE TABULATE used (Total process time):
real time 0.15 seconds
cpu time 0.06 seconds
Output:
| Sex | Age | Weight | Height |
F | M | 11 | 12 | 13 | 14 | 15 | 16 | Mean | Mean |
Sex | 100 | . | 11.11 | 22.22 | 22.22 | 22.22 | 22.22 | . | 90.11 | 60.59 |
F |
M | . | 100 | 10 | 30 | 10 | 20 | 20 | 10 | 108.95 | 63.91 |
All | 47.37 | 52.63 | 10.53 | 26.32 | 15.79 | 21.05 | 21.05 | 5.26 | 100.03 | 62.34 |
Age | 50 | 50 | 100 | . | . | . | . | . | 67.75 | 54.4 |
11 |
12 | 40 | 60 | . | 100 | . | . | . | . | 94.4 | 59.44 |
13 | 66.67 | 33.33 | . | . | 100 | . | . | . | 88.67 | 61.43 |
14 | 50 | 50 | . | . | . | 100 | . | . | 101.88 | 64.9 |
15 | 50 | 50 | . | . | . | . | 100 | . | 117.38 | 65.63 |
16 | . | 100 | . | . | . | . | . | 100 | 150 | 72 |
All | 47.37 | 52.63 | 10.53 | 26.32 | 15.79 | 21.05 | 21.05 | 5.26 | 100.03 | 62.34 |
求教大虾~