newbie MOMENT question [message #6567] |
Fri, 12 July 1996 00:00  |
demott
Messages: 8 Registered: June 1996
|
Junior Member |
|
|
Hi,
I want to compute the mean and variance of a set of data points, and
I'm using the MOMENT procedure to do it. With some fields, the
variance is quite small (i.e., o(e-03)), so I get floating point
underflow errors when MOMENT tries to compute the skewness and
kurtosis. since i don't really care about the skewness and kurtosis,
how can i get IDL to not worry about this, and continue with the
rest of the procedure? online help suggests that some combination
of ON_ERROR and/or CATCH would appropriate, but i haven't been
able to figure out exactly how to use these two yet. any suggestions?
thanks,
charlotte
|
|
|
Re: newbie MOMENT question [message #6647 is a reply to message #6567] |
Wed, 17 July 1996 00:00  |
wmc
Messages: 117 Registered: February 1995
|
Senior Member |
|
|
> Charlotte DeMott wrote:
>> I want to compute the mean and variance of a set of data points, and
>> I'm using the MOMENT procedure to do it. With some fields, the
>> variance is quite small (i.e., o(e-03)), so I get floating point
>> underflow errors when MOMENT tries to compute the skewness and
>> kurtosis. since i don't really care about the skewness and kurtosis,
>> how can i get IDL to not worry about this, and continue with the
>> rest of the procedure? online help suggests that some combination
>> of ON_ERROR and/or CATCH would appropriate, but i haven't been
>> able to figure out exactly how to use these two yet. any suggestions?
Actually, there is a built-in routine "stdev" that computes the standard
deviation. Its in the "obsolete" directory. Presumably it was put there on
the grounds that it isn't ;-)
Re the floating underflows, I have found this to be a problem elsewhere.
It seems to be impossible to prevent the error messages. I've mentioned this
to some IDL support people and they basically said "ah well..."
---
William M Connolley | wmc@bas.ac.uk | http://www.nbs.ac.uk/public/icd/wmc/
Climate Modeller, British Antarctic Survey | Disclaimer: I speak for myself
|
|
|