I'm using expss tables to calculate means values. I can't find a function to report confidence intervals around the means.
I know r has several packages that can calculate and report confidence intervals, but I'm focused on using the expss package. I tried to create a function using tab_stat_fun_df() with no success. I also reviewed the significance documentation for the expss package hoping to have an option that reports CI.
Looking to add CI for the means in this code:
df <- data.frame(Group=c(1,1,1,1,1,1,1,0,0,0,0,0,0,0,0),
Response=c(0,1,0,1,0,1,0,1,0,1,0,1,1,0,0),
Value=c(10,20,17,14,15,16,17,18,19,10,11,12,13,14,15))
library(expss)
df %>% tab_rows(Group) %>% tab_cols(Response) %>% tab_cells(Value) %>%
tab_stat_mean_sd_n() %>% tab_pivot()
What I propose is not an actual solution, but rather a starting point (based on the use of the
tab_stat_fun_df command). Some further refinement is needed to achieve what you need.The output is