ci_var {lares} | R 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)
[Package lares version 5.2.8 Index]