[R] Exact 95% CIs around the mean for Weibull distribution

varin sacha v@r|n@@ch@ @end|ng |rom y@hoo@|r
Sun Feb 13 11:44:22 CET 2022


Dear R-experts,

Here below my R code. I am trying to get the exact 95% confidence intervals around the meanlog for lognormal, around the mean for gamma and around the mean for weibull distributions. For lognormal and gamma everything is working but for weibull, I get error messages. After having used the ??eweibull function, I am not sure I can get the 95% CIs around the mean. Is there a way to get the exact 95% CIs around the mean for the weibull distribution ?

##########################
#Exact 95% CIs for the mean lognormal distribution
library(EnvStats)

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

#Exact 95% CIs for the mean gamma distribution
library(EnvStats)

x=rgamma(n=100000,shape=2,rate=5)
egamma(x,method="mle",ci=TRUE,ci.type="two-sided",conf.level=0.95)


#Exact 95% CIs for the mean weibull distribution
library(EnvStats)

x=rweibull(100000,2,2) 
eweibull(x,method="mle",ci=TRUE,ci.type="two-sided",conf.level=0.95)

##########################



More information about the R-help mailing list