Learn R Programming

inTextSummaryTable (version 3.3.2)

geomCV: Compute geometric coefficient of variation (in a scale from 0 to 100).

Description

The geometric coefficient of variation is computed as: \(\sqrt{\exp(\sigma(log(x))^2)-1}*100\), with:

  • log: natural logarithm

  • \(\sigma\): standard deviation

Usage

geomCV(x, na.rm = FALSE)

Value

Numeric vector of length 1 with geometric coefficient of variation.

Arguments

x

Numeric vector.

na.rm

Logical, should NA value(s) be removed (FALSE by default)?

Author

Laure Cougnaud

See Also

Other stats utility functions: cv(), geomMean(), geomSD(), geomSE(), se()

Examples

Run this code
# Geometric coefficient of variation of a sample from a log normal distribution:
geomCV(rlnorm(n = 1000, meanlog = 0, sdlog = 1))

Run the code above in your browser using DataLab