[R] Exact 95% CIs weibull distribution

varin sacha v@r|n@@ch@ @end|ng |rom y@hoo@|r
Thu Jun 1 21:42:21 CEST 2023


R-experts,

I am trying to find the exact 95% confidence intervals of the mean (and the median) for the weibull distribution. Here below I have the exact 95% CIs of the meanlog and the median for a lognormal using EnvStats library (ready-to-run function in library) but I don't find how to get the exact 95% CIs of the mean and median for the weibull. Indeed, the ready-to-run function in EnvStats library is not available for weibull.

Any help would be appreciated.


#Exact 95% CIs for the meanlog 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 median lognormal distribution
library(EnvStats)
x=rlnorm(100000,0,1)
eqlnorm(x, p=0.5, method="mvue",ci=TRUE,ci.type="two-sided",ci.method="exact",conf.level=0.95)
 

#Exact 95% CIs for the mean weibull distribution
library(EnvStats)
x=rweibull(100000,shape=2, scale=2)
eqweibull(x, p = 0.925)
eqweibull(x, p = 0.975)

#Exact 95% CIs for the median weibull distribution
library(EnvStats)
x=rweibull(100000,shape=2, scale=2)
eqweibull(x, p = 0.5, method = "mle", digits = 0)



More information about the R-help mailing list