楼主: chasedreamtrue
2252 1

[SAS] [求助]a question about do loop [推广有奖]

  • 0关注
  • 0粉丝

本科生

78%

还不是VIP/贵宾

-

威望
0 级
论坛币
123 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
781 点
帖子
82
精华
0
在线时间
12 小时
注册时间
2007-7-30
最后登录
2010-10-24

楼主
chasedreamtrue 发表于 2008-8-12 05:09:00 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
&nbsp;The SAS data set BANKS is listed below:<br/>BANKS<br/>name rate<br/>FirstCapital 0.0718<br/>DirectBank 0.0721<br/>VirtualDirect 0.0728<br/>The following SAS program is submitted:<br/>data newbank;<br/>do year = 1 to 3;<br/>set banks;<br/>capital + 5000;<br/>end;<br/>run;<br/>Which one of the following represents how many observations and variables<br/>will exist in the SAS data set NEWBANK?<br/>A. 0 observations and 0 variables<br/>B. 1 observations and 4 variables<br/>C. 3 observations and 3 variables<br/>D. 9 observations and 2 variables<br/>Answer: B<br/><br/>如果把 set banks 放到do year=1 to 3前面的话就是3 observations and 4 <br/>variables<br/><br/>为什莫呢?谢谢
二维码

扫码加我 拉你入群

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

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

关键词:question About Quest loop Bout question loop

回帖推荐

SignPingGu 发表于2楼  查看完整内容

I have verified the answer.- When 'set banks' is put after the do-loop, the loop repeats for each observation of newbank. B/C newbank is new one, therefore, there would be only one observation;- When 'set banks' is put before the do-loop, the loop repeats for each observation of banks. B/C banks has three observations, therefore, there would be 3 observations;In both cases, the extra variable is ' ...

本帖被以下文库推荐

沙发
SignPingGu 发表于 2008-8-12 09:57:00
I have verified the answer.<br/><br/>- When 'set banks' is put after the do-loop, the loop repeats for each observation of newbank. B/C newbank is new one, therefore, there would be only one observation;<br/>- When 'set banks' is put before the do-loop, the loop repeats for each observation of banks. B/C banks has three observations, therefore, there would be 3 observations;<br/><br/>In both cases, the extra variable is 'Year'.<br/><br/>Hope it helps<br/><br/>
已有 1 人评分经验 论坛币 收起 理由
bakoll + 3 + 3 精彩帖子

总评分: 经验 + 3  论坛币 + 3   查看全部评分

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

客服
GMT+8, 2026-12-6 00:23