导入数据
proc format;
value gfmt 1="drug1" 2="Placebo" 3="drug2";
run;
data example;
set example_data;
format treatment gfmt.;
run;
proc univariate概括性总结,
ODS GRAPHICS OFF; *off时生成茎叶图, on生成箱图
Proc univariate data=example plot; *plot画图
var ITEM ;
histogram ITEM ;
run;
proc freq 频数频率
proc freq data=example;
table stage_of_cancer;
run;
*交叉
proc freq data=hamd;
tables treatment*stage_of_cancer;
run;
频率图
proc gchart data=hamd;
hbar stage_of_cancer/discrete type=percent freq percent cfreq cpercent;
run;
type可选 cfreq, cpercent, freq, percent, sum, mean
hbar可改为vbar, hbar3d, vbar3d, star, pie, pie,donut,block;