ci_r4vn: Confidence Intervals from Summaries or Variables

ciiR Documentation

Confidence Intervals from Summaries or Variables

Description

Calculates confidence intervals for means, proportions, and variances.

Usage

cii(
  n,
  mean = NULL,
  sd = NULL,
  events = NULL,
  variance = NULL,
  type = c("auto", "mean", "proportion", "variance"),
  method = c("exact", "wilson", "wald"),
  level = 0.95,
  digits = 3,
  show = TRUE,
  console = FALSE
)

ci(
  x,
  data = NULL,
  type = c("auto", "mean", "proportion", "variance"),
  event = NULL,
  method = c("exact", "wilson", "wald"),
  level = 0.95,
  digits = 3,
  show = TRUE,
  console = FALSE
)

Arguments

n

Sample size.

mean, sd

Mean and standard deviation.

events

Number of events for a proportion.

variance

Sample variance.

type

"auto", "mean", "proportion", or "variance".

method

Proportion confidence interval method.

level

Confidence level.

digits

Decimal places.

show

Logical; open the formatted result in the Viewer. Default TRUE.

console

Logical; also print the traditional text result in the Console. Default FALSE.

x

Variable to analyze.

data

Data frame. If NULL, active data is used.

event

Event level for a binary variable.

Value

Invisibly returns an object of class r4vn_stat.

Examples

cii(50, mean = 10, sd = 2)
cii(100, events = 45, type = "proportion", method = "wilson")

R4VN documentation built on Sept. 30, 2026, 5:13 p.m.