BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Dani08
Obsidian | Level 7

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

If you have SAS 9.4 you can use PROC phreg for competing risks. 

View solution in original post

4 REPLIES 4
Reeza
Super User

If you have SAS 9.4 you can use PROC phreg for competing risks. 

Dani08
Obsidian | Level 7
Thank you, this worked well for my purposes.
Rick_SAS
SAS Super FREQ

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. 

 

 

 

 

Dani08
Obsidian | Level 7

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 4 replies
  • 898 views
  • 0 likes
  • 3 in conversation