Surprisingly, I can't find a discussion on calculating confidence intervals for the mean $EY=e^{\mu+\sigma^2/2}$ of the lognormal distribution. My question goes beyond what is covered in the link below, and is specific to the package EnvStats
.
Confidence Interval for Mu in a Log normal Distributions in R
Say I have some lognormal data:
mydat <- data.frame(value = rlnorm(1000, meanlog = 6, sdlog = .5))
I use EnvStats::elnormAlt
to estimate parameters for the lognormal distribution mydat
.
elnormAlt(mydat$value, method = "mvue", ci = FALSE, ci.type = "two-sided",
ci.method = "land", conf.level = 0.95)
And obtain:
Results of Distribution Parameter Estimation
--------------------------------------------
Assumed Distribution: Lognormal
Estimated Parameter(s): mean = 454.7097844
cv = 0.5359667
Estimation Method: mvue
Data: mydat$value
Sample Size: 1000
When I change the argument ci = TRUE
, I get the error:
Error in integrate(density.fcn.qlands.t, -pi/2, theta, nu = nu, zeta = zeta) :
non-finite function value
My questions are twofold:
- Can someone succinctly explain the mathematical meaning of
cv
? - What is the meaning of the error message I'm getting, and how can I calculate confidence intervals using the Land (Cox) method?
ci.method
? I don't know which function is integrated (the documentation is rather long and I don't have time to study it in detail), but apparently non-finite values occur. $\endgroup$EnvStats:::ci.land()
. For some reason it can't handle more than approx. 260 values, and right now I'm not in the mood to dig deeper into code. For vector less than 260 elementsci.land()
gives pretty much the same values asci.lnorm.zou()
and pretty close to bootstrap estimate. $\endgroup$