BookmarkSubscribeRSS Feed
SeaMoon_168
Quartz | Level 8

Here is the sgplot SAS code

/*------------------------------------------------------------
  6) CIF plot + at-risk table BELOW
------------------------------------------------------------*/
proc sgplot data=cif_plot noborder;
  step x=stop y=cuminc / group=Cat lineattrs=(thickness=2);

  xaxistable n_at_risk /
      x=stop
      class=Cat
      location=outside
      title="Number at Risk"
/*      separator=none*/
      valueattrs=(size=9)
      labelattrs=(size=9);

  xaxis label="Time (Days)" values=(0 365 730 1095);
  yaxis label="Cumulative Incidence ";

  keylegend / title=" ";
  title "Cumulative Incidence ";
  format Cat DiseaseGroup.;
run;

Here is the CIF curves

SeaMoon_168_0-1771467382864.png

 

5 REPLIES 5
Tom
Super User Tom
Super User

XAXISTABLE does not do that when I run the example from the documentation.

proc sgplot data=sashelp.class (where=(age < 13));
scatter x=name y=height;
xaxistable age / class=age title="Student Age" location=inside 
      valueattrs=(color=red) 
      labelattrs=(color=red)
      titleattrs=(color=red);
xaxistable weight height / valueattrs=(color=blue);
run;

Are you using some nonstandard template or style?

Can you share an actual reproducible example?  We don't have your CIF_PLOT dataset.

Ksharp
Super User
Can you post the dataset you used to PROC SGPLOT ? So we can replicate this issue.
SeaMoon_168
Quartz | Level 8
Thanks but I cannot release the data. I used R to fix the issue.
Tom
Super User Tom
Super User

@SeaMoon_168 wrote:
Thanks but I cannot release the data. I used R to fix the issue.

No need to share the actual data.  Just some combination of data and code that can be used to replicate the issue.  

SeaMoon_168
Quartz | Level 8
Thanks but I cannot release the data. I used R to create the curves instead.

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand in the Innovate Hub.

Watch 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
  • 5 replies
  • 533 views
  • 2 likes
  • 3 in conversation