Re: Need modern version of old technique to show missing values
- From: George White <aa056@xxxxxxxxxxxxxx>
- Date: Wed, 7 Jan 2009 18:34:38 -0400
On Wed, 7 Jan 2009, JB wrote:
On 2009-01-07, Terence <tbwright@xxxxxxxxx> wrote:I am rewriting the BMD program set (groans).
I have a master menu program that shows all the classes of programs by
pages and allows selection of any program out a class, to be executed
as a daughter program, returning to the menu program, and potentially
(well, the tests work) can call any selected BMD program and locate
and open appropriately, all the files each program will or might use
and open them as formatted or unformatted as required.
Personally, for interactive statistics work I really like R.
BUT: several programs specialise in statistics for incomplete data
("missing values").
The above-mentioned R has the symbol "NA" to indicate missing values,
distinguished from the usual IEEE754 floating point special values
such as Inf and NaN. Though I have to admit I don't know the low level
implementation of this.
If you have installed R, then
R/doc/manual/R-lang.html#NA-handling
and also
http://web.nps.navy.mil/~buttrey/S/missings.html
discuss the semantics of NA, but you have to read the sources for implementation details. NA processing has certainly been a big
effort for the R developers, so it is worth looking at how they
did it.
I haven't been keeping up, but the original implementation relied on
checking for a specific "reserved" value.
[...]
I suspect that inventing your own floating point format will not be
met with universal applause. Perhaps you can instead reuse one of the
IEEE754 special values to also mean missing? Or maybe keep track of
missing values in a separate data structure?
Even if the OP doesn't care what others think, there are advantages to
being able to dump raw data and load them in to some other software
for testing, visualizations, etc.
The separate data structure approach has the advantage that you can
have more than one kind of NA (e.g., "no measurement made" vs "recorded
value out of range", etc.).
And I don't want the program to crash or have to trap conversion
errors via a program interrupt.
Since it's your project, you just have to program it such that missing
or invalid values don't cause a crash, then.
(i.e. I need F66/F77 methods so ai
have one set of Fortran source for any compiler and target computers;
one quarter to one half of which are AT/386/486 level)
Why can't those computers run modern compilers (gfortran or g95)?
?? Sounds like an awful lot of low level system dependent code.
One more question:
Is the matrix MAT1(20,30) equivalent to MAT2 (20,30,1) ?
The memory for the actual data, yes, but the descriptors the compiler
creates will be different. But the memory layout is essentially what
matters if you limit yourself to F77 and implicit interfaces (meaning
that when you pass an array argument, you are in practice passing the
address of the first element). Some compilers might be clever enough
to detect the interface mismatch and complain, though. Again, with a
newer standard you could use the RESHAPE intrinsic to do this in a
standard conforming way.
--
George White <aa056@xxxxxxxxxxxxxx> <gnw3@xxxxxxx>
189 Parklea Dr., Head of St. Margarets Bay, Nova Scotia B3Z 2G6
.
- Follow-Ups:
- Re: Need modern version of old technique to show missing values
- From: David Duffy
- Re: Need modern version of old technique to show missing values
- References:
- Prev by Date: Re: Undefined Reference on Compile
- Next by Date: Re: Need modern version of old technique to show missing values
- 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):
Loading