全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
2583 4
2015-10-16
1. 比如说同一数据集中,有两个变量: X(Numeric)  Y(Character). 假设X有值1,2,3;Y有值A,B,C。 如何使得在进行一些分析,比如proc means 或者作图的时候用X的值,但显示Y的值,也就是好像Y的值是X的值得label?

2. 假设proc means 输出 mean, std两个结果,但是我要mean保留一位小数,但是std保留两位要如何操作?谢谢!

麻烦各位高手指教!多谢!
二维码

扫码加我 拉你入群

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

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

全部回复
2015-10-18 14:25:38
1. Use proc format
2. You could use output out= statement to keep mean and std in a dataset, and use format in data step, and then print the data set.

Hope this helps.
二维码

扫码加我 拉你入群

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

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

2015-10-21 15:16:34
johnpark1 发表于 2015-10-18 14:25
1. Use proc format
2. You could use output out= statement to keep mean and std in a dataset, and us ...
hi, thanks for your answer.

For the 1st question. I have thought about proc format, but does  this mean I have to type all the distinct values of X and Y?

Sorry, I may be stupid.

Thanks again!
二维码

扫码加我 拉你入群

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

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

2015-10-21 18:05:23
可以考虑用宏,举个例子:
复制代码

二维码

扫码加我 拉你入群

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

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

2015-11-22 21:02:21
mingfeng07 发表于 2015-10-21 18:05
可以考虑用宏,举个例子:
Thanks!
二维码

扫码加我 拉你入群

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

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

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群