Description Usage Arguments Value Note Author(s) See Also Examples
These functions return the mode of the main probability distributions implemented in R.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | 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)
|
x |
character. The name of the distribution to consider. |
... |
Additional parameters. |
shape1 |
non-negative parameters of the Beta distribution. |
shape2 |
non-negative parameters of the Beta distribution. |
ncp |
non-centrality parameter. |
location |
location and scale parameters. |
df |
degrees of freedom (non-negative, but can be non-integer). |
scale |
location and scale parameters. |
shape1.a |
shape parameters. |
shape2.p |
shape parameters. |
df1 |
degrees of freedom. |
df2 |
degrees of freedom. |
shape |
the location parameter a, scale parameter b, and shape parameter s. |
rate |
vector of rates. |
mean |
vector of means. |
alpha |
shape parameter |
beta |
shape parameter |
delta |
shape parameter |
mu |
shape parameter |
lambda |
shape parameter |
nu |
a numeric value, the number of degrees of freedom.
Note, |
lambda1 |
are numeric values where
|
lambda2 |
are numeric values where
|
lambda3 |
are numeric values where
|
lambda4 |
are numeric values where
|
pm |
an integer value between |
meanlog |
mean and standard deviation of the distribution
on the log scale with default values of |
sdlog |
mean and standard deviation of the distribution
on the log scale with default values of |
gamma |
value of the index parameter |
loc |
vector of (real) location parameters. |
disp |
vector of (positive) dispersion parameters. |
skew |
vector of skewness parameters (in [-1,1]). |
tail |
vector of parameters (in [1,2]) related to the tail thickness. |
min |
lower and upper limits of the distribution. Must be finite. |
max |
lower and upper limits of the distribution. Must be finite. |
prob |
Probability of success on each trial. |
size |
number of trials (zero or more). |
m |
the number of white balls in the urn. |
n |
number of observations. If |
k |
the number of balls drawn from the urn. |
A numeric value is returned, the (true) mode of the distribution.
Some functions like normMode or cauchyMode, which relate
to symmetric distributions, are trivial, but are implemented for the sake of
exhaustivity.
ghMode and ghtMode are from
package fBasics;
hypMode was written by David Scott;
gldMode, nigMode and
stableMode were written by Diethelm Wuertz.
mlv for the estimation of the mode;
the documentation of the related distributions
Beta, GammaDist, etc.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.