BESHStatNG Help
BESHStatNG (New Generation) is a VB.NET reimplementation of the original BESHStat VBA add-in. It adds the BESH Stat NG ribbon tab with dialogs for statistical tests, plots, regression models, and sample size tools.
Why BESHStatNG exists (and why it replaces the old VBA add-in)
BESHStatNG (“New Generation”) is a complete reimplementation of the original BESHStat add-in that was written in VBA (.xlam).
The goal was not to change what users can do, but to make the add-in more reliable, easier to maintain, and easier to extend.
What changes for you as a user
1) Better compatibility with modern Excel (especially 64-bit)
VBA solutions often require extra care across Excel versions and between 32-bit/64-bit environments.
A compiled .xll add-in (built with Excel-DNA) is designed for modern Excel installations and is easier to keep consistent.
2) Fewer “macro security” obstacles
.xlam add-ins are treated like macro-enabled workbooks, so users can run into macro policy blocks, warnings, or restricted environments.
BESHStatNG is a compiled add-in and does not depend on workbook macros. (The installer may still show a Windows warning if it is not code-signed.)
3) More stable UI and input handling
BESHStatNG uses dedicated Windows Forms dialogs and consistent data import rules.
This reduces “worksheet-state” issues that can happen with macro-driven tools and makes workflows more predictable.
4) Performance and scalability
Compiled code can handle larger datasets and more complex workflows more efficiently than macro code, especially for methods that require repeated computation.
5) Easier updates and faster delivery of new methods
The NG architecture makes it simpler to add new statistical methods, improve existing ones, and release updates without changing workbook logic.
6) Better diagnostics when something goes wrong
NG keeps internal logs that help track down issues (useful when reporting a bug), rather than failing silently or with generic VBA errors.
In short
BESHStatNG keeps the same “Excel-first” workflow, but moves the engine from an old macro-based add-in (.xlam) to a modern compiled add-in (.xll) so it can grow and remain dependable.
Quick start
- Install the add-in using the
.msiinstaller → see Getting started. - Open Excel and go to BESH Stat NG → Analyse.
- Choose a method, select the required data (range picker or variable list), and click Run.
New here? Read these two pages first
- Getting started — install, SmartScreen/Trust Center issues, logs
- How to select data — range selection vs variable-by-column selection
How results are written
Most methods write results into the active workbook:
- Many analyses create a new worksheet for results.
- Some workflows write results into a chosen area and will refuse to overwrite non-empty cells.
If you unexpectedly get an extra sheet or the tool refuses to write, check that you have a clear area or allow it to create a new sheet.
Implementation notes
BESHStatNG is a lightweight, self-contained .xll add-in. If you're curious how results are computed (matrix algebra, SVD, exact p-values, etc.), see Implementation notes.
Methods
Choose a method below. Each page explains what the method does, what data it expects, and how to interpret the output.
Assumptions
- Normality Tests — Shapiro–Wilk • D’Agostino–Pearson K² • Anderson–Darling. Check whether a sample distribution is consistent with normality—useful before parametric tests.
- Univariate Outliers — Grubbs’ test (single outlier) • Rosner / generalized ESD (multiple outliers). Identify statistically unusual values in a single variable, with options suited to one or multiple outliers.
- Homogeneity of Variance — Fligner–Killeen • Levene (Brown–Forsythe/median) • Squared Ranks • Bartlett. Test whether multiple groups have similar variances, which is an important assumption for many parametric comparisons.
- Symmetry — Miao–Gel–Gastwirth test • Cabilio–Masaro test • Asymmetry plot (optional). Evaluate whether a distribution is symmetric around its center and visualize asymmetry when needed.
- Descriptive Statistics — n • mean • median • SD / variance • SEM • CV • skewness / kurtosis • Q1 / Q3, IQR • min / max / range • Shapiro–Wilk (optional). Compute a compact set of summary statistics for one or multiple variables, optionally adding a normality check.
Graphics
- Histogram — Automatic bin rules (Sturges, Doane, Scott, Freedman–Diaconis) • Overlay multiple groups (optional). Create publication-friendly histograms with sensible bin-width heuristics and optional overlays.
- Box and Whiskers — Tukey boxplot (median, quartiles, whiskers) • Outliers via 1.5×IQR rule. Visualize distribution shape and outliers across one or more groups.
- ROC Curve — ROC curve points, AUC (Wilcoxon), DeLong SE / CI, Hanley–McNeil SE / CI, p-value, Cutoff table. Assess binary classifier performance and explore sensitivity/specificity tradeoffs across thresholds.
- Kaplan-Meier Plot — Kaplan–Meier survival estimate • Optional confidence bands • Tabular survival output (optional). Plot survival over time and summarize survival probabilities (with censoring) for one or multiple groups.
- Normal Plot — Rank methods: Blom, Rankit, Van der Waerden • Line fits: SPSS, OLS, R-style • Optional descriptive stats. Create a normal probability plot to visually assess normality and identify deviations such as skewness or heavy tails.
- XYZ 3D Scatterplot — 3D scatter plot (X,Y,Z) • Optional group coloring • Optional point labels • Rotation/zoom + plane projections (optional). Visualize three-dimensional relationships with interactive rotation controls.
- Scatter Plot Matrix — Scatter plot matrix • Optional correlation coefficients • Optional regression lines. Quickly explore pairwise relationships among many variables.
Parametric
- Paired (single sample) T tests — Paired t-test (matched pairs). Compare two paired measurements on the same subjects by testing the mean of differences.
- Unpaired (two sample) T tests — Pooled-variance t-test • Welch t-test • F-test for variances (optional). Compare the means of two independent groups, either assuming equal variances or allowing unequal variances.
- One-Way ANOVA — Classic one-way ANOVA • Welch ANOVA • Post-hoc: LSD, Bonferroni, Tukey–Kramer, Games–Howell. Compare means across multiple independent groups and run common post-hoc procedures when differences are detected.
- One-Way Repeated-Measures ANOVA — RM ANOVA • Sphericity: Mauchly test (optional) • Corrections: Greenhouse–Geisser, Huynh–Feldt (optional) • Post-hoc: Tukey (optional) • Descriptive stats / box plot (optional). Compare means across repeated conditions for the same subjects, with optional sphericity diagnostics and corrections.
- Two-Way Nested ANOVA — Two-way nested ANOVA • Balanced design check • Satterthwaite approximation. Analyze hierarchical (nested) designs such as subjects nested within centers, with appropriate variance decomposition.
Nonparametric
- Mann-Whitney Test — Exact p-values (when available) • Normal approximation (ties + continuity correction) • Hodges–Lehmann shift estimate (optional). Nonparametric alternative to the two-sample t-test for comparing two independent groups.
- Wilcoxon Signed Rank Test — Exact p-values (when available) • Normal approximation (ties + continuity correction) • Hodges–Lehmann shift estimate • Sign test (optional). Nonparametric paired comparison test for matched samples or before/after measurements.
- Kruskal-Wallis Test — H statistic (uncorrected) • H statistic (tie-corrected) • Dunn’s post-hoc comparisons (optional). Nonparametric one-way ANOVA alternative for comparing more than two independent groups.
- Friedman Test — Friedman test • Post-hoc multiple comparisons (MCP) • Descriptive stats (optional) • Box plot (optional). Nonparametric repeated-measures alternative to one-way RM ANOVA for ranked data across conditions.
- Cochran's Q Test — Cochran’s Q • Percent of 1’s per condition. Test differences in matched binary outcomes across three or more conditions (extension of McNemar).
- Skillings-Mack Test — Skillings–Mack test (handles missing values). Nonparametric test for block designs like Friedman, but robust to missing observations.
- Spearman Rank Correlation — Spearman’s ρ (rank correlation) • p-value / CI where applicable. Measure monotonic association between two variables using ranks (robust to non-normality and outliers).
- Kendall's Rank Correlation — Kendall’s τ • p-value / CI where applicable. Measure ordinal association between two variables, with good behavior under ties and small samples.
- Theil-Sen Simple Regression — Median slope (Theil–Sen) • 95% CI (Sen/large-sample approx.) • Robust intercept. Robust simple linear regression resistant to outliers, based on median pairwise slopes.
Contingency Table Analysis
- 2x2 Table — Pearson chi-square • Fisher’s exact (two-sided, one-sided, mid-p) • Odds ratio + CI • Relative risk + CI • McNemar / Liddell test for paired 2×2. Analyze 2×2 contingency tables with exact tests and common effect-size measures.
- RxC Table — Pearson chi-square test of independence • Nominal association (Cramer's V, Phi, contingency coefficient) • Fisher–Freeman–Halton exact test (optional) • Ordinal association (tau-b/tau-c, gamma, Somers’ D) • Cochran–Armitage trend test (when applicable). Analyze general contingency tables and report association measures and exact/trend tests where applicable.
- Mantel-Haenszel Test — Mantel–Haenszel chi-square • Pooled odds ratio + 95% CI. Combine stratified 2×2 tables to estimate a pooled association while controlling for a stratification factor.
- Proportions — Single proportion (estimate + CI) • Two independent proportions (difference + CI, Fisher exact p-values) • Two paired proportions (difference + CI, Liddell/McNemar-type test). Work with binomial outcomes: estimate proportions and compare proportions between groups.
- Correspondence Analysis — Correspondence analysis (CA) • Row/column contribution plots • Biplot. Explore structure in contingency tables via low-dimensional map representations of rows and columns.
Survival Analysis
- Kaplan-Meier Plot — Kaplan–Meier survival estimate • Optional confidence bands • Tabular survival output (optional). Plot survival over time and summarize survival probabilities (with censoring) for one or multiple groups.
- Logrank Test — Logrank • Tarone–Ware • Gehan–Breslow • Peto • Modified Peto (Andersen). Compare survival curves between groups using logrank-type tests (with several common weightings).
- Cox Regression — Cox proportional hazards model • Tie handling: Breslow, Efron, Exact • Robust variance (optional) • Residuals + PH score test (optional) • Baseline + adjusted survival curves. Fit a proportional hazards model to time-to-event data and report hazard ratios with diagnostics.
Regression
- Multiple Linear Regression (LM) — OLS multiple regression • Optional weights • Type I or Type III term SS (ANOVA table) • Optional covariance matrix and residuals. Fit a standard linear regression model, report coefficients and ANOVA-style term tests.
- Generalized Linear Models (GLM) — GLM families: Gaussian, Binomial, Poisson, Negative Binomial, Gamma • Links per family (selectable) • Optional weights and offset • IRLS with user-set iterations/ε • Optional covariance matrix and residuals. Fit generalized linear models to a wide range of outcome types with configurable link functions.
- Negative Binomial Regression (NB2) — Negative Binomial (NB2) regression • Overdispersion parameter (estimated) • Optional offset/weights, covariance matrix, residuals. Model overdispersed count outcomes using an NB2 variance function.
- Generalized Estimating Equations (GEE) — Families: Gaussian, Binomial, Poisson, Negative Binomial, Gamma • Covariance structures: Independence, Exchangeable, Autoregressive, Unstructured • SE types: Robust, Naive, Bias-reduced. Fit marginal models for correlated/clustered data using GEE with selectable working correlation.
- Cox Regression — Cox proportional hazards model • Tie handling: Breslow, Efron, Exact • Robust variance (optional) • Residuals + PH score test (optional) • Baseline + adjusted survival curves. Fit a proportional hazards model to time-to-event data and report hazard ratios with diagnostics.
- Zero-Inflated Poisson Regression — ZIP model (Poisson count + logistic inflation part) • EM-style fitting (with iterations/ε) • Optional starting values. Model count data with excess zeros by combining a Poisson model with a separate zero-inflation process.
- Multinomial Logistic Regression — Multinomial logistic regression • Reference category selection (first/last) • Optional offset/weights, covariance matrix, residuals. Model nominal outcomes with more than two categories.
- Ordinal Logistic Regression — Ordinal logistic regression • Reference category selection (first/last) • Optional offset/weights, covariance matrix, residuals. Model ordered categorical outcomes using an ordinal logistic framework.
Multivariate Analysis
- Hotelling's T-Squared Test — One-sample Hotelling’s T² • Two-sample (independent) Hotelling’s T² • Paired Hotelling’s T² • Simultaneous confidence intervals. Multivariate extension of the t-test for comparing mean vectors (one-sample, two-sample, or paired).
- Principal Component Analysis — PCA on correlation or covariance matrix • Component extraction: eigenvalue, fixed k, variance threshold • Outputs: scores, loadings, reduced dataset • Plots: scree, score/loading plots, biplots (2D/3D). Reduce dimensionality of multivariate numeric data and visualize dominant patterns.
- Correspondence Analysis — Correspondence analysis (CA) • Row/column contribution plots • Biplot. Explore structure in contingency tables via low-dimensional map representations of rows and columns.
- Multiple Correspondence Analysis — Multiple correspondence analysis (MCA) via indicator/Burt matrix • Contribution plots • Biplot. Extend correspondence analysis to multiple categorical variables (survey-style data).
Sample Size
- Sample Size – Paired T-test — Sample size for paired t-test (iterative t critical values). Estimate required number of pairs for a paired t-test given effect size, SD, α and power.
- Sample Size – Unpaired T-test — Sample size for unpaired t-test (with group ratio κ). Estimate required sample sizes per group for a two-sample t-test given effect size, SD, α and power.
- Sample Size – Single Proportion — Sample size for a single proportion test. Estimate required sample size for testing a single proportion against a null value.
- Sample Size – Independent Proporions — Sample size for two independent proportions (uncorrected and corrected chi-square / Fisher). Estimate sample sizes for comparing two independent proportions (with optional group-size ratio κ).
Agreement
- Passing–Bablok Regression — Passing–Bablok nonparametric linear regression for method comparison, slope/intercept estimates, confidence intervals, and robust handling of outliers. Use when comparing two measurement methods without assuming normal errors or homoscedasticity.
- Deming Regression — Deming (errors-in-variables) regression with configurable error ratio (λ), point estimates and confidence intervals. Use when both X and Y have measurement error and you want a symmetric method-comparison regression.
- Intraclass Correlation Coefficients — ICC(1,1), ICC(1,k), ICC(2,1), ICC(2,k), ICC(3,1), ICC(3,k) with confidence intervals, Repeatability Coefficient. Quantify reliability/agreement of measurements across raters/replicates using standard ICC families.