Estimates the mode of the posterior, by calculating the density of posterior samples and choosing x-value with the maximum y-value.

estMode(x, na.rm = F)

Arguments

x

numeric vector

Author

Kevin See

Examples

estMode(rgamma(1000, 5, 1/6))
#> [1] 23.24903