楼主: 庆春圃8
1952 1

病例对照随机抽样配对,从经济论坛上照抄的原程序,结果在SAS上运行不出结果。求帮助 [推广有奖]

  • 0关注
  • 0粉丝

高中生

52%

还不是VIP/贵宾

-

威望
0
论坛币
174 个
通用积分
5.0000
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
265 点
帖子
6
精华
0
在线时间
57 小时
注册时间
2016-6-20
最后登录
2021-6-29

相似文件 换一批

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
需要病例对照研究,group=1为病例,group=0为对照。
要求:病例、对照1:4;
male+/-0,  birth year+/-2, age+/-5
wts为5 2 1

前后两种方法都试过了,前面那种方法在LOG里又重复了一遍程序
后面的那个test,

data fakereg;setfakereg; timex=5; if case=0 then timex=6;                                                                           

                                                                                                                                 

%gmatch(data=fakereg,group=case,id=id,                                                                                                

       mvars=age sex,wts=2 1,dmaxk= 5 0,transf=0,                                                                                    

       time=timex, dist=1,ncontls=2,seedca=234098,seedco=0489,                                                                        

      out=regccout,outnmco=matched,print=Y);                                                                                          

           run;                                
结果是:
WARNING: Apparent symbolic reference NCO not resolved.
WARNING: Apparent symbolic reference NCA not resolved.
WARNING: Apparent symbolic reference NCA not resolved.
ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The
       condition was: &NCA*2
ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The
       condition was: &NCO < %EVAL(&NCA*&NCONTLS)
ERROR: The macro GREEDY will stop executing.
1603             run;


因为字数超标,贴上原地址
https://bbs.pinggu.org/thread-1091720-1-1.html


二维码

扫码加我 拉你入群

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

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

关键词:随机抽样 经济论坛 病例对照 经济论 求帮助 程序

求大神帮助.xls

16.78 MB

沙发
庆春圃8 发表于 2016-8-16 09:54:34 |只看作者 |坛友微信交流群
自己顶顶

使用道具

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

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-5-2 09:49