gm_95CI: Calculate the geometric 95 percent confidence interval

View source: R/gm_95CI.R

gm_95CIR Documentation

Calculate the geometric 95 percent confidence interval

Description

gm_95CI takes as input a numeric vector and returns the geometric 95 percent confidence interval

Usage

gm_95CI(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

Because this calculation log-transforms the input data:

  1. values of zero must be either omitted (zero.propagate = FALSE) or, if included (zero.propagate = TRUE), the result will be NA, and

  2. the function is undefined for negative numbers.

Value

Returns a list of numbers

Examples

gm_95CI(rnorm(10, 5, 1))
gm_95CI(c(4, 3, 7, 19, 4, 0), zero.propagate = TRUE)
gm_95CI(c(4, 3, 7, 19, 4, 0), zero.propagate = FALSE)


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