楼主: mcsyky
2966 2

[SAS] SAS求助 [推广有奖]

  • 0关注
  • 1粉丝

讲师

12%

还不是VIP/贵宾

-

威望
0 级
论坛币
14784 个
通用积分
166.9754
学术水平
7 点
热心指数
11 点
信用等级
7 点
经验
2833 点
帖子
125
精华
0
在线时间
543 小时
注册时间
2005-12-22
最后登录
2026-3-27
毕业学校
南洋理工大学

楼主
mcsyky 发表于 2006-11-22 23:47:00 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
<P><STRONG>Sas 语句中出现 set &lt;SAS数据&gt;  nobs = all  nobs=last </STRONG></P>
<P><STRONG>nobs还可以接哪些?怎么没有在帮助文件上找不到?<BR></P></STRONG>
二维码

扫码加我 拉你入群

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

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

关键词:SAS求助 nobs Last 帮助文件 obs SAS

回帖推荐

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

nobs 是临时变量.用于SET 语句表示从数据集读入的观测数. nobs = all 的用法表现读入所有观测值. nobs=last 用法用于循环语句中处理观测值. do obsnum=1 to last; set temp1 temp2 nobs=last; output; end;

zzheng722 发表于3楼  查看完整内容

**nobs = all nobs=last help you to create a logical variable called 'all' or 'last', it doesn't matter what you want to call it. If you don't create a newvariable using this logical variable, it will never show up. If you want to use it, you can create a new variable called 'totalpeople' and the results are same: totalpeople=all totalpeople=last ********************************************** ...

本帖被以下文库推荐

沙发
beatuxlee 发表于 2006-11-24 19:18:00
<P>nobs 是临时变量.用于SET 语句表示从数据集读入的观测数.</P>
<P><STRONG>nobs = all   的用法表现读入所有观测值.</STRONG></P>
<P><STRONG>nobs=last 用法用于循环语句中处理观测值.</STRONG></P>
<P><STRONG>do obsnum=1 to last;</STRONG></P>
<P><STRONG>   set temp1 temp2 nobs=last;</STRONG></P>
<P><STRONG>   output;</STRONG></P>
<P><STRONG>end;</STRONG></P>
已有 1 人评分经验 收起 理由
bakoll + 2 热心帮助其他会员

总评分: 经验 + 2   查看全部评分

无为有之始

藤椅
zzheng722 发表于 2007-2-16 07:27:00
<B><FONT face="Courier New" color=#000080 size=2>
<P>**nobs = all  nobs=last help you to create a logical variable called 'all' or 'last', it doesn't matter what you want to call it. If you don't create a newvariable using this logical variable, it will never show up. If you want to use it, you can create a new variable called 'totalpeople' and the results are same:</P>
<P>totalpeople=all</P>
<P>totalpeople=last</P>
<P>**************************************************;</P>
<P>data test1;</P>
<P>input x;</P>
<P>cards;</P>
<P>3.3</P>
<P>5</P>
<P>0.6</P>
<P>11</P>
<P>608</P>
<P>;</P>
<P>run;</P></B></FONT><FONT face="Courier New" size=2>
<P>data<FONT face="Courier New" size=2> test2;</P></FONT><FONT face="Courier New" color=#0000ff size=2>
<P>set</FONT><FONT face="Courier New" size=2> test nobs=all;</FONT></P>
<P>totalpeople=all;</P>
<P><B><FONT face="Courier New" color=#000080 size=2>run</B></FONT><FONT face="Courier New" size=2>;</P></FONT></FONT><B><FONT face="Courier New" color=#000080 size=2>
<P>proc</B></FONT><FONT face="Courier New" size=2> </FONT><B><FONT face="Courier New" color=#000080 size=2>print</B></FONT><FONT face="Courier New" size=2> </FONT><FONT face="Courier New" color=#0000ff size=2>data</FONT><FONT face="Courier New" size=2>=test2;</P></FONT><B><FONT face="Courier New" color=#000080 size=2>
<P>run</B></FONT><FONT face="Courier New" size=2>;<STRONG><FONT color=#000080> </FONT></STRONG><FONT face="Courier New" size=2></P>
<P>data<FONT face="Courier New" size=2> test3;</P></FONT><FONT face="Courier New" color=#0000ff size=2>
<P>set</FONT><FONT face="Courier New" size=2> test nobs=last;</FONT></P>
<P>totalpeople=last;</P>
<P><B><FONT face="Courier New" color=#000080 size=2>run</B></FONT><FONT face="Courier New" size=2>;</P></FONT></FONT><B><FONT face="Courier New" color=#000080 size=2>
<P>proc</B></FONT><FONT face="Courier New" size=2> </FONT><B><FONT face="Courier New" color=#000080 size=2>print</B></FONT><FONT face="Courier New" size=2> </FONT><FONT face="Courier New" color=#0000ff size=2>data</FONT><FONT face="Courier New" size=2>=test3;</P></FONT><B><FONT face="Courier New" color=#000080 size=2>
<P>run</B></FONT><FONT face="Courier New" size=2>;</P></FONT></FONT>
已有 1 人评分经验 论坛币 收起 理由
bakoll + 2 + 10 热心帮助其他会员

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

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

客服
GMT+8, 2026-11-30 22:36