make_ci: Make a confidence interval from a point estimate and standard...

View source: R/text_helpers.R

make_ciR Documentation

Make a confidence interval from a point estimate and standard error.

Description

Make a confidence interval from a point estimate and standard error.

Usage

make_ci(
  point,
  se,
  level = 0.95,
  transform = NULL,
  numeric = FALSE,
  format_numeric = "%0.3g",
  format_character = "%s"
)

Arguments

point

The point estimate (numeric vector)

se

The standard error of the estimate (numeric vector)

level

The confidence level

transform

A function that takes a matrix input and returns a matrix output of the confidence interval values transformed.

numeric

Should the transformed point estimate be returned instead of the character representation?

format_numeric, format_character

Formats for use in sprintf for the output of the transform function.

Value

If numeric=FALSE a character vector of the confidence intervals represented as "X [X, X]" where X are numbers with three significant figures (or if the transform returns a character matrix, those text). If numeric=TRUE, a numeric vector of the point estimates.


billdenney/bsd.report documentation built on Jan. 16, 2024, 12:54 a.m.