Lesson 4 统计描述及分布类型

Lesson 4 统计描述及分布类型

统计描述

proc means

proc means过程:均值、标准差、标准误、方差、变异系数、极差、t值、偏度系数、峰度系数、可信区间上下限。

data a;
set ysc.anemia;
run;
proc means data=a;
var age1 hb;
run;
-----------------------------
proc means data=a maxdec=3 mean range clm alpha=0.05;
/*maxdec小数位数为3*/
var age1 hb;
class sex;
run;
-----------------------------
proc sort data=a;
by sex; run;
proc means data=a maxdec=3 mean range clm alpha=0.05;
var age1 hb; by sex; run;

proc univariate

proc univariate过程:极端值的描述、分位数的计算、生成分布图、生成频数表、正态性检验

选项有:ALL, ALPHA, ANNOTATE, CIBASIC, CIPCTLDF, CIPCTLNORMAL, CIQUANTDF, CIQUANTNORMAL, DATA, DEBUG, EXCLNPWGT, FREQ, GOUT, LOCCOUNT, MODE, MODES,MU0, NEXTROBS, NEXTRVAL, NOBYPLOT, NOPRINT, NORMAL, NOTABCONTENTS, NOVARCONTENTS,OUTTABLE, PCTLDEF, PLOT, PLOTSIZE, ROBUSTSCALE, ROUND, SUMMARYCONTENTS, TRIMMED,VARDEF, WINSORIZED.

proc univariate data=a;
var age1;
run;

proc freq

proc freq data=a;
tables sex anemia_ana;
run;
proc freq data=a;
tables sex*anemia_ana;
run;

正态分布检验

/*绘制直方图*/
proc gchart data=ysc.anemia;
title1 'histogram';
pattern color=black value=empty;
vbar age1 hb;
run;
/*正态性检验*/
proc univariate data=ysc.anemia normal;
vbar age1 hb;
run;

你可能感兴趣的:(Lesson 4 统计描述及分布类型)