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 ;
The Boston Area SAS Users Group (BASUG) is hosting our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at https://www.basug.org/events.

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 ;
The Boston Area SAS Users Group (BASUG) is hosting our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at https://www.basug.org/events.
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...

 

 

 

The Boston Area SAS Users Group (BASUG) is hosting our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at https://www.basug.org/events.
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.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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