我有两个想要合并为一个的地块。每个图通过其相应的当年累积测试结果表示存在/不存在观察的比例
所以在情节上,我希望看到条形图,并排显示测试分数组,但计算存在到不存在的数量
为了表示这个问题,这就是我目前所拥有的:
data test_scores;
do i = 1 to 200;
score = ranuni(200);
output;
end;
drop i;
run;
data test_scores_2;
set test_scores;
if _n_ le 100 then flag = 0;
else flag = 1;
run;
data test_scores_2_0 test_scores_2_1;
set test_scores_2;
if flag = 0 then output test_scores_2_0;
else if flag = 1 then output test_scores_2_1;
run;
PROC GCHART
DATA=test_scores_2_0
;
VBAR
score
/
CLIPREF
FRAME
LEVELS=20
TYPE=PCT
COUTLINE=BLACK
RAXIS=AXIS1
MAXIS=AXIS2
;
RUN;
QUIT;
PROC GCHART
DATA=test_scores_2_1
;
VBAR
score
/
CLIPREF
FRAME
LEVELS=20
TYPE=PCT
COUTLINE=BLACK
RAXIS=AXIS1
MAXIS=AXIS2
;
RUN;
QUIT;
存在的条形图的总和应为 100% 不存在的条形图的总和应为 100%
TIA