全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
2498 8
2011-09-28
我用
PROC CORR DATA= ms_umko2;VAR ms_edss bdi_score;RUN;算出了它们的相关系数,现在我要把这些系数添加到一个已存在的表格里面,成为这个表格的新的两行。我一开始想只要把它们也弄成一个dataset存在work里面就行,可我就是不知道要怎么办才行。拜托大师们帮帮忙!
二维码

扫码加我 拉你入群

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

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

全部回复
2011-9-28 01:16:03
先ods trace on; ods trace off 把表格名找出来,然后ods output 把表格输出,再用data步的set就行了
二维码

扫码加我 拉你入群

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

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

2011-9-28 01:34:33
zhangzachary 发表于 2011-9-28 01:16
先ods trace on; ods trace off 把表格名找出来,然后ods output 把表格输出,再用data步的set就行了
能不能麻烦把语法写详细一点呀,我还是菜鸟级的,拜托啦
二维码

扫码加我 拉你入群

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

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

2011-9-28 02:59:37
复制代码
二维码

扫码加我 拉你入群

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

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

2011-9-28 03:16:40
1。first run:
复制代码
then you can see the following info in the log window:
Output Added:
-------------
Name: VarInformation
Label: Variables Information
Template: base.corr.VarInfo
Path: Corr.VarInformation
-------------
Output Added:
-------------
Name: SimpleStats
Label: Simple Statistics
Template: base.corr.UniStat
Path: Corr.SimpleStats
-------------
Output Added:
-------------
Name: PearsonCorr
Label: Pearson Correlations
Template: base.corr.StackedMatrix
Path: Corr.PearsonCorr
-------------
2。so you can know the path and variable name from log window, then you can add ods output statement in proc corr, then run this statement again:
复制代码
and finally you get 3 sas output datasets or you can choose one of them that you want.

and you can see http://www.caliberdt.com/tips/Sep2004.htm for more details.
二维码

扫码加我 拉你入群

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

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

2011-9-28 04:52:29
用proc corr自带的'out='不行么?
二维码

扫码加我 拉你入群

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

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

点击查看更多内容…
栏目导航
热门文章
推荐文章

说点什么

分享

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