## Continuous distributions
# Beta
betaMode(shape1, shape2, ncp = 0)
# Cauchy
cauchyMode(location = 0, ...)
# Chisquare
chisqMode(df, ncp = 0)
# Exponentiel
expMode(...)
# F
fMode(df1, df2)
# Fisk (package 'VGAM')
fiskMode(shape1.a, scale = 1)
# Frechet (package 'evd')
frechetMode(loc = 0, scale = 1, shape = 1, ...)
# Gamma
gammaMode(shape, rate = 1, scale = 1/rate)
# Normal (Gaussian)
normMode(mean = 0, ...)
# Generalised Extreme Value (package 'evd')
gevMode(loc = 0, scale = 1, shape = 0, ...)
# Generalised Hyperbolic (package 'fBasics')
ghMode(alpha = 1, beta = 0, delta = 1, mu = 0,
lambda = 1, ...)
# Gompertz (package 'VGAM')
gompertzMode(shape, scale = 1)
# Generalised Pareto (package 'evd')
gpdMode(loc = 0, scale = 1, shape = 0, ...)
# Gumbel (package 'evd')
gumbelMode(loc = 0, ...)
# Hyperbolic (package 'fBasics')
hypMode(alpha = 1, beta = 0, delta = 1, mu = 0,
pm = c(1, 2, 3, 4))
# Koenker (package 'VGAM')
koenkerMode(location = 0, ...)
# Kumaraswamy (package 'VGAM')
kumarMode(shape1, shape2)
# Laplace (package 'VGAM')
laplaceMode(location = 0, ...)
# Logistic
logisMode(location = 0, ...)
# Lognormal
lnormMode(meanlog = 0, sdlog = 1)
# Normal Inverse Gaussian (package 'fBasics')
nigMode(alpha = 1, beta = 0, delta = 1, mu = 0, ...)
# Stable (package 'fBasics')
stableMode(alpha, beta, gamma = 1, delta = 0, pm = 0, ...)
# Negative Weibull (package 'evd')
rweibullMode(loc = 0, scale = 1, shape = 1, ...)
# T (Student)
tMode(df, ncp = 0)
# Uniform
unifMode(min = 0, max = 1)
# Weibull
weibullMode(shape, scale = 1, ...)
## Discrete distributions
# Bernoulli
bernMode(prob)
# Binomial
binomMode(size, prob)
# Geometric
geomMode(...)
# Hypergeometric
hyperMode(m, n, k, ...)
# Negative Binomial
nbinomMode(size, prob, mu)
# Poisson
poisMode(lambda)mlv for the estimation of the mode;
the documentation of the related distributions Beta, GammaDist, etc.layout(mat = matrix(1:2,1,2))
## Beta distribution
curve(dbeta(x, shape1 = 2, shape2 = 3.1), xlim = c(0,1), ylab = "Beta density")
M <- betaMode(shape1 = 2, shape2 = 3.1)
abline(v = M, col = 2)
mlv("beta", shape1 = 2, shape2 = 3.1)
## Lognormal distribution
curve(dlnorm(x, meanlog = 3, sdlog = 1.1), xlim = c(0, 10), ylab = "Lognormal density")
M <- lnormMode(meanlog = 3, sdlog = 1.1)
abline(v = M, col = 2)
mlv("lnorm", meanlog = 3, sdlog = 1.1)
## Poisson distribution
poisMode(lambda = 6)
poisMode(lambda = 6.1)
mlv("poisson", lambda = 6.1)
layout(mat = matrix(1,1,1))Run the code above in your browser using DataLab