12-16-2016 06:25 AM
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.
12-16-2016 08:26 AM
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.
12-19-2016 05:30 AM
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.
Need further help from the community? Please ask a new question.