全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
2528 4
2013-10-03
我是用一个cox regression来看一些因素譬如饮酒对骨折的HR,老板建议用bootstrap resampling来做internal validation,不知道怎样用sas?
看网上说都得用macro来写?好复杂,sas新手一个,不会用macro。。
另外请教大牛:proc surveyselect和那些macro有什么不一样的吗?resampling with replacement 和 without replacement,有很大区别吗?
谢谢帮助!!感激!!


二维码

扫码加我 拉你入群

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

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

全部回复
2013-10-4 09:29:19
No, macro is unnecessary if you're not going to reuse the code.
Basically you use PROC survyselect to draw samples, then merge in the covariates, and run Cox model with by-group processing to obtain a bootstrapping confidence interval for hazard ratio or whatsoever.
My feeling is that resampling with replacement is preferred if your sample size is close or greater than the # of subjects so at least some samples can avoid the outliers or whatever. I could be wrong.
二维码

扫码加我 拉你入群

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

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

2013-10-4 10:37:19
SAS procedure is simple. The following example will generate 10 sampling sets. You need a text book for what is bootstrap sampling.

proc surveyselect data=sashelp.class out=outboot
seed=123456
method=urs
samprate=1
outhits
rep=10;
run;

proc print;run;
二维码

扫码加我 拉你入群

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

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

2013-10-4 22:26:57
邓贵大 发表于 2013-10-4 09:29
No, macro is unnecessary if you're not going to reuse the code.
Basically you use PROC survyselect  ...
Thanks so much for your help~ really appreciate it!
I tried proc surveyselect with 1000 times resampling, and my pc crashed..
The percentages of missing data was the same high as the original data.. So if I need multiple imputations to handle missing data in the bootstrap sampling, my pc will definitely be dead again..

So can I ask: normally you will deal with missing data before or after the bootstrap resampling?
Big thanks and regards~
二维码

扫码加我 拉你入群

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

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

2013-10-4 22:27:52
bobguy 发表于 2013-10-4 10:37
SAS procedure is simple. The following example will generate 10 sampling sets. You need a text book  ...
Nice reply! Thanks for your patience and help!!
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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