SAS error using %cif macro

Accepted Solution Solved
Reply
Contributor
Posts: 26
Accepted Solution

SAS error using %cif macro

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.


Accepted Solutions
Solution
‎12-19-2016 05:32 AM
Super User
Posts: 19,772

Re: SAS error using %cif macro

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

View solution in original post


All Replies
Solution
‎12-19-2016 05:32 AM
Super User
Posts: 19,772

Re: SAS error using %cif macro

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

Contributor
Posts: 26

Re: SAS error using %cif macro

Thank you, this worked well for my purposes.
SAS Super FREQ
Posts: 3,752

Re: SAS error using %cif macro

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. 

 

 

 

 

Contributor
Posts: 26

Re: SAS error using %cif 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

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 323 views
  • 0 likes
  • 3 in conversation