楼主: yingyizhe
2351 3

[求助]SAS认证考试的一条题目 [推广有奖]

  • 0关注
  • 1粉丝

已卖:676份资源

本科生

44%

还不是VIP/贵宾

-

威望
0
论坛币
1950 个
通用积分
0.7233
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
850 点
帖子
83
精华
0
在线时间
50 小时
注册时间
2007-8-11
最后登录
2022-3-10

楼主
yingyizhe 发表于 2007-9-1 15:52:00 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币

data work.expertise;
input Obs name level;

if level = . then
expertise = 'Unknown';
else if level = 1 then
expertise = 'Low';
else if level = 2 or 3 then
expertise = 'Medium';
else
expertise = 'High';
cards;
1 Frank 1
2 Joan 2
3 Sui 2
4 Jose 3
5 Burt 4
6 Kelly .
7 Juan 1
;
run;

为什么记录“5 Burt 4”得出来的expertise='Medium',不是应该为'High'吗?

谢谢!!

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:sas认证 认证考试 UNKNOWN Expert Medium 考试 题目 SAS 认证

沙发
liujx80 发表于 2007-9-4 02:28:00
the problems lies on 'else if level = 2 or 3 then expertise = 'Medium'; '
'if level=2 or 3 ' should be explained as 'if level=2 or if 3' which equals to 'if level=2 or if true' which means this condition is always be true. So any value of 'level' other than '.' and '1' will fall into this category. Remember, like other programming lauguage, SAS will interepret a number ge 1 as 'true'.

The original intention of this code should use the following code ' else if level = 2 or if level = 3 then experience= 'Medium‘’

我急需论坛钱币阿.


藤椅
eijuhz 发表于 2007-9-4 05:55:00

给予liujx80 100现金奖励

板凳
yingyizhe 发表于 2007-9-4 09:16:00
thank you very much!

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-25 21:54