| estimate_mode | R Documentation |
Estimate the mode of a numeric distribution using kernel density estimation.
estimate_mode(x, na_rm = TRUE, ...)
x |
Numeric vector. |
na_rm |
Logical value. If |
... |
Further arguments passed to |
The function computes a kernel density estimate with stats::density()
and returns the value of x at which the estimated density is largest.
Missing values are removed by default. Additional arguments are passed to
stats::density(), for example bw, kernel, or n.
A numeric value giving the estimated mode of the distribution.
Other data analysis:
acf_vec(),
estimate_acf(),
estimate_kurtosis(),
estimate_pacf(),
estimate_skewness(),
pacf_vec(),
summarise_data(),
summarise_split(),
summarise_stats()
x <- c(1, 1, 2, 2, 2, 3, 4, NA)
estimate_mode(x)
estimate_mode(x, na_rm = TRUE)
estimate_mode(x, bw = "nrd0")
set.seed(123)
y <- rnorm(100, mean = 5)
estimate_mode(y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.