Others showed you how to find the mode in a dataset, I just want to point out 
that if your data is from a continuous distribution (or near continuous), then 
the mode of the data is more likely to be the result of a quirk of rounding 
than representative of anything useful.  If the data is discrete, then the mode 
of the data may be meaningful, but looking at the entire table of frequencies, 
or a plot of them, will give you the mode information along with additional 
information that may help determine if that mode value is meaningful.

If you really want to make inference about the mode of a continuous 
distribution then you should either use something like fitdistr (from the MASS 
package) to fit the data to a specific distribution, then use the 
theory/likelihood of that distribution to find the mode, or use the density 
function or the logspline package to fit a density to the data (less dependent 
upon assumptions about the distribution) and look at the mode(s) from those 
estimates.

Hope this helps,

--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111



> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Carlos Morales
> Sent: Saturday, September 06, 2008 11:24 AM
> To: r-help@r-project.org
> Subject: [R] Mode value
>
> Hello everyone,
>
>
> I would like to know if there is any function to calculate
> the mode value, or I have to build one to do it.
>
>
> Thanks so much
> Carlos
>
>
>
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to