conf_int: Calculate Confidence Interval

View source: R/conf_int.R

conf_intR Documentation

Calculate Confidence Interval

Description

Calculate the confidence interval of a given sample mean.

Usage

conf_int(x, ci = 0.95, r = NA, s = NA, se = NA, n = NA)

Arguments

x

A sample mean

ci

Numeric, confidence level (default = 0.95)

r

Numeric, correlation coefficient (default = NA)

s

Numeric, standard deviation of population (default = NA)

se

Numeric, standard error of the sample mean (default = s * sqrt(1 - r))

n

Numeric, sample size (default = NA)

Value

A list containing confidence intervals from Z and t methods.

Examples

conf_int(x = 12, ci = 0.99, s = 2.5, n = 24)
conf_int(x = 12, s = 2.5, r = 0.6)

jazznbass/wmisc documentation built on Oct. 29, 2024, 5:42 p.m.