DATA Step, Macro, Functions and more

Floating Point Overflow error in proc reliability

Reply
N/A
Posts: 0

Floating Point Overflow error in proc reliability

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.
N/A
Posts: 0

Re: Floating Point Overflow error in proc reliability

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.
N/A
Posts: 0

Re: Floating Point Overflow error in proc reliability

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.
N/A
Posts: 0

Re: Floating Point Overflow error in proc reliability

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.
Trusted Advisor
Posts: 2,113

Re: Floating Point Overflow error in proc reliability

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.
N/A
Posts: 0

Re: Floating Point Overflow error in proc reliability

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
Ask a Question
Discussion stats
  • 5 replies
  • 218 views
  • 0 likes
  • 2 in conversation