Description Usage Arguments Value Functions References See Also Examples
Compute summary statistics of a log-normal distribution
1 2 3 4 5  | getLognormMoments(mu, sigma, m = exp(mu + sigma2/2) - shift, shift = 0)
getLognormMedian(mu, sigma, shift = 0)
getLognormMode(mu, sigma, shift = 0)
 | 
mu | 
 numeric vector: location parameter  | 
sigma | 
 numeric vector: scale parameter  | 
m | 
 mean at original scale, may override default based on mu  | 
shift | 
 shift for the shifted lognormal distribution  | 
for getLognormMoments a numeric matrix with columns
mean (expected value at original scale)
, var (variance at original scale)
, and cv (coefficient of variation: sqrt(var)/mean).
For the other functions a numeric vector of the required summary.
getLognormMoments: get the expected value, variance, and coefficient of variation
getLognormMedian: get the median
getLognormMode: get the mode
Limpert E, Stahel W & Abbt M (2001)
Log-normal Distributions across the Sciences: Keys and Clues.
Oxford University Press (OUP) 51, 341,
10.1641/0006-3568(2001)051[0341:lndats]2.0.co;2
scaleLogToOrig
1 2 3 4 5 6 7 8 9 10 11  |   # start by estimating lognormal parameters from moments
  .mean <- 1
  .var <- c(1.3,2)^2
  parms <- getParmsLognormForMoments(.mean, .var)
  #
  # computed moments must equal previous ones
  (ans <- getLognormMoments(parms[,"mu"], parms[,"sigma"]))
  cbind(.var, ans[,"var"])
  #
  getLognormMedian(mu = log(1), sigma = log(2))
  getLognormMode(mu = log(1), sigma = c(log(1.2),log(2)))
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.