ci_var: Confidence Intervals on Dataframe

View source: R/confidence.R

ci_varR Documentation

Confidence Intervals on Dataframe

Description

Calculate confidence intervals for a continuous numerical column on a dataframe, given a confidence level. You may also group results using another variable. Tidyverse friendly.

Usage

ci_var(df, var, group_var = NULL, conf = 0.95)

Arguments

df

Dataframe

var

Variable name. Must be a numerical column.

group_var

Variable name. Group results by another variable.

conf

Numeric. Confidence level (0-1).

Value

data.frame mean, standard deviation, counter, upper and lower CIs.

See Also

Other Confidence: ci_lower()

Examples

data(dft) # Titanic dataset
ci_var(dft, Fare)
ci_var(dft, Fare, Pclass)
ci_var(dft, Fare, Pclass, conf = 0.99)

lares documentation built on Sept. 13, 2024, 1:08 a.m.