Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- Base SAS Programming
- /
- Floating Point Overflow error in proc reliability

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-17-2009 11:50 AM

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.

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-17-2009 12:07 PM

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-17-2009 12:22 PM

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.

How can we use the LENGTH statement in SAS numeric variables to avoid this floating point error.

Thanks for helping.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-17-2009 01:08 PM

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.

e.g.

data data_for_analysis;

length analysis_variable 10;

set input_data;

run;

You must put the length statement before the set statement.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-17-2009 04:19 PM

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.

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-18-2009 07:50 AM

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

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

Cheers

Peter