我来帮你:
*第一题;
data test1;
do group="b1" "b2" "b3";
do i=1 to 4;
input x @@;output;
end;
end;
cards;
3.5 2.6 2.0 1.4
2.3 2.0 1.5 0.8
2.0 1.9 1.2 0.3
;run;
*方差分析、多重比较;
proc anova;
class group;
model x=group;
means group/dunnett;
run;
*第二题;
data score;
input no sex $ math phy eng;
cards;
9901 f 98 93 91
9902 m 86 82 85
9903 m 87 94 65
9904 f 89 90 78
9905 f 96 98 82
9906 m 92 87 89
;run;
*将newscore存入d:\user,前提是存在d:\user这个地址;
libname myfile "d:\user";
data myfile.newscore;
set score;
run;
*计算math,eng的基本统计量;
proc means data=score n mean max min range std;
var math eng;
output out=result;
run;
*新进result1;
data result1;
set score;
sum=sum(of math phy eng);
run;
proc sort data=result1;
by sum;
run;
*生成a,b数据;
data a b;
set score;
if sex="f" then output b;
else output a;
run;
proc print data=a;run;
proc print data=b;run;
*第三题;
data test3;
input x1 x2 x3 y;
datalines;
14 16 59 5.87
27 13 27 5.58
31 11 94 5.83
20 15 64 4.71
24 14 167 5.59
19 13 340 3.85
30 13 40 5.52
21 12 122 5.3
29 13 90 5.65
30 14 85 4.97
41 13 120 5.31
;run;
*最优模型选择;
proc reg data=test3;
model y=x1 x2 x3 /
selection=forward ;*替换为backward stepwise;
run;
*非线性拟合;
proc nlin data=test3;
parms a=0 b=0 c=0 d=0;
model y=a b*x1 c*x2 d*x3;
run;
*第四题;
data test4;
input id yali lizi;
datalines;
1 0.3 11.28
2 0.5 9.82
3 0.7 8.76
4 0.9 7.26
5 1.1 7.92
6 1.3 7.26
7 1.5 8.40
8 2.0 6.04
;
run;
proc model data=test4;
parms a0 b0 c0 ;
lizi=a0 b0*exp(-c0*yali);
fit lizi;
run;
proc model data=test4;
parms a1 b1 ;
lizi=a1 b1*log(yali);
fit lizi;
run;
proc model data=test4;
parms a2 b2 ;
lizi=a2 (yali)**b2;
fit lizi;
run;
任务占坑
hadoop|
apache pig|
apache kafka|
apache storm|
impala|
zookeeper|
sas|
tensorflow|
人工智能基础|
apache kylin|
openstack|
flink|
mapreduce|
大数据|
云计算|
用户登录
还没有账号?立即注册
用户注册
投稿取消
文章分类: |
|
还能输入300字
上传中....