3
$\begingroup$

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))

That looks like: enter image description here

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:

  1. Can someone succinctly explain the mathematical meaning of cv?
  2. What is the meaning of the error message I'm getting, and how can I calculate confidence intervals using the Land (Cox) method?
$\endgroup$
9
  • 1
    $\begingroup$ Maybe try a different 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$
    – Roland
    Commented Aug 22, 2017 at 7:24
  • 3
    $\begingroup$ If $Y=e^X$ and $X\sim N(\mu,\sigma^2)$, then $Y$ is lognormal with parameters $\mu$ and $\sigma^2$. Do you want a confidence interval for $\mu=E(\ln Y)$ or a confidence interval for the mean of $Y$, $EY = e^{\mu + \sigma^2/2}$? Or perhaps something else? $\endgroup$ Commented Aug 22, 2017 at 8:20
  • 1
    $\begingroup$ "cv" is coefficient of variation which is standard deviation divided by mean. For the lognormal this is a monotonic-increasing function of $\sigma$. $\endgroup$
    – Glen_b
    Commented Aug 22, 2017 at 8:27
  • 1
    $\begingroup$ Second question: problem with 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 elements ci.land() gives pretty much the same values as ci.lnorm.zou() and pretty close to bootstrap estimate. $\endgroup$ Commented Aug 22, 2017 at 8:37
  • 2
    $\begingroup$ @Andrey Ultimately such tables rely on numerical approximations or simulation results going back to the 1970's. The most popular were republished in Gilbert's book (Statistical Methods for Environmental Pollution Monitoring), which went only to $n=101$. See stats.stackexchange.com/questions/108909. I found a copy of Land's original (1971) paper with the underlying theory: projecteuclid.org/download/pdf_1/euclid.aoms/1177693235. It gives us some very good guesses concerning the nature of the error message quoted here. $\endgroup$
    – whuber
    Commented Aug 22, 2017 at 17:56

0