data _null_;
q=finv(0.95,3,14);
put 'f分布的0.95分位数' q;
q=tinv(0.95,3,14);
put 't分布的0.95分位数' q;
q=probit(0.95);
put '正态分布的0.95分位数' q;
run;
f分布的0.95分位数3.3438886781
t分布的0.95分位数41.051296426
正态分布的0.95分位数1.644853627
NOTE: “DATA 语句”所用时间(总处理时间):
实际时间 0.06 秒
CPU 时间 0.01 秒
算术平均值
data sales;
input id$ m1-m4;
average=mean(of m1-m4);
cards;
A0001 120 180 60 187
A0002 980 1740 730 1920
A0003 110 1002 705 1098
;
proc print;
run;
输出:
数据转置
data sales;
input name$ jd1-jd4;
cards;
A 1507.53 4898.45 4100.36 1986.25
B 23.25 586.6 123.45 235.68
C 185.19 421.36 154.21 201.36
D 1570.17 2500.41 1964.17 752.16
;
proc print noobs;
run;
/*转置*/
proc transpose data=sales out=mysales name=jd;
label jd=季度;
var jd1-jd4;
id name;
run;
proc print data=mysales label noobs;
run;