Return key statistical quantities generated from value and standard error

A function is generated that can be called with a number of keywords to return the requested quantity of interest, accordingly. The function is typically used in IQRtable.

statSE(value, se = 10, digits = NA)

Arguments

value

numeric values.

se

standard error of the numeric values.

digits

number of significant digits (if NA (default), format_GUM is used to determine number of significant digits, otherwise, signif function is used instead of format_GUM)

Value

Function outfn(char) that can be called with the key words

  • value (value rounded to significant digits according to standard error)

  • se (standard error rounded to two significant digits)

  • rse (relative standard error rounded to significant digits according to standard error)

  • rse% (relative standard error as percentage)

  • lower.x where x is between 1 and 99 (lower confidence bound rounded to significant digits according to standard error)

  • upper.x where x is between 1 and 99 (upper confidence bound rounded to significant digits according to standard error)

Details

The function uses format_GUM to round to significant digits and format the output. The standard error of rse is assumed to be rse^2 which is derived by Gaussian error propagation and the assumption that se is known without uncertainty.

Author

Daniel Kaschek, IntiQuan