Mode of a distribution
| aperson | August 19, 2010 - 13:46 | ||
|---|---|---|---|
|
I am trying to find the mode of various distributions contained in waves (as in, the most frequently occurring value). I don't see that there is an obvious command in Igor Pro 5.05A to find this but maybe I'm missing it. Is there any way to find the mode easily within Igor? Thanks! |
|||

Joined: 2007-09-19
Location: Germany
Could you calculate a
Histogramand then look for the maximum withWaveStats?Beside the command line both operations can be accessed via Igor's Analysis menu.
A.
Joined: 2008-05-12
Location: United States
I suppose that's a decent enough work around. Thanks!
Joined: 2008-02-22
Location: United States
A neat stats trick is to use something called the "shorth":
DF Andrews, “Robust Estimates of Location.” Princeton University Press (1972).
This can be implemented in Igor as follows:
Alpha=0.5 is the typical choice. This code then finds the mean of the data in the shortest interval that contains half the data. So it is robust against modes that are not the main mode. This does not return the mode per se, but it is an estimator that asymptotically approaches the mode, and summarizes the data a little bit more cleanly in my opinion.
Rick
Joined: 2008-05-12
Location: United States
I will give this a shot too. Thank you.