estLogNormParam: Estimate Lognormal Distribution

Description Usage Arguments Details Value References

View source: R/estdistparam.R

Description

Estimate parameters of a lognormal distribution using method of moments.

Usage

1

Arguments

mu

Mean of estimate. mu cannot have a negative value and must be of length=1.

s

Standard deviation or 95% confidence interval of estimate. s cannot have a negative value.

Details

s can only contain 1 or 2 elements. If 1 element is supplied, then s is used as the standard deviation. If 2 elements are supplied, then s is used as a 95% confidence interval with the first element as the lower bound.
This function is not vectorised. If s has more than 2 elements, the function returns NULL. If mu has more than 1 element, then only the first element is used.

If neither sigma nor 95% confidence interval are provided, the function returns NULL.

Where a standard deviation is provided, parameters are estimated by:

log(μ) = log(mu) - log(√{1 + s^2/mu^2})

log(σ) = √{log(1 + s^2/mu^2)}

Where a 95% confidence interval are provided, parameters are estimated by:

log(μ) = log(mu)

log(σ) = [(log(s[2]) - log(s[1]))/(2*1.959964)]

Value

Log-mean and Log-sd of the lognormal distribution.

References

https://en.wikipedia.org/wiki/Log-normal_distribution


austinnam/modeltools documentation built on Aug. 3, 2019, 7:20 p.m.