[R] mode

Murray Jorgensen maj at stats.waikato.ac.nz
Fri Dec 12 04:39:42 CET 2003


Opps! This is what I should have written:

The mode of a data vector x might be defined as the limit of m_p as p 
tends to zero from above and where m_p is the m minimizing
sum(abs(x - m)^p).  I would not expect the mode so defined to be of much 
use in data analysis, nor would it be easy to compute.

Murray

[Thanks to Duncan Murdoch for noticing the missing ^p .]

Douglas Bates wrote:

> "Christian Mora" <christian_mora at vtr.net> writes:
> 
> 
>>How can I get the mode (most frequent value) from a dataset (continuos
>>variables)? I can obtain it when the data is discrete (by making a table
>>and looking at the higher frequency) but I don't know how obtain it
>>from, for example, a density plot of the data. Does anyone know how to
>>do it? Thanks
> 
> 
> I don't think the mode of a sample from a continuous random variable is well
> defined.
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> 
> 

-- 
Dr Murray Jorgensen      http://www.stats.waikato.ac.nz/Staff/maj.html
Department of Statistics, University of Waikato, Hamilton, New Zealand
Email: maj at waikato.ac.nz                                Fax 7 838 4155
Phone  +64 7 838 4773 wk    +64 7 849 6486 home    Mobile 021 1395 862




More information about the R-help mailing list