estimate_mode {MSMU} | R Documentation |
Estimate Mode using Density function to find Mode of continuous data
Description
Estimates the mode of a numeric vector by identifying the value corresponding to the peak of its estimated probability density function.
Usage
estimate_mode(x)
Arguments
x |
A numeric vector. Missing values ( |
Value
A single numeric value representing the estimated mode.
Examples
# Estimate the mode of continuous random data
set.seed(123)
x <- rnorm(1000, mean=5, sd=2)
estimate_mode(x)
# Estimate the mode of miles-per-gallon (mpg) in the mtcars dataset
data("mtcars")
estimate_mode(mtcars$mpg)
[Package MSMU version 0.1.2 Index]