苗条肥仔 发表于 2009-11-27 19:55 
今天想做一个数据的图表,将22个变量都Class后,无法正确制图。
被迫用两个Proc Tabulate来完成任务。。
现在想咨询一下,Tabulate最多可以Class多少变量。
还有Class和By有什么区别啊。。。
Last thin first, the BY will generate a table for each by level. Class will be a part of headind in every table.
Do you think there is anyone who can understand your tabulate table in 22 classes?
Last, SAS does have limitations. Here is the log.
114
115  proc tabulate data=t1;
116  class x1-x30;
117  var y;
118  table x1,
119          x2*x3*x4*x5*x6*x7*x8*x9*x10*
120          x11*x12*x13*x14*x15*x16*x17*x18*x19*x20*
121          x21*x22*x23*x24*x25*x26*x27*x28*x29*x30*
122          y
123          ;
124  run ;
ERROR: Limit of 2147483647 potential interactions within a crossing exceeded for the table
       statement at line 118.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: There were 10 observations read from the data set WORK.T1.
NOTE: PROCEDURE TABULATE used (Total process time):
      real time           1.21 seconds
      cpu time            0.07 seconds
135
136  proc tabulate data=t1;
137  class x1-x30;
138  var y;
139  table x1,
140          x2*x3*x4*x5*x6*x7*x8*x9*x10*
141          x11*x12*x13*x14*x15*x16*x17*x18*x19*x20*
142          x21*x22*x23*x24*x25*x26*x27*x28*x29*x30*
143          y
144          ;
145  run ;
ERROR: Page size exceeded by column titles at line 139.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: There were 10 observations read from the data set WORK.T1.
NOTE: PROCEDURE TABULATE used (Total process time):
      real time           0.15 seconds
      cpu time            0.06 seconds