One-sample coefficient of variation tests and confidence intervals based on either normal or lognormal assumptions.
cvTest(x, nullCV = 1,
alternative = c("two.sided", "less", "greater"),
conf.level = 0.95, distn = c("normal", "lognormal"),
CVmax = 10^6)
A list of class 'htest'
mean
stadard deviation
estimate of coefficient of variation: sd(x)/mean(x) for distn='normal', and sqrt(exp(var(log(x)))-1) for distn='lognormal'
p.value associated with alternative
confidence interval
null CV
alternative
description of method
numeric vector
null coefficient of variation, or CV on boundary between null and alternative hypotheses
a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less". You can specify just the initial letter.
confidence level of the interval
assumed distribution
maximum coefficient of variation used in uniroot CI searches when distn='normal'
Michael P. Fay
Koopmans, Owen, Rosenblatt (1964) "Confidence intervals for the coefficient of variation for the normal and log normal distributions" Biometrika 25-32.
cvTest(rnorm(25,mean=3,sd=.2),distn="normal")
Run the code above in your browser using DataLab