BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
sah_biostat
Fluorite | Level 6

Hello Team,

 

I am deriving one variable with exponential operator and receiving this note.How can we rectify this ?

data lb;
set _lb;
GFR_CKEPI = 101 * min((LBSTRESN/kappa),1)**alpha * max((LBSTRESN/kappa),1)** -1*(3.209) * 0.88**AgeAtLB * SEX_factor2 * RACEO; 
run; 
1 ACCEPTED SOLUTION

Accepted Solutions
Quentin
Super User

Do you maybe have 0**0 or an overflow problem? They would both cause that note.

 

1    data _null_ ;
2      x=0**0 ;
NOTE: Invalid argument(s) to the exponential operator "**".
3    run ;


4
5    data _null_ ;
6      x=2**10000 ;
NOTE: Invalid argument(s) to the exponential operator "**".
7    run ;

View solution in original post

6 REPLIES 6
Quentin
Super User

Do you maybe have 0**0 or an overflow problem? They would both cause that note.

 

1    data _null_ ;
2      x=0**0 ;
NOTE: Invalid argument(s) to the exponential operator "**".
3    run ;


4
5    data _null_ ;
6      x=2**10000 ;
NOTE: Invalid argument(s) to the exponential operator "**".
7    run ;
sah_biostat
Fluorite | Level 6

I guess this is due to big constant number.Can we rectify this?

Quentin
Super User

There is a limit on the largest integer, that varies by OS:

 

13   data _null_ ;
14     x=constant('big') ;
15     put x= ;
16   run ;

x=1.797693E308

If your number is bigger that, I think you're out of luck.  See e.g.:

https://documentation.sas.com/doc/en/lrcon/9.4/p0ji1unv6thm0dn1gp4t01a1u0g6.htm

https://communities.sas.com/t5/SAS-Programming/quot-Largest-Integer-Represented-Exactly-quot-NOT-Exa...

 

 

 

PaigeMiller
Diamond | Level 26

@sah_biostat wrote:

 

I am deriving one variable with exponential operator and receiving this note.How can we rectify this ?

data lb;
set _lb;
GFR_CKEPI = 101 * min((LBSTRESN/kappa),1)**alpha * max((LBSTRESN/kappa),1)** -1*(3.209) * 0.88**AgeAtLB * SEX_factor2 * RACEO; 
run; 

Please, from now on when you have errors in the log, show us the ENTIRE log for this step (DATA step or PROC).

--
Paige Miller
ballardw
Super User

What do your values of ALPHA look like?

 

Did you generate this equation with a SAS model procedure? If so, maybe this could be done as scoring data using the information from the model.

s_lassen
Meteorite | Level 14

You most probably have an overflow error. The actual final value may not overflow, though.

 

One possibility is to calculate the logarithm of what you want first:

log_GFR_CKEPI = log(101) +log(min((LBSTRESN/kappa),1))*alpha -log(max((LBSTRESN/kappa),1))+log(3.209) +log(0.88)*AgeAtLB +log(SEX_factor2)+ log(RACEO);
GFR_CKEPI=exp(log_GFR_CKEPI);

 That way, you can do the calculation, even if there is an overflow along the way - you will then only get an error message from the EXP function if the final value overflows.

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
  • 6 replies
  • 2604 views
  • 3 likes
  • 5 in conversation