我一直试图制定这段代码。 但是,我在5行代码中出现错误。(请参阅屏幕截图)。 请告诉我如何纠正代码。
答案 0 :(得分:1)
您无法在proc means
output out
语句中划分汇总变量。使用单独的datastep:
proc means data = sashelp.class noprint;
output out = class_ratio
sum(weight) = total_weight
sum(height) = total_height;
run;
data class_ratio1; set class_ratio;
total_ratio = total_height/total_weight;
format total_ratio percent5.2;
run;