cvTest {asht} | R Documentation |
Coefficient of Variation Test
Description
One-sample coefficient of variation tests and confidence intervals based on either normal or lognormal assumptions.
Usage
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' |
Value
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 |
Author(s)
Michael P. Fay
References
Koopmans, Owen, Rosenblatt (1964) "Confidence intervals for the coefficient of variation for the normal and log normal distributions" Biometrika 25-32.
Examples
cvTest(rnorm(25,mean=3,sd=.2),distn="normal")