BookmarkSubscribeRSS Feed
Adie_efc
Calcite | Level 5

as is traditional in a KM plot (step plot) the symbol for a censored value is a ¦ (vertical line). every example Ive seen in GTL uses a symbol of plus as there doesnt seem to be an appropriate symbol and unlike old versions I cant use a capital i. My example below uses a + too and it doesnt look quite right.

stepplot x=_x y=_surv / group=signvar lineattrs=(pattern=solid) name='s';

scatterplot x=_x y=_cens / markerattrs=(symbol=plus) GROUP=signvar  ;

SGRender12.png

6 REPLIES 6
Jay54
Meteorite | Level 14

You have two option.  With SAS 9.4M1, you can use any character from a font as a symbol using the SYMBOLCHAR statement.  With Unicode fonts, your choices are huge.  Pre SAS 9.4M1, you can use the SCATTERPLOT with MARKERCHARACTER option to draw the vertical bar "|" at each location.

Haikuo
Onyx | Level 15

Sanjay,

Thank you for coming and the autograph. Great talk in BUG. Hope you had a pleasant trip!

Haikuo

Jay54
Meteorite | Level 14

It was my pleasure meeting all the BUGS attendees. 

Adie_efc
Calcite | Level 5

Hi Sanjay

Im using 9.3 and using the scatterplot/markerchar. however it doesnt give me the option to use a vertical bar "|", only the ones in the standard ones.

unless Im doing something wrong with my scatter?

scatterplot x=_x y=_cens / markerattrs=(symbol=plus) GROUP=signvar  ;

Thanks

Adie

Adie_efc
Calcite | Level 5

after all this...my boss has changed his mind and the "plus" is now acceptable!

Thanks anyway!

Jay54
Meteorite | Level 14

OK.  But if you still need to do something similar later, here is what you do.  First, add a new column (censor) to your data and populate it with the character(s) you want to display in the graph.. In this case, put a "|" where ever you want the display the censor observation.  Then use the scatterplot with same X and Y variables and the option markercharacter=censor.  Keep the length of this variable (or format) as small as possible to avoid any leading blanks.

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 6 replies
  • 1573 views
  • 0 likes
  • 3 in conversation