The mean of a log-Cauchy (aka log-Student's t with 1 degree of freedom) is infinite ;-) The median and other quantiles are not affected by transformations, though the mean is.

If you really want anything other than a confidence interval about the mean of the logs, assuming a log-normal distribution, I think you need to think very carefully about the problem you are trying to solve, and how that might be impacted by different assumptions about the distribution of the data.


And for that, I recommend normal probability plotting, i.e., qqnorm of log(X): If that looks plausibly like a straight line, you are fine with a log-normal assumption. If not, my favorite reference is


Titterington, Smith and Makov (1985) Statistical Analysis of Finite Mixture Distributions (Wiley).


          Hope this helps.
          Spencer Graves


On 3/16/22 5:44 PM, Bert Gunter wrote:
This is largely a statistics question, so somewhat off topic here (see
the posting guide linked below). Ergo the lack of a response yet.

Therefore you *might* do better posting on the r-sig-ecology list.

And now for a couple of statistics comments, which you are free to
ignore of course, and which you may already be well aware of. Assuming
the rv X is approximately lognormally distributed means that log(x) is
~ normally distributed which means that a (symmetric) CI for the mean
of the log(X) (=: meanlog of X) is also approximately a CI for the
median of log(X). Hence the back transform (exp()) of the meanlog CI
is an approx CI for the **median** of the lognormal distribution. The
median of a lognormal is **not** the same as the mean, but it
generally makes more sense, as the mean of a skew distribution like
the lognormal has no clear interpretation, while the median (or any
quantile) still does.

Your mileage may vary, of course.

Cheers,
Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Wed, Mar 16, 2022 at 1:10 PM varin sacha via R-help
<r-help@r-project.org> wrote:

Dear R-experts,

I have used the EnvStats package and the elnorm function (p. 248).
I would like to calculate the exact 95% confidence intervals around the mean, 
not around the meanlog.
Here below my R code, how can I get the exact 95% CIs around the mean ?
Many thanks.


library(EnvStats)
x=rlnorm(100000,0,1)
mean(x)
elnorm(x,method="mvue",ci=TRUE,ci.type="two-sided",ci.method="exact",conf.level=0.95)

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to