1

给定具有事件天数和结果的数据,如下所示:

  data pretend ;
  do subject = 1 to 1000 ;
    fup_time = round(uniform(83386)*500, 1) ;
    select(round(uniform(778523)*5, 1)) ;
      when(1) outcome   = 'cholys' ;
      when(2) outcome   = 'death'  ;
      when(3) outcome   = 'tx end' ;
      when(4) outcome   = 'vascul' ;
      otherwise outcome = 'reop'   ;
    end ;
    output ;
  end ;
  label 
    fup_time = "The day on which ::outcome:: occurred"
    outcome = "What the subject's last observed event was"
  ;
run ;

为每个结果生成曲线的最简单方法是什么,该曲线显示第 X 天仍在观察的样本比例,按结果细分?

我试过了:

  proc lifetest data = pretend plots = all notable ; 
    strata outcome ;
    time fup_time*censored(1) ;
  run ;

当结果为“tx end”或“death”时,“censored”设置为 1。我非常喜欢产生的产品极限生存曲线,除了死亡线和 tx 结束线完全平坦,y = 1.0。

我实际上根本不想在这里做任何推断——只是想要漂亮的图片。有没有简单的方法?

4

0 回答 0