95% confidence interval with tbl_summary

Hi - advice for adding 95% confidence interval to the following code?

table2_tchadresults_baro <- table2_tchadresults_baro %>% tbl_summary%>%
  #add_n() %>% # add column with total number of non-missing observations
  #add_p() %>% # test for a difference between groups
  modify_header(label = "**Variable**") %>% # update the column header
  #add_overall() %>%
  modify_footnote(
    update = all_stat_cols() ~ "xx"
  ) %>%
  modify_caption("**GiveWell Coverage - Tchad, Child level data/ au niveu d'enfant**") %>%
  bold_labels()

Hello.
Thanks for providing code , but you could take further steps to make it more convenient for other forum users to help you.

Share some representative data that will enable your code to run and show the problematic behaviour.

You might use tools such as the library datapasta, or the base function dput() to share a portion of data in code form, i.e. that can be copied from forum and pasted to R session.

Also, please specify what you would wish to calculate/show confidence intervals for ? We don't have context for your activity..., is there a statistical test you are performing ?

structure(list(sexe_masculine = c(0, 1, 0, 0), age.en.mois = c(48L, 
27L, 21L, 48L), pb.enfant = c(145L, 138L, 127L, 146L), edema.yn.binary = c(0, 
0, 0, 0), SAM_any = c("non", "non", "non", "non"), MAM = c("non", 
"non", "non", "non"), edema.yn = c(0, 0, 0, 0)), row.names = c(NA, 
4L), class = "data.frame")

what do you want to show confidence intervals of ?
are you performing / want to perform some form of statistical test?

proportion with 95% confidence intervals

mean and standard deviation for continuous variables

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.