Return the posterior mode of a vector.

posterior_mode(x)

Arguments

x

A vector

Value

A scalar with same type as `x`.

Examples

posterior_mode(sample(1:3, 20, replace = TRUE))
#> [1] 1