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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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