
Function to calculate the confidence interval for the population coefficient of variation using the noncentral t
-distribution.
ci.cv(cv=NULL, mean = NULL, sd = NULL, n = NULL, data = NULL,
conf.level = 0.95, alpha.lower = NULL, alpha.upper = NULL, ...)
Lower confidence interval limit
Proportion of the distribution beyond Lower.Limit.CofV
Upper confidence interval limit
Proportion of the distribution beyond Upper.Limit.CofV
Observed coefficient of variation
coefficient of variation
sample mean
sample standard deviation (square root of the unbiased estimate of the variance)
sample size
vector of data for which the confidence interval for the coefficient of variation is to be calculated
desired confidence level (1-Type I error rate)
the proportion of values beyond the lower limit of the confidence interval (cannot be used with conf.level
).
the proportion of values beyond the upper limit of the confidence interval (cannot be used with conf.level
).
allows one to potentially include parameter values for inner functions
Ken Kelley (University of Notre Dame; KKelley@ND.Edu)
Uses the noncentral t-distribution to calculate the confidence interval for the population coefficient of variation.
Johnson, B. L., & Welch, B. L. (1940). Applications of the non-central t-distribution. Biometrika, 31, 362--389.
Kelley, K. (2007). Sample size planning for the coefficient of variation from the accuracy in parameter estimation approach. Behavior Research Methods, 39 (4), 755--766.
Kelley, K. (2007). Constructing confidence intervals for standardized effect sizes: Theory, application, and implementation. Journal of Statistical Software, 20 (8), 1--24.
McKay, A. T. (1932). Distribution of the coefficient of variation and the extended t distribution, Journal of the Royal Statistical Society, 95, 695--698.
cv
set.seed(113)
N <- 15
X <- rnorm(N, 5, 1)
mean.X <- mean(X)
sd.X <- var(X)^.5
ci.cv(mean=mean.X, sd=sd.X, n=N, alpha.lower=.025, alpha.upper=.025,
conf.level=NULL)
ci.cv(data=X, conf.level=.95)
ci.cv(cv=sd.X/mean.X, n=N, conf.level=.95)
Run the code above in your browser using DataLab