How to identify bad numerical data and filter them out?

Reply
Contributor
Posts: 30

How to identify bad numerical data and filter them out?

I have a dataset where some rows contain bad numerical fields which cause segmentation error when I do math operation on the variable. Does any one know how to identify them and filter them out so I can work on sound data? Thanks.

Jian

Super User
Posts: 17,890

Re: How to identify bad numerical data and filter them out?

More details Smiley Happy

What is "bad numerical field"?

What is "math operation"?

What is "segmentation error"?

Is this in IML? A data step, or specific proc?

Super User
Posts: 10,526

Re: How to identify bad numerical data and filter them out?

What kind of bad data? Examples of the code generating the errors would be helpful.

The general approach involves IF or Select statements

If the problem is divide by zero something like:

If X=0 then result=.;

Else result= var1 / x;

If values are too small or too large then similar syntax with a range check.

But could the issue be related to accessing an external database? Mostly I get errors about invalid opertions not segmentation errors.

Ask a Question
Discussion stats
  • 2 replies
  • 200 views
  • 0 likes
  • 3 in conversation