Re: Function names (was mean and sdev) [message #11050 is a reply to message #11041] |
Wed, 04 March 1998 00:00   |
Kevin Spencer
Messages: 1 Registered: March 1998
|
Junior Member |
|
|
Brian Jackel <jackel@danlon.physics.uwo.ca> wrote in article
<6dhu2f$eoi@ds2.acs.ucalgary.ca>...
> Dr. G. Scott Lett wrote:
>>
>> The MOMENT function is obscure and slow when all you need is
>> the mean and standard deviation, so we're adding the more obvious
>> MEAN, STDDEV, VARIANCE and other statistics functions for IDL 5.1.
>>
>> Best wishes,
>> Scott Lett
>
> I'm not sure who the "we" above refers to, but I'd like to
> make a general comment. IMHO IDL is already dangerously
> cluttered with lots of special purpose functions that could
> perhaps be more usefully bundled together. In the case of
> statistics it would be better to have a function like MOMENTS
> that could return any or all required moments. Even better
> would be something (perhaps called STATISTICS) that could
> provide a number of useful quantities. Although the use
> of square brackets should eliminate the confusion between
> functions and arrays, the proliferation of built-in functions
> (especially with common names) may cause problems if the
> name has been used for existing code.
>
> Does anyone else have an opinion on this subject?
I've been very annoyed at RSI's inconsistent support for these
simple statistical functions. There used to be a "stdev" procedure,
then (if I recall correctly) one like it with a similar name. In IDL 5,
they got rid of these functions and replaced them with "moment".
Now according to Scott Lett, who I assume works for RSI, they
are going to have another standard deviation procedure, plus one
for computing the mean and another for the variance. Why did
they get rid of stdev in the first place? And calculating the mean
is trivial; just use total(x)/n_elements(x). A separate function for
computing variance is likewise trivial and unnecessary, if there's
a function for computing the standard deviation.
Kevin
***************************************************
Kevin Spencer
Cognitive Psychophysiology Laboratory
Dept. of Psychology and Beckman Institute
University of Illinois at Urbana-Champaign
kspence1@uiuc.edu
***************************************************
|
|
|