ci.calc: Simplified Confidence Interval Calculation

ci.calcR Documentation

Simplified Confidence Interval Calculation

Description

This function calculates the confidence interval (for a given confidence level) for a variable in a given data frame.

Usage

ci.calc(df, var1, cl)

Arguments

df

data frame to read in.

var1

the variable of interest for which the CI will be calculated.

cl

the desired confidence level (in percentages, ranging from 1 to 100).

Value

This function returns the mean, lower bound, upper bound, and standard error.

Examples

data <- mtcars

ci.calc(data,mpg,95)

vannstats documentation built on April 15, 2023, 9:09 a.m.