SAS survival_1

 

 

 x是timerisk。texttab是字符,例如Tim(Month), 100mg, Placebo。

 

 

 legend展示: seriesplot是画出两条线,x y分别是坐标点

      第一个scatterplot是画出统计量。lab全是统计量。

      第二个scatterplot是画出点。

Stats展示:直接用scatterplot画出统计量。x_stat y_stat是坐标,leg全是统计量。

 

 

ods trace on;
ods output Survivalplot=GTL_GS_SurvivalPlotData;
ods graphics / reset imagename='Survival-LifeTest';
proc lifetest data=sashelp.BMT plots=survival(atrisk=0 to 2500 by 500);
   time T * Status(0);
   strata Group / test=logrank adjust=sidak;
   run;
ods trace off;

proc format;
  value aml
  3 = 'AML-Low'
  2 = 'AML-High'
  1 = 'All';
run;
 
ods html;

proc template;
define statgraph _survivalplot;
    begingraph;
    title 'title1';
        entrytitle 'title';
        entryfootnote halign = left 'footnote' ;
    layout overlay ;
            entry 'entry';
            stepplot x = time y = survival / group = stratum lineattrs = (pattern = solid) name = "s";
            scatterplot x = time y = censored / group = stratum markerattrs = (symbol = plus) name = "c";
            innermargin;
                blockplot x = tatrisk block = atrisk / class = stratumnum display = (values label)
                                                        valueattrs = (size = 8) labelattrs = (size = 8);
            endinnermargin;
            discretelegend "s" / valueattrs = (size = 8);
    endlayout;
    endgraph;
end;
run;

proc sgrender data = GTL_GS_SurvivalPlotData template = _survivalplot;
format stratumnum aml.;
run;

ods _all_ close;

 

 

posted @ 2021-10-05 23:02  Iving  阅读(199)  评论(0编辑  收藏  举报