cvTest function

Coefficient of Variation Test

Coefficient of Variation Test

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)

Arguments

  • x: numeric vector
  • nullCV: null coefficient of variation, or CV on boundary between null and alternative hypotheses
  • alternative: a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less". You can specify just the initial letter.
  • conf.level: confidence level of the interval
  • distn: assumed distribution
  • CVmax: maximum coefficient of variation used in uniroot CI searches when distn='normal'

Returns

A list of class 'htest' - statistic: mean

  • parameter: stadard deviation

  • estimate: estimate of coefficient of variation: sd(x)/mean(x) for distn='normal', and sqrt(exp(var(log(x)))-1) for distn='lognormal'

  • p.value: p.value associated with alternative

  • conf.int: confidence interval

  • null.value: null CV

  • alternative: alternative

  • method: description of method

References

Koopmans, Owen, Rosenblatt (1964) "Confidence intervals for the coefficient of variation for the normal and log normal distributions" Biometrika 25-32.

Author(s)

Michael P. Fay

Examples

cvTest(rnorm(25,mean=3,sd=.2),distn="normal")
  • Maintainer: Michael P. Fay
  • License: GPL-3
  • Last published: 2023-08-24

Useful links