pigchenjh 发表于 2014-4-12 14:47 
group=sex 报错 显示语法错误
Your SAS may be an older version. Here is my log file.
40 data t1;
41 do month=2,4,6,8;
42 do sex='F','M';
43 do i=1 to 30;
44 v=rannor(1230)+(SEX='F');
45 OUTPUT;
46 end;
47 end;
48 end;
49 run;
NOTE: The data set WORK.T1 has 240 observations and 4 variables.
NOTE: DATA statement used (Total process time):
real time 0.14 seconds
cpu time 0.03 seconds
50
51
52 proc sgplot data=t1;
53 vbox v / category=month group=sex;
54 xaxis label="Month";
55 run;
NOTE: Since no format is assigned, the numeric category variable will use the default of BEST6.
NOTE: PROCEDURE SGPLOT used (Total process time):
real time 3.05 seconds
cpu time 0.28 seconds
NOTE: Listing image output written to SGPlot.png.
NOTE: There were 240 observations read from the data set WORK.T1.