楼主: sophia323
5005 6

[原创博文] sas缺失值填0问题 [推广有奖]

  • 0关注
  • 0粉丝

高中生

42%

还不是VIP/贵宾

-

威望
0
论坛币
9 个
通用积分
0
学术水平
0 点
热心指数
2 点
信用等级
0 点
经验
212 点
帖子
28
精华
0
在线时间
22 小时
注册时间
2009-9-5
最后登录
2016-6-2

楼主
sophia323 发表于 2010-4-24 22:28:49 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
请问如何在sas中将缺失值填0,谢谢
二维码

扫码加我 拉你入群

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

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

关键词:缺失值 如何

沙发
helgela 发表于 2010-4-24 22:31:45
if 变量=. then 变量=0;

藤椅
crackman 发表于 2010-4-24 22:34:32
x=ifn(var=.,0,var);

板凳
sushe1527 发表于 2010-4-24 22:56:08
do over..............

报纸
sophia323 发表于 2010-4-24 23:08:46
3# crackman
这也不是sas语言啊

地板
crackman 发表于 2010-4-24 23:19:22
5# sophia323
ifn(condition,result_if_true,result_if_false
[,result_if_missing])
Returns a numeric value based on whether a condition is true,
false, or missing. condition is a logical expression that evalu-
ates to true if it’s not zero or not missing. If result_if_missing is
omitted,  result_if_false is returned if  condition evaluates to
missing. Example: The statement
bonus=ifn(sales>500,10000,0);
is equivalent to
if sales>500 then bonus=10000; else bonus=0;

ifc(condition,result_if_true,result_if_false
[,result_if_missing])
Returns a character value based on whether a condition is true,
false, or missing. condition is a logical expression that evalu-
ates to true if it’s not zero or not missing. If result_if_missing is
omitted,  result_if_false is returned if  condition evaluates to
missing. Example: The statement
grade=ifc(score>60,'pass','fail');
is equivalent to

SAS FUNCTION

7
lqyrendajinji 发表于 2010-4-25 13:03:00
I learned something.

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-1-2 04:48