From: Robert Feyerharm on 23 Dec 2009 15:52 Going into rant mode... I discovered a feature of SAS that I wish I had known earlier: SAS will assign a value of *negative infinity* to missing numerical values in logical statements. So in the following code: if birth_weight<2500 then low_birth_weight=1; else if birth_weight>=2500 then low_birth_weight=0; SAS will assign all missing values (birth_weight=.) to the category low_birth_weight=1, since negative infinity is less than 2500. Why SAS programmers settled on this convention I don't know. Wouldn't it make more sense if birth_weight=., then low_birth_weight=.? At any rate, the good news is that it's easy to correct the above code: if 0<birth_weight<2500 then low_birth_weight=1; else if birth_weight>=2500 then low_birth_weight=0; Robert Feyerharm Oklahoma State Department of Health
|
Pages: 1 Prev: Pega PRPC with CPM -- NJ,IL,PA Next: scientific notation |