AndriSignorell / DescTools

Tools for Descriptive Statistics and Exploratory Data Analysis
http://andrisignorell.github.io/DescTools/
82 stars 18 forks source link

CoefVar() does not compute confidence interval limits #116

Closed mae-irgendwas closed 7 months ago

mae-irgendwas commented 1 year ago

Hello!

I'm using the CoefVar function in R version 4.2.2, DescTools version 0.99.47. It correctly calculates the coefficient of variation, but gives NA as confidence interval limits. This is true also for the example from the example in the R Documentation:

set.seed(15) x <- runif(100) CoefVar(x, conf.level=0.95) est low.ci upr.ci 0.5092566 NA NA

Thank you for your help in advance!

AndriSignorell commented 7 months ago

This has been fixed. Please use the new function CoefVarCI() for calculating the confidence intervals. There are several implemented methods available, although there's one more on the bucket list.

set.seed(15)
x <- runif(100)
CoefVarCI(CoefVar(x), length(x), conf.level=0.95)
           est    lwr.ci    upr.ci
[1,] 0.5092566 0.4351644 0.6151409
mae-irgendwas commented 7 months ago

Thank you for fixing the problem and implementing different options!