![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
SAS
文章平均质量分 76
PTDCDISC
这个作者很懒,什么都没留下…
展开
-
【CDISC】ADaM中--DY变量的计算
ADaM中计算--dy变量的方式很简单可参考以下SAS CODE:*prefix:st或en或空;%macro adam_dy(prefix=); if nmiss(trtsdt,a&prefix.dt)=0 then a&prefix.dy=a&prefix.dt-trtsdt+(a&prefix.dt>=trtsdt);%mend adam_dy;---END---...原创 2020-11-26 11:04:06 · 507 阅读 · 0 评论 -
【CDISC】SDTM中--DY变量的计算
做SDTM算AEDY, LBDY, MHDY等等--DY变量时,可参考以下一看就明白的方法。计算方法:If --DTC>=SDTM.DM.RFSTDTC then --DY=(date portion of --DTC) - (date portion of DM.RFSTDTC) + 1; else --DY=(date portion of --DTC) - (date portion of DM.RFSTDTC)Notes: --DTC can be used...原创 2020-11-26 10:58:52 · 962 阅读 · 0 评论 -
SAS 日期格式处理1 (CDISC)
SAS 日期格式处理 (CDISC)RAW.CM中有字符型格式CMSTDTC,如下图。现想将:1.缺失月和日的,只保留年。if count(cmstdtc,’-UNK’)=2 then _cmstdtc=compress(cmstdtc,’-UNK’);2.或者只缺失日的,保留年和月。else if find(cmstdtc,‘UNK’,‘i’,5)=9 then _cmstdtc=substr(cmstdtc,1,7);3.或者只缺失月的,保留年和日。else if find(cmstd原创 2020-05-26 10:27:40 · 2828 阅读 · 0 评论