Re: Need modern version of old technique to show missing values
- From: dpb <bozarth.d@xxxxxxxxx>
- Date: Wed, 7 Jan 2009 11:57:16 -0800 (PST)
On Jan 6, 11:02 pm, Terence <tbwri...@xxxxxxxxx> wrote:
....
BUT: several programs specialise in statistics for incomplete data....
("missing values").
Now: an ascii or formatted file record can be checked in each field
for "just blanks" to indicate the value is unknown.
So here I interpose a read of a character string and then process it
for "blank" fields before extracting values. But not so, in general
today, when reading binary files or unformatted file records.
In what I now have to call "the old days", you could have a positive
zero for a real value of zero and a negative real zero to indicate
this "missing value". These BMD programs utilized that trick.
Can someone suggest me, a way of coding a binary representation of a
floating-point field in such a way as I can detect that this value is
to indicate "not known", without confusing the arithmetic of the
statistics?
Obviously any user "today" will have to be able to easily produce his
data with this interior coding.
I need a coding method such that a simple test can decide if this
really is a floating point value or else the signal that the value is
"missing".
For the internal representation you'll have to pick a convention that
suits.
Just a couple of thoughts on the user input for missing data--
SAS uses just a "." in the field for free format, either blank/empty
field or the dot in fixed format fields.
Matlab uses NaN but propogates NaN unless coded to exclude them. It
accepts the string "NaN" in numeric input.
I've not tested w/ a compiler and the LRF manual I have at hand
doesn't seem to specifically indicate whether Fortran input requires
keeping the minus for formatted input of "-0.0"???
If it did, that would probably be the simplest to code but I
personally like the appearance of the "." (but I'm conditioned w/ 20
years of exposure to SAS starting almost 40 years ago).
FWIW (which may be even less than paid :) )...
--
--
.
- References:
- Prev by Date: Re: getting offset of allocatable derived types
- Next by Date: Re: ISO_C_BINDING, return a char* from C
- Previous by thread: Re: Need modern version of old technique to show missing values
- Next by thread: Re: Need modern version of old technique to show missing values
- Index(es):
Relevant Pages
|