Learn R Programming

inTextSummaryTable (version 3.3.2)

geomSD: Compute geometric standard deviation

Description

The geometric standard deviation is computed as: \(\exp(\sigma(log(x)))\), with:

  • log: natural logarithm

  • \(\sigma\): standard deviation

Usage

geomSD(x, na.rm = FALSE)

Value

Numeric vector of length 1 with geometric mean.

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(), geomCV(), geomMean(), geomSE(), se()

Examples

Run this code
# geometric standard deviation of a sample from a log normal distribution:
geomSD(rlnorm(n = 1000, meanlog = 0, sdlog = 1))

Run the code above in your browser using DataLab