BookmarkSubscribeRSS Feed
deleted_user
Not applicable
We are getting the Floating Point Overflow error at the proc reliability data step.

We are getting the huge observations in SAS datastep, which is executed before the Proc reliability step.

Tried to make the data more dense by using length statement. But it is not working.

Could someone help us to fix the floating point overflow error in proc reliability datastep.

Thanks,
Sakthi.
5 REPLIES 5
deleted_user
Not applicable
It may just be me but would you not want to make the number 'less' dense by increasing the length? I assume you have the length statement before your set statement. I don't know anything about proc reliability but I would assume making a numeric variable large enough should remove the error.
deleted_user
Not applicable
Yes. I want to make the number 'less' dense by increasing the length.
How can we use the LENGTH statement in SAS numeric variables to avoid this floating point error.

Thanks for helping.
deleted_user
Not applicable
Without seeing your code I can't be too sure but basically you want to increase the length of the vairable you are analysing.

e.g.

data data_for_analysis;
length analysis_variable 10;
set input_data;
run;

You must put the length statement before the set statement.
Doc_Duke
Rhodochrosite | Level 12
A couple of comments:

PROC RELIABILITY doesn't have a data step, so you need to clarify whether your question is about the DATA step to construct the data for PROC RELIABILITY or the procedure itself.

I don't think that increasing the length of the variables in the DATA step is the answer. SAS stores the data in floating point, so whether you are using length 4 or 8, the same size number can be stored. The difference is in the precision and therefore the size of the maximum integer it can store precisely. The maximum storage length for a real number is 8 bytes.

SAS does all of the internal computation in its procedures using double precision arithmetic.

This sort of thing can happen when you have both extremely large numbers and extremely small ones in the same model (similar to a divide by 0 problem). You may need to rescale some of your variables.
deleted_user
Not applicable
Spot on Doc. I suppose as most of us never bother about the length or precision of numeric variables we never really consider what is actually going on in there. And hence the immediate thought is just to increase the length of the variable.

I had a good read through the documentation and my brian is numb but now better informed.

Cheers
Peter

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 5 replies
  • 964 views
  • 0 likes
  • 2 in conversation