This function analyzes survey data using the gtsummary
package. It creates a summary table of specified variables, stratified by sex, and includes overall statistics, sample sizes, and confidence intervals.
analyze_survey2(mps, vars, strata)
A gtsummary
object containing the summary table of the analyzed survey data.
if (FALSE) { # \dontrun{
# Example usage:
summary_table <- analyze_survey(mps = your_survey_design, vars = c("var1", "var2", "var3"))
} # }