BookmarkSubscribeRSS Feed
Fluorite | Level 6

Hi everyone,


I'm having a bit trouble with the %CIF macro. I can't change the title even though I'm doing it correct (I think).


This statement works fine:
%CIF (DATA=final, TIME=follow_up, STATUS=hypertension, EVENT=1, censored=0, GROUP=case);


When adding TITLE=xxxx, the title won't change, although the cumulative incidence figure looks like the above:

%CIF (DATA=final, TIME=follow_up, STATUS=hypertension, EVENT=1, censored=0, GROUP=case, TITLE=xxxx);


Hope, you guys can help!



Super User Tom
Super User

I think that the TITLE= parameter only applies to a limited part of the output.

    specifies the first title for the cumulative incidence function plot. Do not use quotation marks.

    specifies the second title for the cumulative incidence function plot. Do not use quotation marks.



But even for that it looks like the TITLE statements are using single quotes instead of double quotes.  You should report to SAS.

title '&title';
title2 '&title2';


Obsidian | Level 7

I just discovered the same problem, and it works just fine if you change those sinle quotes to double.


Previously I was using an older version of this macro I found online, and I didn't encounter the bug until I use the autocall version.


And I'm new here - where do I report this?

Fluorite | Level 6


After running the following command - this time with double quotes - the title stil wont change. Am I doing it wrong?


%CIF (DATA=final, TIME=follow_up, STATUS=hypertension, EVENT=1, censored=0, GROUP=case, TITLE="Survival data");


Super User
I believe you need to modify the actual macro code not the macro call. In the code change the single quotes to double quotes.
Super User Tom
Super User

On the old site the link was in the page footer.  On this new site click on the Contact link under the Connect column in the page footer. Then on that page click on the support link:


Super User

Not sure if this is useful, but If you have SAS 9.4 you can use Proc PHREG for Fine and Gray's Competing Risks model in SAS now.

Super User
Contact SAS tech support, open a track.
Obsidian | Level 7

I encountered a different problem with the %CIF macro.

The error occurs if the Cumulative Incidence Function (CIF) ever reaches 1.0, which can occur if there are no competing or censored events in one of the groups. The EXP() function generates an error because it may be given a value larger than IML can evaluate. This occurs in the following code when cifEST[cifloc,2] is very close to 1.0:

lowci[cifloc] = cifEST[cifloc, 2]##exp((-z*cifEST[cifloc, 3]) /(cifEST[cifloc,2]#LOG(cifEST[cifloc,2]))); 
upci[cifloc] = cifEST[cifloc, 2]##exp((z*cifEST[cifloc, 3]) /(cifEST[cifloc,2]#LOG(cifEST[cifloc,2])));



which occurs 3 times in the macro.


This error can be avoided by inserting a MIN() function to prevent an overly large number from being evaluated, as follows:

lowci[cifloc] = cifEST[cifloc, 2]##exp((-z*cifEST[cifloc, 3]) /min(9999999,cifEST[cifloc,2]#LOG(cifEST[cifloc,2]))); 
upci[cifloc] = cifEST[cifloc, 2]##exp((z*cifEST[cifloc, 3]) /min(9999999,cifEST[cifloc,2]#LOG(cifEST[cifloc,2]))); 

Divide by zero warning can also occur here, but those do not cause the macro to fail.


Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 8 replies
  • 4 in conversation