BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
anissak1
Obsidian | Level 7

Hello - I have a dataset that looks like the below and a simple lifetest code. Why does the resulting graph show "day" on the x axis when it should be "week"?  Any easy way to fix? I'm using SAS for Academics/Studio/Learner.

 

 

Screen Shot 2022-09-20 at 8.00.01 AM.png

 

Dataset columns:

ID.  Treatment. Week. Event. Censor.

 

Code:

/*/

proc lifetest data=mukm;
time week*censor(1);
strata Treatment;
run;

/*/

 

Thank you and best wishes.

 

Anissa

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

There must be a label attached to the variable Week, change the label. 

The default label is different than day in Academics at least.

 

proc lifetest data=mukm;
time week*censor(1);
strata Treatment;
label week = 'Week';
run;

View solution in original post

3 REPLIES 3
Reeza
Super User

There must be a label attached to the variable Week, change the label. 

The default label is different than day in Academics at least.

 

proc lifetest data=mukm;
time week*censor(1);
strata Treatment;
label week = 'Week';
run;
anissak1
Obsidian | Level 7
Thank you! How do I change the label (I’m relatively inexperienced)?
Reeza
Super User
I included the code in the post.

SAS labels allow you to have user friendly names for variables in your graphs and reports.
https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsref/n1r8ub0jx34xfsn1ppcjfe0u16pc.htm

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1731 views
  • 1 like
  • 2 in conversation