These functions return the mode of the main probability distributions implemented in R.
distrMode(x, ...)betaMode(shape1, shape2, ncp = 0)
cauchyMode(location = 0, ...)
chisqMode(df, ncp = 0)
dagumMode(scale = 1, shape1.a, shape2.p)
expMode(...)
fMode(df1, df2)
fiskMode(scale = 1, shape1.a)
frechetMode(location = 0, scale = 1, shape = 1, ...)
gammaMode(shape, rate = 1, scale = 1/rate)
normMode(mean = 0, ...)
gevMode(location = 0, scale = 1, shape = 0, ...)
ghMode(alpha = 1, beta = 0, delta = 1, mu = 0, lambda = -1/2)
ghtMode(beta = 0.1, delta = 1, mu = 0, nu = 10)
gldMode(lambda1 = 0, lambda2 = -1, lambda3 = -1/8, lambda4 = -1/8)
gompertzMode(scale = 1, shape)
gpdMode(location = 0, scale = 1, shape = 0)
gumbelMode(location = 0, ...)
hypMode(alpha = 1, beta = 0, delta = 1, mu = 0, pm = c(1, 2, 3, 4))
koenkerMode(location = 0, ...)
kumarMode(shape1, shape2)
laplaceMode(location = 0, ...)
logisMode(location = 0, ...)
lnormMode(meanlog = 0, sdlog = 1)
lomaxMode(...)
maxwellMode(rate)
mvnormMode(mean, ...)
nakaMode(scale = 1, shape)
nigMode(alpha = 1, beta = 0, delta = 1, mu = 0)
paralogisticMode(scale = 1, shape1.a)
paretoMode(scale = 1, ...)
rayleighMode(scale = 1)
stableMode(alpha, beta, gamma = 1, delta = 0, pm = 0, ...)
stableMode2(loc, disp, skew, tail)
tMode(df, ncp)
unifMode(min = 0, max = 1)
weibullMode(shape, scale = 1)
yulesMode(...)
bernMode(prob)
binomMode(size, prob)
geomMode(...)
hyperMode(m, n, k, ...)
nbinomMode(size, prob, mu)
poisMode(lambda)
character. The name of the distribution to consider.
Additional parameters.
non-negative parameters of the Beta distribution.
non-negative parameters of the Beta distribution.
non-centrality parameter.
location and scale parameters.
degrees of freedom (non-negative, but can be non-integer).
location and scale parameters.
shape parameters.
shape parameters.
degrees of freedom. Inf
is allowed.
degrees of freedom. Inf
is allowed.
the location parameter \(a\), scale parameter \(b\), and shape parameter \(s\).
vector of rates.
vector of means.
shape parameter alpha
;
skewness parameter beta
, abs(beta)
is in the
range (0, alpha);
scale parameter delta
, delta
must be zero or
positive;
location parameter mu
, by default 0.
These is the meaning of the parameters in the first
parameterization pm=1
which is the default
parameterization selection.
In the second parameterization, pm=2
alpha
and beta
take the meaning of the shape parameters
(usually named) zeta
and rho
.
In the third parameterization, pm=3
alpha
and beta
take the meaning of the shape parameters
(usually named) xi
and chi
.
In the fourth parameterization, pm=4
alpha
and beta
take the meaning of the shape parameters
(usually named) a.bar
and b.bar
.
shape parameter alpha
;
skewness parameter beta
, abs(beta)
is in the
range (0, alpha);
scale parameter delta
, delta
must be zero or
positive;
location parameter mu
, by default 0.
These is the meaning of the parameters in the first
parameterization pm=1
which is the default
parameterization selection.
In the second parameterization, pm=2
alpha
and beta
take the meaning of the shape parameters
(usually named) zeta
and rho
.
In the third parameterization, pm=3
alpha
and beta
take the meaning of the shape parameters
(usually named) xi
and chi
.
In the fourth parameterization, pm=4
alpha
and beta
take the meaning of the shape parameters
(usually named) a.bar
and b.bar
.
shape parameter alpha
;
skewness parameter beta
, abs(beta)
is in the
range (0, alpha);
scale parameter delta
, delta
must be zero or
positive;
location parameter mu
, by default 0.
These is the meaning of the parameters in the first
parameterization pm=1
which is the default
parameterization selection.
In the second parameterization, pm=2
alpha
and beta
take the meaning of the shape parameters
(usually named) zeta
and rho
.
In the third parameterization, pm=3
alpha
and beta
take the meaning of the shape parameters
(usually named) xi
and chi
.
In the fourth parameterization, pm=4
alpha
and beta
take the meaning of the shape parameters
(usually named) a.bar
and b.bar
.
shape parameter alpha
;
skewness parameter beta
, abs(beta)
is in the
range (0, alpha);
scale parameter delta
, delta
must be zero or
positive;
location parameter mu
, by default 0.
These is the meaning of the parameters in the first
parameterization pm=1
which is the default
parameterization selection.
In the second parameterization, pm=2
alpha
and beta
take the meaning of the shape parameters
(usually named) zeta
and rho
.
In the third parameterization, pm=3
alpha
and beta
take the meaning of the shape parameters
(usually named) xi
and chi
.
In the fourth parameterization, pm=4
alpha
and beta
take the meaning of the shape parameters
(usually named) a.bar
and b.bar
.
shape parameter alpha
;
skewness parameter beta
, abs(beta)
is in the
range (0, alpha);
scale parameter delta
, delta
must be zero or
positive;
location parameter mu
, by default 0.
These is the meaning of the parameters in the first
parameterization pm=1
which is the default
parameterization selection.
In the second parameterization, pm=2
alpha
and beta
take the meaning of the shape parameters
(usually named) zeta
and rho
.
In the third parameterization, pm=3
alpha
and beta
take the meaning of the shape parameters
(usually named) xi
and chi
.
In the fourth parameterization, pm=4
alpha
and beta
take the meaning of the shape parameters
(usually named) a.bar
and b.bar
.
a numeric value, the number of degrees of freedom.
Note, alpha
takes the limit of abs(beta)
,
and lambda=-nu/2
.
are numeric values where
lambda1
is the location parameter,
lambda2
is the location parameter,
lambda3
is the first shape parameter, and
lambda4
is the second shape parameter.
are numeric values where
lambda1
is the location parameter,
lambda2
is the location parameter,
lambda3
is the first shape parameter, and
lambda4
is the second shape parameter.
are numeric values where
lambda1
is the location parameter,
lambda2
is the location parameter,
lambda3
is the first shape parameter, and
lambda4
is the second shape parameter.
are numeric values where
lambda1
is the location parameter,
lambda2
is the location parameter,
lambda3
is the first shape parameter, and
lambda4
is the second shape parameter.
an integer value between 1
and 4
for the
selection of the parameterization. The default takes the
first parameterization.
mean and standard deviation of the distribution
on the log scale with default values of 0
and 1
respectively.
mean and standard deviation of the distribution
on the log scale with default values of 0
and 1
respectively.
value of the index parameter alpha
in the interval= \((0, 2]\);
skewness parameter beta
, in the range \([-1, 1]\);
scale parameter gamma
; and location (or ‘shift’)
parameter delta
.
vector of (real) location parameters.
vector of (positive) dispersion parameters.
vector of skewness parameters (in [-1,1]).
vector of parameters (in [1,2]) related to the tail thickness.
lower and upper limits of the distribution. Must be finite.
lower and upper limits of the distribution. Must be finite.
Probability of success on each trial.
number of trials (zero or more).
the number of white balls in the urn.
number of observations. If length(n) > 1
, the length
is taken to be the number required.
the number of balls drawn from the urn.
A numeric value is returned, the (true) mode of the distribution.
mlv
for the estimation of the mode;
the documentation of the related distributions
Beta
, GammaDist
, etc.
# NOT RUN {
## 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(stats::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)
curve(VGAM::dpareto(x, scale = 1, shape = 1), xlim = c(0, 10))
abline(v = paretoMode(scale = 1), col = 2)
## Poisson distribution
poisMode(lambda = 6)
poisMode(lambda = 6.1)
mlv("poisson", lambda = 6.1)
# }
Run the code above in your browser using DataLab