Iam trying to run a %cif macro but I am getting the following error:
ERROR: (execution) Invalid argument to function.
count : number of occurrences is 2
operation : EXP at line 1436 column 1
operands : _TEM1008
_TEM1008 7851 rows 1 col (numeric)
statement : ASSIGN at line 1436 column 1
I have only been using SAS for a few months, so would be grateful is someone could point me in the right direction.
If you have SAS 9.4 you can use PROC phreg for competing risks.
If you have SAS 9.4 you can use PROC phreg for competing risks.
I recognize that error message as being the error that occurs in SAS/IML when you try to exponentiate a number that is greater than 709. See the second code snippet in the article "Constants in SAS" and the ERROR message that follow the code.
The solution, therefore, is to understand why your data and model are producing such large values.
I can think of two solutions, but both require familiarity with PROC IML. I am not familiar with the %CIF macro, but if you look in the source code you shouldl see a PROC IML step that contains a call to the EXP function. You can try to (1) identify the bad data values, or (2) use the method in the blog post to trap/handle the bad values, which would result in missing values in the model. Attempting (2) might result in further problems in the macro, so (1) seems like your best bet, if you are willing to edit the macro.
Dear Rick,
Thank you for your reply. I understand what you are saying, but unfortunately I don't have the level of familiarity with proc IML to carry it out. Thank you none the less.
Kind regards,
Dani
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.