Produces summary tables for numeric and categorical variables in a dataset,
optionally stratified by a grouping variable. Numeric variables are summarized
with mean (SD) or median (IQR), and categorical variables with counts and percentages.
Appropriate statistical tests (t-test, Wilcoxon, ANOVA, Kruskal-Wallis, Chi-square, or Fisher's Exact)
are performed depending on the variable type, number of groups, and user-specified options.