gm_sd: Calculate the geometric standard deviation

View source: R/geometricMean.R

gm_sdR Documentation

Calculate the geometric standard deviation

Description

gm_sd takes as input a numeric vector and returns the geometric standard deviation

Usage

gm_sd(x, na.rm = TRUE, zero.propagate = FALSE)

Arguments

x

A vector of numbers

na.rm

Should NA values be removed? (logical)

zero.propagate

Should zeroes be propagated? (logical)

Details

Per Wikipedia's entry on the geometric standard deviation, https://en.wikipedia.org/wiki/Geometric_standard_deviation, the geometric standard deviation is dimensionless. See that entry for the formula used.

Also, note that the way you determine the range of the data for the geometric mean and one geometric standard deviation is NOT geometric mean value +/- the geometric standard deviation! Instead, it is geometric mean / geometric standard deviation to geometric mean * geometric standard deviation!

Examples


gm_sd(rnorm(10, 5, 1))
gm_sd(c(5, 3, 6, 10, 2, 0), zero.propagate = TRUE)


shirewoman2/LaurasHelpers documentation built on Oct. 22, 2023, 2:07 p.m.