sas数据集例题Word下载.docx

上传人:b****6 文档编号:17497782 上传时间:2022-12-06 格式:DOCX 页数:9 大小:189.31KB
下载 相关 举报
sas数据集例题Word下载.docx_第1页
第1页 / 共9页
sas数据集例题Word下载.docx_第2页
第2页 / 共9页
sas数据集例题Word下载.docx_第3页
第3页 / 共9页
sas数据集例题Word下载.docx_第4页
第4页 / 共9页
sas数据集例题Word下载.docx_第5页
第5页 / 共9页
点击查看更多>>
下载资源
资源描述

sas数据集例题Word下载.docx

《sas数据集例题Word下载.docx》由会员分享,可在线阅读,更多相关《sas数据集例题Word下载.docx(9页珍藏版)》请在冰豆网上搜索。

sas数据集例题Word下载.docx

物理'

pathology='

病理'

;

cards;

083687165

084746168

085737546

087757168

084858587

085787975

086807679

089677371

118705475

083706684

084627365

099827079

run;

procprintdata=classlabel;

(2)

(3)

inputidbiochemistry$physical$pathology$ave$@@;

ave=mean(biochemistry,physical,pathology);

ifave<

60thenave='

E'

if60<

=ave<

70thenave='

D'

if70<

=79thenave='

C'

if80<

=89thenave='

B'

if90<

=100thenave='

A'

return;

procprint;

二.

6.

libnamesas7bdat'

c:

\saslx'

datastudent;

infile'

\sasdt\student.txt'

lengthid$18;

lengthname$16;

inputid$name$Englishconputer;

age=2015-input(substr(id,7,4),4.);

ifmod(substr(compress(id),17,1),2)

thensex='

1'

elsesex='

2'

dropid;

datasas7bdat.mstu;

setstudent;

ifsex=1;

keepnameagesexEnglishcomputer;

datasas7bdat.fstu;

ifsex=2;

 

7.

datasas7bdat.stu90;

whereEnglish>

90andconputer>

90;

三.

首先导入数据集

dataliangbiao;

MERGED1D2;

datalb;

setliangbiaoD3;

procexportdata=lboutfile="

d:

\cym\SAS作业\量表.sav"

REPLACE;

arraylb[72]a1-a50b1-b22;

setlb;

lb

(1)=6-lb

(1);

lb(5)=6-lb(5);

lb(30)=6-lb(30);

lb(43)=6-lb(43);

lb(49)=6-lb(49);

lb(52)=6-lb(52);

lb(56)=6-lb(56);

lb(69)=6-lb(69);

sum1=sum(ofa1-a25);

sum2=sum(ofa26-a50);

sum3=sum(ofb1-b22);

procstandarddata=lbout=lbreplace;

varsum1sum2sum3;

procsortdata=lb;

bysum3;

datacheng;

inputgroup@@;

datalines;

11111111112222222222222222222222222222222222222222222223333333333

datalg;

MERGElbcheng;

setlg;

if(group=1)thensum='

高分组'

if(group=2)thensum='

中间组'

if(group=3)thensum='

低分组'

结果如下:

成绩

教师签名

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 总结汇报 > 其它

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1