Programming the statistical procedures from SAS

PROC LIFETEST-Renaming Variables on the graph

Reply
Contributor
Posts: 24

PROC LIFETEST-Renaming Variables on the graph

[ Edited ]

Hello,

 

I ran the following command in SAS:

 

PROC LIFETEST data=w.cancer PLOTS= survival(nocensored); TIME FU_WK*Death(0); STRATA Chemo_Group; run;

ODS GRAPHICS OFF

 

Chemo_Group=>1, 2, 3

 

Is there a way to rename the Chemo_Group on the graph without having to change the names in the variable?  

 

Currently, I am getting ...

 

STRATA:

-----Chemo_group=1   ooo Censored Chemo_group=1

-----Chemo_group=2   ooo Censored Chemo_group=2

-----Chemo_group=3   ooo Censored Chemo_group=3

 

but intstead, it will be nice if I could do the following without changing the variable Chemo_group,

 

STRATA:

-----Chemo_group=Arimidex    ooo Censored Chemo_group=Armidex  

-----Chemo_group=Megace     ooo Censored Chemo_group=Megace  

-----Chemo_group=Efudex       ooo Censored Chemo_group=Efudex  

 

Any help or advice will be appreciated.

 

Thank You.

 

Super User
Posts: 18,565

Re: PROC LIFETEST-Renaming Variables on the graph

Depending on your data look at either applying a label or proc format. 

 

Proc format will change the values in a variable. 

 

A label will,change the display name of a variable. 

Ask a Question
Discussion stats
  • 1 reply
  • 182 views
  • 0 likes
  • 2 in conversation