Compute Coefficient of Variation for Normal and Log-Normal Data.

Share:

Description

The CV for normally distributed data can be calculated as a function of variance and mean.

The CV for log-normally distributed data can be calculated as a function of the variance of the log-transformed data. See references below.

Usage

1
2

Arguments

var

variance of the normal data or log-transformed lognormal data

mean

mean of the normal data

...

ignored

Value

numeric

Author(s)

Tim Bergsma

References

http://en.wikipedia.org/wiki/Coefficient_of_variation

http://en.wikipedia.org/wiki/Log-normal_distribution#Coefficient_of_variation

http://tolstoy.newcastle.edu.au/R/help/05/12/16710.html

See Also

  • percent

Examples

1
2
3
4
norm <- rnorm(10000,mean=10,sd=5)
lnrm <- rlnorm(10000,meanlog=10,sdlog=.3)
cvNormal(sd(norm)^2,mean(norm))
cvLognormal(sd(log(lnrm))^2)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.