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)

Arguments

mps

A survey design object created using the srvyr package.

vars

A character vector of variable names to include in the analysis.

Value

A gtsummary object containing the summary table of the analyzed survey data.

Examples

if (FALSE) { # \dontrun{
# Example usage:
summary_table <- analyze_survey(mps = your_survey_design, vars = c("var1", "var2", "var3"))
} # }