pondeR: Making statistical analyses a little bit easier for everyone
Date:
This repository contains a set of R scripts designed to simplify the user’s statistical data analysis. The highlight is a function called auto_compare which intelligently performs comparative analysis such as t-test and ANOVA (and its nonparametric counterparts) depending on the results of assumption tests. Read more here.
Here are the functions:
auto_compare: Automatic Statistical Comparison with Comprehensive Analysis
This function performs an automatic comparison of a numeric outcome variable across two or more groups. It intelligently selects the appropriate statistical test (parametric or non-parametric) based on checks for normality and homogeneity of variances, calculates effect sizes, and performs post-hoc tests when appropriate.
plot_compare: Create Box or Violin Plots with Statistical Comparisons
This function generates box plots or violin plots with statistical tests and pairwise comparisons. It automatically selects appropriate statistical tests based on assumptions, or allows manual specification. Statistical testing is performed using the companion function auto_compare.
performDescriptive: Performs Descriptive Statistics on a Dataframe
This function generates a comprehensive descriptive statistics table from a given dataframe, optionally stratified by a categorical variable. It provides customizable summaries for both continuous and categorical variables, including control over rounding, missing data reporting, labeling, formatting, and table aesthetics. The output is a publication-ready gtsummary table that can be easily integrated into reports, manuscripts, or exported (via copy-paste for now) for further use.
recode_and_factorize: Recode and Factorize a Column
This function recodes values in a specified column of a data frame according to a provided mapping, then converts the column to a factor with ordered levels. The recoded values appear first in the factor levels, followed by any remaining unique values in alphabetical order.