楼主: verbatim
885 2

[问答] how to create event history diagram in R [推广有奖]

  • 1关注
  • 3粉丝

已卖:25份资源

博士生

5%

还不是VIP/贵宾

-

威望
0
论坛币
513 个
通用积分
2.0505
学术水平
0 点
热心指数
2 点
信用等级
0 点
经验
3404 点
帖子
139
精华
0
在线时间
143 小时
注册时间
2006-12-1
最后登录
2020-1-30

楼主
verbatim 发表于 2017-2-11 10:13:54 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
  1. conmed = structure(list(id = c(2L, 2L), cmstdate = structure(c(2L, 1L), .Label = c("1/1/2014",
  2. "1/3/2014"), class = "factor"), cmmed = structure(c(2L, 1L), .Label = c("Inducers",
  3. "Inhibitors"), class = "factor"), cmstdy = c(2L, 0L), cmendy = c(4L,
  4. 1L), cmlocap = c(NA, NA), cmhicap = c(NA, NA), cmseq = 0:1), .Names = c("id",
  5. "cmstdate", "cmmed", "cmstdy", "cmendy", "cmlocap", "cmhicap",
  6. "cmseq"), class = "data.frame", row.names = c(NA, -2L))
复制代码
how to create a event history diagram the below SAS code create in R with above data?
  1. proc sgplot data=conmed noautolegend nocycleattrs;
  2. refline 0 / axis=x lineattrs=(thickness=1 color=black);

  3. highlow y=cmseq low=cmstdy high=cmendy / type=bar barwidth=0.8 lowlabel=cmmed
  4. lowcap=cmlocap highcap=cmhicap fillattrs=(color=cx9BDCF2);
  5. scatter y=cmseq x=cmstdate / markerattrs=(size=0) x2axis;

  6. yaxis display=(nolabel noticks novalues) min=0;
  7. xaxis grid label='Study Days' offsetmax=0.02;
  8. x2axis notimesplit display=(nolabel) offsetmax=0.02 tickvalueformat=date7.;
  9. run;
复制代码
二维码

扫码加我 拉你入群

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

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

关键词:History diagram Create Event creat structure history create factor

沙发
verbatim 发表于 2017-2-12 06:41:24
lkSCRconmed 15.pdf (14.04 KB)
one page out of 65 pages of 257 IDs is attached

藤椅
verbatim 发表于 2017-2-26 08:22:36
one page out of 65 pages of 257 IDs is attached

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-6 08:36