BookmarkSubscribeRSS Feed
kivey
Calcite | Level 5

I am running a marco that iterates through all variables in my dataset, and for each variable, runs a hpfmm procedure. The marco works perfectly until it reaches a variable for which there is a floating point error, in which case, the macro terminates

This is a snippet of my code and its associated error

 

proc hpfmm data = nf_allgpr_s4_div_ge3 seed=12345 ;
model gprPWY_5971_s4 = / kmin=1 kmax=3 dist=STUDENT ;
ods output ConvergenceStatus=myConvergenceStatus ;
run;

 

ERROR: Floating Point Overflow.

ERROR: Termination due to Floating Point Exception
NOTE: The SAS System stopped processing this step because of errors.

 

I have tried the above program with proc fmm, and get the same issue

 

My questions are 

  • How can I get SAS to stop producing the floating point error?
  • If that is not possible, how can I get my macro to continue to iterate to the next variable in my dataset, rather than terminating the program, when a floating point error arises?

Thank you so much for your input

1 REPLY 1
Rick_SAS
SAS Super FREQ

You should report the floating-point overflow to SAS technical support. Include the data for the gprPWY_5971_s4 variable and the information about your SAS version.

 

1. You can try rescaling the gprPWY_5971_s4 variable. Use PROC MEANS to see if that is a likely problem. Sometimes data that has extreme ranges (eg, a range of values such as [0, 1e9]) can lead to overflows. If the variable has a wide range, try using PROC STDIZE to rescale.

 

2. To skip the variable use the DROP statement in your macro:

proc hpfmm data = nf_allgpr_s4_div_ge3(DROP=gprPWY_5971_s4 ) ...

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1337 views
  • 0 likes
  • 2 in conversation