eff_fmt: Effect Size Formatter

Description Usage Arguments Details Value Examples

View source: R/relative-effect-format.R

Description

Formats text as effect sizes plus confidence intervals for tabular presentation.

Usage

1
2
3
4
5
6
7
8
9
eff_fmt(
  effect,
  se = NULL,
  level = 0.95,
  lci = NULL,
  uci = NULL,
  sep = "-",
  round = 2L
)

Arguments

effect

Effect estimate.

se

Standard error.

level

Confidence level. Default is 0.95.

lci

Confidence bound, lower.

uci

Confidence bound, higher.

sep

Character separator.

round

Number of digits to round to. Default is 2.

Details

One of se or lci/uci must be specificed, but not both, and must be the same length vectors as effect, or length 1 (recycled to be the same length as effect). If both are provided, the confidence intervals will be computed using the standard error and level.

Value

Character vector of formatted data. Same length as effect.

Examples

1
2
3
set.seed(12345)
eff_fmt(rnorm(10), se = 0.1)
eff_fmt(rnorm(10), se = 0.1, round = 4L, level = 0.99)

mattwarkentin/sandbox documentation built on Jan. 29, 2020, 4:46 p.m.