Lognormalb | R Documentation |
Density, distribution function, quantile function and random generation for a log normal distribution whose arithmetic mean equals to ‘mean’ and standard deviation equals to ‘sd’.
dlnormb(x, mean = exp(0.5), sd = sqrt(exp(2) - exp(1)), log = FALSE)
plnormb(
q,
mean = exp(0.5),
sd = sqrt(exp(2) - exp(1)),
lower.tail = TRUE,
log.p = FALSE
)
qlnormb(
p,
mean = exp(0.5),
sd = sqrt(exp(2) - exp(1)),
lower.tail = TRUE,
log.p = FALSE
)
rlnormb(n, mean = exp(0.5), sd = sqrt(exp(2) - exp(1)))
x , q |
vector of quantiles. |
mean |
the mean of the distribution. |
sd |
the standard deviation of the distribution. |
log , log.p |
logical. if 'TRUE' probabilities 'p' are given as 'log(p)'. |
lower.tail |
logical. if 'TRUE', probabilities are |
p |
vector of probabilities. |
n |
number of observations. If 'length(n) > 1', the length is taken to be the number required. |
This function calls the corresponding density, distribution function, quantile function and random generation
from the log normal (see Lognormal
) after evaluation of meanlog = log(mean^2 / sqrt(sd^2+mean^2))
and
sqrt{(log(1+sd^2/mean^2))}
‘dlnormb’ gives the density, ‘plnormb’ gives the distribution function, ‘qlnormb’ gives the quantile function, and ‘rlnormb’ generates random deviates. The length of the result is determined by ‘n’ for ‘rlnorm’, and is the maximum of the lengths of the numerical arguments for the other functions. The numerical arguments other than ‘n’ are recycled to the length of the result. Only the first elements of the logical arguments are used.
The default ‘mean’ and ‘sd’ are chosen to provide a distribution close to a lognormal with ‘meanlog = 0’ and ‘sdlog = 1’.
Lognormal
x <- rlnormb(1E5,3,6)
mean(x)
sd(x)
dlnormb(1) == dnorm(0)
dlnormb(1) == dlnorm(1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.