Documented release: v0.1.0-alpha.2 · 2026-11-24 (commit b1c6ebb158) No scripts · No telemetry · A–Z Index
On this page

Statistical Analyses & Transforms Reference

This reference documents every statistical, transformation, and regression AnalysisKind implemented in CurveBook, paired one-to-one with the generated Analysis Kinds Registry and Table Archetypes. Every entry describes compatible tables, engine commands and canonical snake_case parameters with defaults, reported ResultSheet tabs and scalar keys, QOL-7 assumption diagnostics, boundary/edge behavior, and published Decision D1 clean-room verification oracles.

Note

Under CurveBook's QOL-7 contract, every ChecklistItem across all analyses sets remediation: None. Checklists surface assumption test metrics, sample-size thresholds, convergence statuses, and missing-data notes objectively without automatically recommending alternative tests or data transformations (Quality of Life Capabilities).

  • Global AnalysisSpec controls: Every analysis stores confidence_level (engine commands enforce confidence_percent in (1.0, 99.99], default 95.0; AnalysisSpec validates [0.01, 99.99]), p_value_format, and selected_data_sets (empty selects all compatible columns unless an analysis requires explicit indices). Excluded cells are always omitted non-destructively prior to analysis (Cell Exclusions).
  • Unified execution commands: Engine callers run analyze.run (or domain commands transform.run, stats.run, fit.run, analysis.add, analysis.run, analysis.updateParams, analysis.retargetData). Unknown option keys for a selected AnalysisKind are rejected cleanly (ErrorCode::BadInput; see Engine Error Codes).
  • Shared multiplicity procedure names (multiplicity): Post-hoc and row-wise procedures use canonical snake_case names: none (default unadjusted / omnibus only), tukey_hsd, dunnett (paired with control_column), sidak, bonferroni, holm_sidak, dunnett_t3, games_howell, tamhane_t2, dunn_rank_sum, linear_trend, benjamini_hochberg_fdr, benjamini_yekutieli_fdr, two_stage_bky_fdr, newman_keuls, and fisher_lsd. FDR methods interpret threshold as desired false discovery rate Q; FWER methods interpret threshold as family-wise α (default 0.05; Concepts: Number Formatting).

Data Transforms, Reshaping & Simulation

  • Purpose & compatible tables: Applies non-destructive element-wise mathematical transforms, normalizations, baseline removals, matrix transpositions, row pruning, formula-based selection/derived columns, synthetic XY simulation, or stratified/random row sampling, emitting a linked derived DataSheet alongside a summary ResultSheet. Accepts all Table Archetypes (Math, Normalize, RemoveBaseline, Transpose, PruneRows, SelectAndTransform, Simulate, RandomSample; see Analysis Registry: transform).
  • Engine command & canonical options/defaults: Run via analyze.run or transform.run using shorthands math (canonical), transform, normalize, remove_baseline, baseline, transpose, prune, prune_rows, select, select_and_transform, simulate, or random_sample. Canonical parameter keys span all operation modes:
    • math: x_transform, y_transform (None or preset: log10, ln, log2, exp10, exp, reciprocal, square, sqrt, logit, probit, arcsin_sqrt, etc.), error_propagation (replicate_endpoints or first_order_delta_method).
    • normalize: zero_anchor, hundred_anchor (ColumnMin, ColumnMax, FirstRow, LastRow, Constant, Hooked), output_percent (bool), per_data_set (bool).
    • remove_baseline: baseline_columns, operation (subtract, divide, ratio_change, percent_change).
    • transpose: swap_row_and_column_titles (bool).
    • prune_rows: every_k_rows (>= 1), average_window (bool).
    • select_and_transform: filter_formula, target_archetype, derived_columns.
    • simulate: seed, row_count, replicates, x_min, x_max, equation_id, parameters, noise.
    • random_sample: seed, sample_size, stratify_column, proportional_allocation.
  • Reported values: Emits a derived DataSheet and a MainSummary (summary) ResultTab recording transform metadata, anchor scalars (ZeroAnchor, HundredAnchor), or sampling parameters (sample_size, population_size, seed when exact in f64). Additional utility curve transforms (compute_auc, Savitzky–Golay / LOWESS smoothing, numerical derivatives, integrals) are documented under Transforms & Reshaping.
  • Assumptions & QOL-7 diagnostics: Emits non-fatal warnings and checklist notes whenever a nonlinear transform or domain guard blanks an endpoint or derivative (for example ln(u) at u ≤ 0 or MeanCvN with zero transformed mean); sets remediation: None.
  • Edge cases & limits: In pre-summarized subcolumns (MeanSdN, MeanSemN, MeanCvN, MeanLowHigh, MedianIqr, UpperLowerLimits), FirstOrderDeltaMethod scales spread by |g'(mean)| (swapping asymmetric -Error/+Error bounds when g' < 0 and preserving exclusion provenance notes), whereas ReplicateEndpoints maps [mean- SD, mean+ SD] through g and halves the width. Equal zero_anchor == hundred_anchor fails with TransformError (InvalidInput), and RandomSample honors stratified quotas deterministically via DeterministicRng.
  • Published D1 references & oracle verification: JCGM 100:2008 / GUM §5.1.2 (delta-method uncertainty propagation); Zar (2010) (logit, probit, angular arcsin√u transforms); Cleveland (1979) & Savitzky–Golay (1964) / Gorry (1990) (curve smoothing); verified by d1_normalization.rs (mpmath 1.3.0 80/120-digit rational/transcendental references, LINEAR_TOL = 1e-12), d1_randomization.rs, and d1_curve_transforms.rs.

Column Descriptive Statistics, Normality & One-Sample Tests

  • Purpose & compatible tables: Computes column-wise sample size, location, dispersion, quantiles, geometric summaries, confidence intervals of the mean/SD/median, skewness/kurtosis, a multi-test Gaussian/lognormal normality battery, Normal Q-Q coordinates, and optional one-sample hypothesis tests against hypothetical_value. Compatible with Column, Xy, Grouped, and MultipleVariables tables (see Analysis Registry: descriptive-stats).
  • Engine command & canonical options/defaults: Run via analyze.run or stats.run with shorthands descriptive_stats (canonical), descriptive, or column_stats.
    • aggregation: row_means (default, collapses raw replicate subcolumns by row mean first) or pooled_grand_sample (pools all active replicates).
    • custom_upper_percentile: optional upper percentile phi∈ [50.0, 100.0) reporting (100 - phi, phi) Hyndman–Fan Type-7 quantiles (default None).
    • run_normality_battery: bool (default true).
    • hypothetical_value: optional finite null location μ0 triggering one-sample Student t and Wilcoxon signed-rank tests (default None).
  • Reported values:
    • DescriptiveSummary (desc-summary or desc-pooled): N, Minimum, 25% Percentile, Median, 75% Percentile, Maximum, Range, Mean, Std. Deviation, Std. Error of Mean, Lower/Upper conf% CI of Mean, conf% CI of SD (χ2 normal-theory variance interval), exact/interpolated binomial CI of Median, Coefficient of Variation (%CV), Geometric Mean & Geometric SD Factor (when all values > 0), Harmonic Mean (when no zeros/incompatible signs), Skewness (G1), Excess Kurtosis (G2), and lag-1 autocorrelation (r1).
    • Diagnostics (normality): Shapiro–Wilk W (3 ≤ n ≤ 5000), D'Agostino–Pearson omnibus K2 (n ≥ 8), Anderson–Darling A2* (n ≥ 5), and Lilliefors Kolmogorov–Smirnov D (n ≥ 5) evaluated on both untransformed data and ln(Y) (lognormality, when strictly positive).
    • NormalQq (normal-qq): Blom (1958) plotting positions pi= (i - 3/8) / (n + 1/4) and normal/lognormal z quantiles.
    • MainSummary (one-sample): When hypothetical_value is set, one-sample t-test (t, df, P) and Wilcoxon signed-rank test (W, P, Pratt 1959 zero handling and Hodges–Lehmann pseudomedian/Walsh-average CI).
  • Assumptions & QOL-7 diagnostics: Appends Shapiro–Wilk normality ChecklistItem per column (Pass if P > α, Warn if P ≤ α) plus Info checklist notes when ignoring non-numeric text cells; strictly remediation: None.
  • Edge cases & limits: On pre-summarized subcolumns (MeanSdN, MeanSemN, MeanCvN), summarize_pre_summarized_points reconstructs exact pooled Mean, SD, SEM, N, and CI of Mean (nonparametric quantiles, medians, Q-Q plots, and normality/Wilcoxon tests require raw values and are omitted); ZeroVariance suppresses t-statistics cleanly while reporting constant summaries; EmptyInput when no finite numeric cell remains.
  • Published D1 references & oracle verification: Hyndman & Fan (1996) Type-7 quantiles; Royston (1995) AS R94 Shapiro–Wilk; D'Agostino, Belanger & D'Agostino (1990) K2; Anscombe & Glynn (1983); Stephens (1986) Anderson–Darling; Lilliefors (1967) & Dallal & Wilkinson (1986); Pratt (1959) & Hollander, Wolfe & Chicken (2014); Kirkwood (1979) geometric SD; verified by NIST StRD Univariate (nist_strd.rs >= 14.5 LRE), d1_reference_oracles.rs, d1_extended_stats_oracles.rs (SciPy 1.18.1 normaltest/anderson & statsmodels 0.15.0 normal_ad/lilliefors), and r017_lilliefors_oracles.rs.

Outlier Detection (Grubbs & ROUT)

  • Purpose & compatible tables: Screens each column independently for single or multiple univariate statistical outliers using either normal-theory Grubbs Extreme Studentized Deviate (ESD) or robust ROUT false-discovery-rate screening. Compatible with Column, Xy, Grouped, and MultipleVariables tables (see Analysis Registry: outlier-detection).
  • Engine command & canonical options/defaults: Run via analyze.run or stats.run with shorthands outliers (canonical), outlier, rout, or grubbs.
    • ROUT (OutlierSpec::Rout, default shorthand "rout" / "outliers"): fdr_q_percent in (0.0, 100.0] (default 1.0 for Q = 1%). Note univariate column ROUT permits Q ∈ (0, 100], whereas curve-fitting ROUT restricts Q ∈ (0, 50].
    • Grubbs (OutlierSpec::Grubbs): alpha in (0.0, 1.0) (default 0.05) and iterative (bool, default false for single outlier vs true for sequential ESD elimination).
  • Reported values: MainSummary (outliers — "Identified Outliers") listing Column, 1-based Row Index, observed Value, test Statistic (G or ti= |yi- M| / RSDR), and Threshold / P (Grubbs critical Gcrit or BH adjusted q-value). Emits scalars OutlierCount per column, plus RobustCenter and RSDR under ROUT.
  • Assumptions & QOL-7 diagnostics: Grubbs assumes approximate normality of the clean core; ROUT uses the median and 68.27% percentile RSDR across absolute deviations from the median, testing only the top 30% furthest observations via Benjamini–Hochberg (1995). Checklist reports detected outlier count (Info if > 0, Pass if 0, remediation: None) noting that experimental provenance governs whether a flagged cell should be excluded.
  • Edge cases & limits: Grubbs requires n ≥ 3 and returns zero outliers when SD= 0; ROUT handles n ≥ 3 without masking multiple extreme outliers; zero-spread clean cores (RSDR at floating-point floor) protect against dividing by zero while still flagging points strictly away from constant mass. Non-numeric cells are ignored with an audit note.
  • Published D1 references & oracle verification: Grubbs (1969); Rosner (1983) generalized ESD; Motulsky & Brown (2006) ROUT & Benjamini & Hochberg (1995); verified by d1_reference_oracles.rs, d1_extended_stats_oracles.rs, and d1_edge_matrix.rs.

Two-Group & One-Sample Comparisons

  • Purpose & compatible tables: Compares two independent columns, matched pairs, or a single column against a hypothetical location across parametric, lognormal/ratio, and nonparametric rank/distribution methods. Compatible with Column and MultipleVariables tables (using mv_group_column + mv_response_column to split a two-level factor in long tables; see Analysis Registry: two-group-comparison).
  • Engine command & canonical options/defaults: Run via analyze.run or stats.run with shorthands unpaired_t (canonical), t_test, unpaired_t_test, welch_t, paired_t, ratio_paired_t, lognormal_unpaired_t, mann_whitney, wilcoxon, wilcoxon_matched_pairs, kolmogorov_smirnov, ks_test, paired_sign_test, sign_test, one_sample_t, one_sample_wilcoxon. Canonical keys:
    • method: selects among unpaired_t (default), welch_t, paired_t, ratio_paired_t, lognormal_unpaired_t, mann_whitney, wilcoxon_signed_rank, kolmogorov_smirnov, paired_sign_test, one_sample_t { hypothetical }, one_sample_wilcoxon { hypothetical }.
    • two_tailed: bool (default true). Note one-tailed rank tests evaluate the tail strictly in the observed sample direction (r35_survival_twogroup_oracles.rs).
    • compute_effect_sizes: bool (default true): reports Cohen's d, Hedges' g, Glass's Δ with noncentral-t confidence intervals, R2 (η2), plus rank-biserial correlation / Cliff's δ (MannWhitney, Wilcoxon), or matched-pair difference metrics.
    • mv_group_column, mv_response_column, hypothetical.
  • Reported values: MainSummary tab (two-group, paired-t, mann-whitney, etc.) reporting group means/medians, difference/ratio of means or Hodges–Lehmann median shift (ConfidenceInterval), test statistic (t, U, W, DKS, S), df, P value, variance equality F-test and median-centered Levene / Brown–Forsythe test (unpaired tests), pairing correlation r & P (paired_t / ratio_paired_t), and requested effect sizes. For ratio_paired_t and lognormal_unpaired_t, back-transforms geometric mean ratios exp(Δ ȳln) and CIs.
  • Assumptions & QOL-7 diagnostics: Evaluates group Shapiro–Wilk normality, F-test / Levene homoscedasticity, pairing effectiveness (r, including warning if r ≤ 0 or |r| = 1 degenerate), Hodges–Lehmann CI achieved coverage (exact binomial / Wilcoxon distribution bounds may fall slightly below nominal conf% for small n), and non-positive values in lognormal/ratio methods (InvalidParameter). All checklist entries keep remediation: None.
  • Edge cases & limits: Supports pre-summarized subcolumns (MeanSdN, MeanSemN, MeanCvN) for parametric unpaired_t, welch_t, and one_sample_t (*_from_summary, retaining exact variance F-test while omitting raw-only levene_median); exact permutation/Wilcoxon distributions apply for moderate sizes with tie-corrected normal asymptotic fallback (Pratt 1959 zero-difference handling; exact O((m+n)log(mn)) order-statistic selection for Hodges–Lehmann when m · n > 40000). Non-paired complete-case filtering skips rows where either paired column is blank/excluded with an audit checklist note.
  • Published D1 references & oracle verification: Student (1908); Welch (1947); Satterthwaite (1946); Mann & Whitney (1947); Wilcoxon (1945); Pratt (1959); Hodges & Lehmann (1963); Moses interval; Smirnov (1948) & Hodges (1958) two-sample KS; Dixon & Mood (1946) sign test; Cohen (1988), Hedges (1981), & Steiger & Fouladi (1997) noncentral-t effect-size CIs; Cliff (1993) & Wendt (1972) / Kerby (2014); Levene (1960) & Brown & Forsythe (1974a); verified by d1_reference_oracles.rs, d1_extended_stats_oracles.rs, r35_survival_twogroup_oracles.rs, and wave21_r97_r912_clustering.rs.

Bland–Altman Method Comparison

  • Purpose & compatible tables: Evaluates agreement between two quantitative measurement assays on matched subjects by computing pair-wise differences (A - B or % difference 100 · (A - B) / ((A + B)/2)) versus pair averages (A + B) / 2, estimating mean bias and 95% (or confidence_level) Limits of Agreement (LoA= bias± z1-α/2· SDdiff). Compatible with Column, Xy, and MultipleVariables tables (see Analysis Registry: bland-altman).
  • Engine command & canonical options/defaults: Run via analyze.run or stats.run with shorthands bland_altman (canonical) or stats.bland_altman.
    • column_a: 0-based index of method A (default 0).
    • column_b: 0-based index of method B (default 1).
    • percent_difference: bool (default false for absolute A - B; true for percentage difference).
    • xy_compare_x_vs_y: optional bool on Xy tables (Some(true) forces X vs Y0; Some(false) uses Y[column_a] vs Y[column_b]; None defaults to X vs Y0 when one Y dataset exists and Y datasets otherwise).
  • Reported values:
    • MainSummary tab (bland-altman): Number of paired subjects n, Mean Bias with SE and conf% t-based CI, SD of differences, Lower and Upper Limits of Agreement (bias± z1-α/2· SDdiff) with exact Bland–Altman (1999) asymptotic standard errors SD√1/n + z2/ (2(n - 1)) and t-CIs, plus proportional-bias OLS slope/intercept/P regressing difference on average.
    • Residuals tab: Per-pair (Average, Difference) coordinates for Bland–Altman scatter plotting.
  • Assumptions & QOL-7 diagnostics: Checks normality of paired differences (Shapiro–Wilk when 3 ≤ n ≤ 5000), checks proportional bias (P value of difference-vs-mean slope), and emits complete-case pair filtering notices (remediation: None).
  • Edge cases & limits: Fails with ZeroVariance / InvalidParameter under percent_difference: true if any pair has average (A + B)/2 = 0; skips incomplete rows where either method is empty or excluded; rejects pre-summarized tables when raw subject pairs are required.
  • Published D1 references & oracle verification: Bland & Altman (1986, 1999); verified against R 4.5.2 in d1_reference_oracles.rs, d1_extended_stats_oracles.rs, and audit_twogroup_col_fixes.rs.

Multiple Row-Wise t-Tests & Nonparametric Tests

  • Purpose & compatible tables: Executes independent or paired two-group comparisons independently across every row of a table (common in high-throughput screening, dose/time response tables, or volcano-plot workflows), applying FWER or FDR multiplicity adjustment across all testable rows. Compatible with Grouped, Xy, Column (pairing replicate column blocks), and MultipleVariables tables (see Analysis Registry: multiple-row-t-tests).
  • Engine command & canonical options/defaults: Run via analyze.run or stats.run with shorthands multiple_row_t_tests (canonical), stats.multiple_row_t_tests, multiple_row_tests, multiple_t_tests.
    • paired: bool (default false). Requires matched replicate subcolumns within Grouped/Xy or an even number (≥ 4) of selected columns in Column tables.
    • nonparametric: bool (default false; runs Mann–Whitney U or Wilcoxon signed-rank per row when true).
    • assume_equal_sd: bool (default true; Student pooled variance when true, Welch–Satterthwaite when false; applies only when !paired && !nonparametric).
    • multiplicity, threshold (default 0.05), report_confidence_intervals, control_column (supports BenjaminiHochbergFdr, TwoStageBkyFdr, BenjaminiYekutieliFdr, HolmSidak, Bonferroni, Sidak, or None).
  • Reported values:
    • MainSummary & MultipleComparisons (multiple-row-comparisons) tabs: Per-row nA, nB, Mean/Median difference, SE, test statistic, raw unadjusted P, adjusted P or FDR q-value, -log10(P) volcano coordinates, Discovery? boolean flag, and optional CI of difference.
  • Assumptions & QOL-7 diagnostics: Reports how many rows were evaluated vs skipped (due to insufficient finite replicates or degenerate zero variance in both samples) plus multiplicity control family summary (FWER vs FDR, remediation: None).
  • Edge cases & limits: Strictly rejects pre-summarized subcolumns (StatsError::RequiresRawReplicates) across Grouped, Xy, and Column inputs because raw replicate cells per row are required. On Column tables with split-group selection, requires at least 4 selected columns (even count when paired: true).
  • Published D1 references & oracle verification: Benjamini & Hochberg (1995); Benjamini, Krieger & Yekutieli (2006); Holm (1979); Šídák (1967); verified in r35_power_multiplicity_oracles.rs, d1_extended_stats_oracles.rs (statsmodels 0.15.0 fdr_tsbky), and audit_twogroup_col_fixes.rs.

Passing–Bablok Regression

  • Purpose & compatible tables: Fits Passing & Bablok (1983) nonparametric errors-in-variables linear method-comparison regression Y = α + β X, resilient to outliers and measurement error in both X and Y. Compatible with Column, Xy, and MultipleVariables tables (see Analysis Registry: passing-bablok).
  • Engine command & canonical options/defaults: Run via analyze.run or stats.run with shorthands passing_bablok (canonical) or stats.passing_bablok.
    • x_column: 0-based index of reference assay column X (default 0).
    • y_column: 0-based index of candidate assay column Y (default 1).
  • Reported values: MainSummary and ParametersAndConfidenceIntervals tabs plus scalars (Slope, Slope CI lower/upper, Intercept, Intercept CI lower/upper, CUSUM H, CUSUM statistic, CUSUM P value, N, Valid slopes, K offset) and Residuals tab with fitted values and perpendicular/vertical residuals. Slope β̂ is the shifted median of valid non--1 pairwise slopes Sij= (yi- yj)/(xi- xj) with rank offset K = count(Sij< -1), accompanied by exact rank-based CIs and Intercept α̂ = median(yi- β̂ xi).
  • Assumptions & QOL-7 diagnostics: Evaluates Passing & Bablok's Kolmogorov-type CUSUM linearity test (H, test statistic, P value) and tests whether slope 95% CI excludes 1 (proportional bias) and intercept CI excludes 0 (systematic bias), with remediation: None.
  • Edge cases & limits: Requires n ≥ 3 complete pairs; vertical identical-x ties with yi≠ yj are handled per Passing & Bablok (excluding exact (xi, yi) = (xj, yj) identical ties and dropping Sij= -1 symmetrically); raises ZeroVariance when zero valid pairwise slopes or vertical-only ties remain; rejects pre-summarized XY subcolumns.
  • Published D1 references & oracle verification: Passing & Bablok (1983), verified bit-accurately against exact rank-order & CUSUM Python 3.13 / R references in parity_g8_barnard_pb_mi.rs.

One-Way ANOVA & Nonparametric Equivalents

  • Purpose & compatible tables: Compares k ≥ 2 treatment groups across independent columns (OrdinaryAnova, heteroscedastic BrownForsytheAndWelch, nonparametric KruskalWallis) or matched repeated-measures subject rows (RepeatedMeasures, mixed-effects REML, nonparametric Friedman), with FWER/FDR post-hoc comparisons, trend tests, and Compact Letter Displays (CLD). Compatible with Column and MultipleVariables tables (see Analysis Registry: one-way-anova).
  • Engine command & canonical options/defaults: Run via analyze.run or stats.run with shorthands one_way_anova (canonical), anova, welch_anova, brown_forsythe, rm_one_way_anova, repeated_measures_anova, kruskal_wallis, friedman.
    • method: ordinary_anova (default), brown_forsythe_and_welch, repeated_measures, kruskal_wallis, friedman.
    • geisser_greenhouse: bool (applies to repeated_measures).
    • mixed_effects_reml: bool (default false; engages REML automatically when repeated-measures subjects have missing cells, or explicitly on complete tables).
    • df_method: kenward_roger (default) or satterthwaite.
    • residual_covariance: compound_symmetry (default) or unstructured (log-Cholesky Pinheiro–Bates REML covariance parameterization with documented fallbacks to compound symmetry when under-identified).
    • compute_effect_sizes: bool (reports η2, ω2, Cohen's f with exact noncentral-F CIs, or ε2 / Kendall's W).
    • multiplicity, threshold (default 0.05), report_confidence_intervals, control_column.
  • Reported values:
    • AnovaTable (anova-table, unequal-var-anova, rm-one-way-anova, kruskal-wallis, friedman): Treatment/Residual/Total SS, df, MS, F (or Welch W / Brown–Forsythe F* / Kruskal–Wallis H / Friedman χ2F), and P value.
    • Diagnostics: Bartlett and Brown–Forsythe median-Levene variance homogeneity tests (ordinary/unequal-var ANOVA); Mauchly W, Greenhouse–Geisser ε̂, and Huynh–Feldt ε̃ sphericity (RM ANOVA).
    • ParametersAndConfidenceIntervals & CovarianceMatrix: REML random-effect / error variance components or estimated unstructured residual covariance matrix.
    • MultipleComparisons: Pairwise mean/rank differences, SEs, raw and adjusted P or q-values, CIs (omitted for NewmanKeuls where simultaneous CIs are undefined), and Piepho (2004) CLD groupings (Graphs brackets & letter tokens).
  • Assumptions & QOL-7 diagnostics: Tests group normality (Shapiro–Wilk per group), variance homogeneity (Bartlett / Brown–Forsythe), RM sphericity (ε̂ < 0.75 triggers Warn), REML boundary variance (σ̂2random= 0 Info vs optimizer upper search bound Warn), and listwise missing-block exclusion counts in non-REML RM/Friedman; strictly remediation: None.
  • Edge cases & limits: Supports pre-summarized subcolumns (MeanSdN, MeanSemN, MeanCvN) for OrdinaryAnova and BrownForsytheAndWelch (ordinary_one_way_from_summary), omitting Levene/normality checks that require raw replicates; REML handles unbalanced/incomplete subject blocks automatically unless unstructured covariance falls back cleanly on collinear/degenerate timepoints (UnstructuredFallbackReason). Nonparametric Friedman drops incomplete rows listwise with an audit note.
  • Published D1 references & oracle verification: NIST StRD ANOVA suite (nist_strd.rs >= 12+ LRE); Zar (2010); Welch (1951); Levene (1960) & Brown & Forsythe (1974a,b); Steiger (2004) noncentral-F effect-size CIs; Mauchly (1940); Greenhouse & Geisser (1959); Huynh & Feldt (1976); Patterson & Thompson (1971); Pinheiro & Bates (1996); Kenward & Roger (1997); Fai & Cornelius (1996); Kruskal & Wallis (1952); Friedman (1937); Tukey (1949/1953) & Kramer (1956); Newman (1939) & Keuls (1952); Dunnett (1955, 1980); Games & Howell (1976); Tamhane (1979); Dunn (1964); Piepho (2004) CLD; verified against R 4.5.2 stats & nlme in d1_reference_oracles.rs, d1_extended_stats_oracles.rs, r1011_cld_piepho_oracles.rs, r34_unstructured_reml_oracles.rs, r35_anova_reml_oracles.rs, r36_rm_reml_oracles.rs.

Two-Way, Three-Way & Multifactor ANOVA / REML

  • Purpose & compatible tables: Fits fixed-effects or repeated-measures factorial linear models and mixed-effects REML models (two-way row-by-column, three-way 2 × 2 × K in Grouped tables, and general N-way multifactor ANOVA on MultipleVariables sheets) with Type I or Type III marginal sums of squares, interactions, and simple-effects or main-effect post-hoc comparisons. Compatible with Grouped and MultipleVariables tables (see Analysis Registry: factorial-anova).
  • Engine command & canonical options/defaults: Run via analyze.run or stats.run with shorthands two_way_anova (canonical), factorial_anova, or three_way_anova.
    • three_way: bool (default false; expects 4 grouped dataset columns encoding 2 × 2 factors by K row levels).
    • multifactor_columns, response_column: factor and outcome column indices on MultipleVariables sheets.
    • max_interaction_order: integer interaction cap (e.g., 2 or 3).
    • ss_type: type_iii (default marginal SS for unbalanced designs) or type_i (sequential).
    • repeated_measures: none (default), column_factor_matched, row_factor_matched, both_factors_matched.
    • mixed_effects_reml: bool, df_method (kenward_roger default or satterthwaite), residual_covariance (compound_symmetry default or unstructured), fit_reml_on_missing: bool (default true in REML paths; errors with InsufficientSampleSize if missing RM cells exist and fit_reml_on_missing: false without unstructured/REML).
    • compute_effect_sizes, multiplicity, threshold (default 0.05), report_confidence_intervals, control_column.
  • Reported values: AnovaTable (factorial-anova) with main effects, interactions, subject/residual terms, SS, df, MS, F (or scaled Kenward–Roger F*), P, partial η2 / ω2; Diagnostics (rm-sphericity) with Greenhouse–Geisser & Huynh–Feldt ε on repeated-measures factors; ParametersAndConfidenceIntervals & CovarianceMatrix for REML variance components / unstructured covariance; MultipleComparisons for cell/simple-effect and main-effect comparisons (requiring explicit valid control_column when Dunnett is chosen).
  • Assumptions & QOL-7 diagnostics: Evaluates residual/cell normality and variance checks, sphericity ε thresholds, REML boundary/convergence diagnostics, dropped empty levels or incomplete RM cells (remediation: None).
  • Edge cases & limits: Strictly rejects pre-summarized subcolumns (StatsError::RequiresRawReplicates on Grouped tables); compacts empty/fully-excluded factor levels cleanly before Type III effect coding; falls back from Unstructured to CompoundSymmetry REML when subject covariance is non-positive-definite or under-observed (recording UnstructuredFallbackReason in checklist & footnote); rejects missing cells when fit_reml_on_missing is false.
  • Published D1 references & oracle verification: Searle (1987); Maxwell & Delaney (2004); Zar (2010); Lindstrom & Bates (1988); Pinheiro & Bates (1996); Kenward & Roger (1997); Fai & Cornelius (1996); verified against R 4.5.2 aov/car/nlme in d1_reference_oracles.rs, d1_edge_matrix.rs, r34_unstructured_reml_oracles.rs, r35_anova_reml_oracles.rs, r36_rm_reml_oracles.rs.

Nested t-Test & Nested One-Way ANOVA

  • Purpose & compatible tables: Fits a hierarchical mixed-effects model separating fixed treatment-group effects from random subcluster (biological unit) variance and technical within-subcluster residual variance, preventing pseudoreplication on clustered experimental designs. Supports two-group nested t-test (t = sqrt(F) with signed difference) or k ≥ 3 nested one-way ANOVA with hierarchical post-hoc comparisons. Exclusively compatible with Nested tables (see Analysis Registry: nested-comparison).
  • Engine command & canonical options/defaults: Run via analyze.run or stats.run with shorthands nested_anova (canonical), nested_t, nested.
    • two_group_t_test: bool (default false; requires exactly 2 selected treatment groups when true).
    • df_method: kenward_roger (default) or satterthwaite.
    • multiplicity, threshold (default 0.05), report_confidence_intervals, control_column (applies when !two_group_t_test && k >= 3).
  • Reported values:
    • AnovaTable (nested-anova): Among-groups, among-subclusters within groups, and technical residual SS, df (KR or Satterthwaite), MS, F (or signed t and CI difference in nested_t), and P values.
    • ParametersAndConfidenceIntervals (variance-components): REML variance estimates (σ̂2subcluster, σ̂2error), SD, percentage of total variance, ICC (ICCsubclusters), plus both KR and Satterthwaite denominator df.
    • MultipleComparisons: Group-level comparisons using hierarchical group-mean variance σ̂u2(ng12+ … + ngm2) / Ng2+ σ̂e2/ Ng.
  • Assumptions & QOL-7 diagnostics: Checklist evaluates biological-vs-technical clustering ICC (Pass when ICC> 0.05, Info otherwise) and REML boundary status (zero-boundary σ̂2subcluster= 0 Info vs search-limit Warn), keeping remediation: None.
  • Edge cases & limits: Unequal technical replicate counts per subcluster and unequal subclusters per treatment group are natively modeled via exact REML rather than unweighted pooling; non-numeric or excluded technical replicates are ignored cleanly.
  • Published D1 references & oracle verification: Zar (2010); Satterthwaite (1946); Kenward & Roger (1997); verified in d1_reference_oracles.rs, r35_anova_reml_oracles.rs, and r36_rm_reml_oracles.rs.

Contingency, Proportions, Odds/Risk Ratios & Agreement

  • Purpose & compatible tables: Evaluates categorical count tables for independence, exact conditional/unconditional 2 × 2 association, trend across ordered proportions, paired discordance, inter-rater agreement, and one-sample or multinomial proportion goodness-of-fit. Table compatibility is method-dependent: Contingency accepts all methods; PartsOfWhole accepts pearson_chi_square and exact_binomial; Column accepts exact_binomial only (see Analysis Registry: contingency).
  • Engine command & canonical options/defaults: Run via analyze.run or stats.run with shorthands contingency (canonical), chi_square, fisher_exact, barnard_exact, stats.barnard_exact, cohen_kappa, kappa, fleiss_kappa, exact_binomial, binomial.
    • method: pearson_chi_square (with yates_continuity bool for 2 × 2), likelihood_ratio_g2, fisher_exact (2 × 2 conditional exact + R × C Freeman–Halton network / deterministic Monte Carlo), barnard_exact (2 × 2 unconditional CSM/Boschloo supremum over π ∈ (0, 1)), cochran_armitage_trend (2 × C or R × 2), mcnemar_paired (2 × 2), cohen_kappa (square k × k, with weighting: unweighted, linear, quadratic), fleiss_kappa (N subjects × k categories), exact_binomial (null_proportion p0∈ (0, 1), default 0.5).
    • Additional flags: compute_odds_and_risk_ratios (Baptista–Pike exact OR CI, Koopman score RR CI, Newcombe Wilson-score RD CI, Altman NNT), compute_sensitivity_specificity (sensitivity, specificity, PPV, NPV, LR+ with Wilson CIs), compute_phi_and_cramers_v (with exact noncentral-χ2 CIs), expected_proportions (custom non-negative weights for PartsOfWhole goodness-of-fit, normalized internally; uniform 1/k when None).
  • Reported values: MainSummary (contingency-main, parts-gof), ParametersAndConfidenceIntervals (contingency-ratios, contingency-mcnemar, kappa-agreement, etc.), and Diagnostics tabs reporting test statistics (χ2, G2, z, κ, φ, V), exact/asymptotic P values, OR/RR/RD/NNT and diagnostic accuracy CIs, plus Clopper–Pearson, Wilson, and Agresti–Coull binomial intervals.
  • Assumptions & QOL-7 diagnostics: Flags Cochran's expected-cell rule (expected counts < 5 or < 1), warns on empty zero margins dropped prior to analysis (Empty margin reduction), checks pe= 1 degenerate kappa cases (ZeroVariance), and reports sparse count notes with remediation: None.
  • Edge cases & limits: All-zero margin rows/columns are trimmed before association tests (failing with EmptyInput or InsufficientSampleSize if the reduced table falls below 2 × 2); non-integer or negative counts fail table count validation; CochranArmitageTrend returns None statistics outside 2 × C / R × 2 or at zero variance; large sparse R × C Fisher exact sums use exact bounded enumeration / deterministic Monte Carlo cleanly.
  • Published D1 references & oracle verification: Pearson (1900); Yates (1934); Wilks (1938); Fisher (1935); Freeman & Halton (1951); Barnard (1945/1947) & Suissa & Shuster (1985); Cochran (1954) & Armitage (1955); McNemar (1947); Baptista & Pike (1977); Koopman (1984); Newcombe (1998); Altman (1998); Clopper & Pearson (1934) & Sterne (1954); Wilson (1927); Agresti & Coull (1998); Cohen (1960, 1968); Fleiss (1971); Fleiss, Cohen & Everitt (1969); Fleiss, Nee & Landis (1979); verified in d1_reference_oracles.rs, d1_extended_stats_oracles.rs (statsmodels 0.15.0 unweighted/linear/quadratic cohens_kappa), parity_g8_barnard_pb_mi.rs, and wave21_r97_r912_clustering.rs.

Survival Analysis (Kaplan–Meier & Cox PH)

  • Purpose & compatible tables: Fits nonparametric Kaplan–Meier survival curves with cohort log-rank / Gehan–Breslow–Wilcoxon / trend comparisons and hazard ratios, or multivariable semi-parametric Cox Proportional Hazards regression h(t | X) = h0(t)exp(X β) with Schoenfeld PH diagnostics. Compatible with Survival tables (KaplanMeier) and MultipleVariables tables (KaplanMeier via mv_time_column, mv_status_column, optional mv_group_column; CoxProportionalHazards via time_column, status_column, predictor_columns; see Analysis Registry: survival).
  • Engine command & canonical options/defaults: Run via analyze.run or stats.run with shorthands kaplan_meier (canonical), survival, log_rank, cox_ph, or cox.
    • Kaplan–Meier: log_rank_mantel_cox (bool), gehan_breslow_wilcoxon (bool), trend_test (Tarone 1975 1-df trend when ≥ 3 cohorts), asymmetrical_greenwood_ci (bool, default Kalbfleisch–Prentice ln(-lnS(t)) bounds guaranteed in [0, 1] vs plain linear Greenwood), multiplicity, threshold (default 0.05), report_confidence_intervals, control_column, mv_time_column, mv_status_column, mv_group_column.
    • Cox PH: time_column, status_column, predictor_columns, reference_levels, tie_method (efron default, breslow, exact).
  • Reported values:
    • Kaplan–Meier: MainSummary (km-summary, median survival with Brookmeyer–Crowley 1982 CIs, subjects/events/censored), NumberAtRisk, ModelComparison (log-rank, Gehan–Breslow–Wilcoxon, trend χ2, df, P), ParametersAndConfidenceIntervals (Mantel–Haenszel and O/E log-rank hazard ratios with strict estimability checks), MultipleComparisons (survival-pairwise for ≥ 3 cohorts), and fitted_curves step coordinates.
    • Cox PH: ParametersAndConfidenceIntervals (cox-ph with β̂j, SE, Wald z, P, hazard ratio exp(β̂j), Wald CI, plus likelihood-ratio omnibus χ2), CovarianceMatrix, BaselineSurvival (H0(t), S0(t) at design means), LogMinusLog (ln(-lnŜ(t)) diagnostics), Harrell's C-index, and Grambsch–Therneau Schoenfeld proportional-hazards tests.
  • Assumptions & QOL-7 diagnostics: Reports proportional-hazards Schoenfeld P checks, monotone-likelihood separation / covariate collinearity warnings in Cox PH (suppressing unstable Wald SE/CI entries while preserving omnibus LR P), small-event warnings, and Harrell's C-index diagnostics (remediation: None).
  • Edge cases & limits: Negative follow-up times or invalid censoring indicators fail validation; zero events in one or both arms make O/E hazard ratio SE (√1/EA+ 1/EB) or Mantel–Haenszel HR non-estimable (None); Brookmeyer–Crowley median CI becomes open on the right when S(t) never crosses 0.5 or its upper bound; complete/partial monotone covariate separation in Cox PH sets converged = false cleanly rather than emitting diverging infinite estimates.
  • Published D1 references & oracle verification: Kaplan & Meier (1958); Greenwood (1926); Kalbfleisch & Prentice (2002); Brookmeyer & Crowley (1982); Mantel (1966) & Mantel–Haenszel (1959); Greenland & Robins (1985); Peto & Peto (1972); Gehan (1965); Breslow (1970, 1974); Tarone (1975); Berry, Kitchin & Mock (1991); Cox (1972); Efron (1977); Schoenfeld (1982); Grambsch & Therneau (1994); Harrell et al. (1982); verified against R 4.5.2 survival 3.8.3 in d1_reference_oracles.rs, d1_poisson_cox_result_sheets.rs, d1_edge_matrix.rs, r35_survival_twogroup_oracles.rs, and r13_2_survival_group_exclusion.rs.

ROC Curve Analysis

  • Purpose & compatible tables: Constructs empirical Receiver Operating Characteristic (ROC) curves comparing a negative control distribution against a positive case distribution, estimating trapezoidal AUC, standard error, confidence interval, P value vs AUC = 0.5, Youden's J optimal threshold, and full cutoff sensitivity/specificity/PPV/NPV/LR+ tables. Compatible with Column and MultipleVariables tables (see Analysis Registry: roc-curve).
  • Engine command & canonical options/defaults: Run via analyze.run or stats.run with canonical key/shorthand roc:
    • ci_method: de_long (default, DeLong et al. 1988 exact structural components) or hanley_mc_neil (Hanley & McNeil 1982 exponential approximation). Pairwise DeLong correlated and unpaired two-curve AUC comparisons are also supported in curvebook-stats::roc.
  • Reported values:
    • MainSummary (roc-summary): AUC, SE, conf% AUC CI, P value testing AUC= 0.5, sample sizes (ncontrols, ncases), optimal cutoff, sensitivity, specificity, and maximum Youden's J = Sens+ Spec- 1.
    • CurveCoordinates (roc-coordinates): Full threshold table (Cutoff, Sensitivity, Specificity, 1 - Specificity, Youden J, PPV, NPV, LR+) plus FittedCurveOverlay points for plotting.
  • Assumptions & QOL-7 diagnostics: Flags AUC< 0.5 (Warn discrimination-direction check assuming higher values represent cases) and warns when ncontrols< 2 or ncases< 2 (single-subject group disables DeLong variance estimation and switches to Hanley–McNeil SE, Wilson score CI, and exact Mann–Whitney U P value); remediation: None.
  • Edge cases & limits: Correctly handles ties at every cutoff using midpoint rank aggregation; LR+ leaves None/empty cell when Specificity= 1; requires at least one valid finite observation in both controls and cases.
  • Published D1 references & oracle verification: DeLong, DeLong & Clarke-Pearson (1988); Hanley & McNeil (1982); Youden (1950); verified against R 4.5.2 in d1_reference_oracles.rs and audit_cat_roc_pow_fixes.rs.

Generalized Linear Models (Linear, Logistic, Poisson)

  • Purpose & compatible tables: Fits multivariable Generalized Linear Models across Gaussian identity (linear), Binomial logit (logistic), and Poisson log (poisson) exponential-dispersion families with dummy-encoded categorical predictors, optional VIF collinearity metrics, residual diagnostics, and goodness-of-fit statistics. Compatible with MultipleVariables, Xy, and Column tables (see Analysis Registry: generalized-linear-model).
  • Engine command & canonical options/defaults: Run via analyze.run or stats.run with shorthands glm (canonical), linear_glm, multiple_linear, logistic_glm, multiple_logistic, poisson_glm, multiple_poisson.
    • family: linear (default), logistic, poisson.
    • response_column: 0-based dependent variable index.
    • predictor_columns: ordered list of covariate / categorical predictor indices.
    • reference_levels: list of (categorical_col_idx, reference_level_label) overrides for treatment dummy coding.
    • compute_vif: bool (default true on multivariable designs).
  • Reported values:
    • linear: Coefficient estimates, SEs, t, P, conf% t-CIs, VIF, Type III partial SS/F/P; R2, adjusted R2, Sy.x, omnibus F and P, AIC, AICc, BIC, Durbin–Watson, studentized residuals, leverage, and Cook's distance (MainSummary, ParametersAndConfidenceIntervals, Diagnostics).
    • logistic: Log-odds β̂j, SE, Wald z, P, odds ratios exp(β̂j) with Wald CIs, likelihood-ratio χ2, P, McFadden / Nagelkerke / Tjur pseudo-R2, AIC, AICc, Hosmer–Lemeshow χ2 & P, ROC AUC, and classification cutoff sweep table.
    • poisson: Log-rate β̂j, SE, Wald z, P, incidence rate ratios exp(β̂j) with Wald CIs (dispersion = 1), residual deviance, Pearson dispersion χ2/ df, LR χ2, P, McFadden pseudo-R2, AIC, AICc, and deviance residuals.
  • Assumptions & QOL-7 diagnostics: Checks rank deficiency/aliased collinear columns via SVD, high multicollinearity (VIF > 5 / VIF > 10), Gaussian residual normality (Shapiro–Wilk with remediation: None), Albert–Anderson (1984) complete or quasi-complete separation in logistic IRLS, Poisson overdispersion/convergence, and listwise complete-case row omissions.
  • Edge cases & limits: Binary outcomes outside {0, 1} fail in logistic; negative/non-count outcomes fail in poisson; categorical predictors reduced to < 2 levels after complete-case filtering raise ZeroVariance; requires n ≥ p + 1 complete rows (at least 3 rows on Xy tables); rejects pre-summarized subcolumns. In logistic separation, marks separation_detected = true cleanly without unbounded diverging iterations.
  • Published D1 references & oracle verification: NIST StRD Linear Least Squares (nist_strd.rs); Golub (1965) & Björck (1967) QR/SVD linear least squares; McCullagh & Nelder (1989); Albert & Anderson (1984); Hosmer & Lemeshow (1980); verified against R 4.5.2 stats::lm and stats::glm in d1_reference_oracles.rs, d1_edge_matrix.rs, and d1_poisson_cox_result_sheets.rs.

Multivariate Analysis (PCA, PCR, Correlation, Clustering, MICE)

  • Purpose & compatible tables: Unifies multivariate exploratory, clustering, supervised principal-component regression, and multiple-imputation pipelines (Pca, CorrelationMatrix, Clustering, MultipleImputation). Compatible with MultipleVariables, Xy, and Column tables (see Analysis Registry: multivariate).
  • Engine command & canonical options/defaults: Run via analyze.run or stats.run with shorthands pca (canonical), principal_components, correlation, correlation_matrix, clustering, kmeans, multiple_imputation, stats.multiple_imputation, mice.
    • PCA / PCR: standardize (bool, true = correlation PCA, false = covariance PCA), parallel_analysis_seed (optional Monte Carlo seed for Horn 1965 retention cutoffs), pcr_outcome_column (optional target outcome column triggering supervised Principal Component Regression).
    • Correlation matrix: spearman_rank (bool, false = Pearson r, true = Spearman ρ). Also provides standalone Pearson, Spearman, and Kendall τb utilities.
    • Clustering: distance (euclidean, manhattan, cosine, pearson_correlation_dissimilarity), linkage (single, complete, average UPGMA, weighted WPGMA, centroid UPGMC, median WPGMC, ward_d2 Murtagh–Legendre Ward criterion), k_means_k (optional k ≥ 2 partitioning via k-means++ Arthur & Vassilvitskii 2007), k_sweep_max (optional candidate-k WCSS & silhouette sweep).
    • Multiple imputation: imputations_m (2..=50), max_iters (1..=100), seed, response_column, predictor_columns (Chained Equations with Predictive Mean Matching MICE PMM, pooled via Rubin 1987 and Barnard–Rubin 1999 small-sample degrees of freedom).
  • Reported values:
    • PCA / PCR: MainSummary (pca-eigenvalues, pcr-summary with R2, adjusted R2, F, RMSE, AIC/BIC), ParametersAndConfidenceIntervals (pca-loadings, pcr-predictors back-transformed to original predictor scale, pcr-components), scores/biplot contributions, and Diagnostics (pcr-diagnostics leverage & Cook's D).
    • Correlation matrix: Symmetric matrix tabs (r, unadjusted P, and Benjamini–Hochberg adjusted q-values across off-diagonal pairs) plus pairwise sample sizes nij.
    • Clustering: MainSummary / ParametersAndConfidenceIntervals (cluster centroids, assignments, WCSS, mean silhouette), Diagnostics (linkage merge schedule, cut silhouettes, cophenetic correlation r), and CovarianceMatrix (dense distance and cophenetic matrices emitted when n ≤ MAX_CLUSTER_MATRIX_TAB_N).
    • Multiple Imputation: Pooled variable means and optional pooled OLS regression coefficients, pooled SE, t, P, conf% Barnard–Rubin CIs, and Fraction of Missing Information (FMI).
  • Assumptions & QOL-7 diagnostics: Flags dense distance-matrix omission for large n (while retaining cophenetic r and linkage tree), cluster separation quality (silhouette >= 0.25), Kaiser/parallel component retention, and imputation diagnostics (remediation: None).
  • Edge cases & limits: Correlation matrix evaluates pairwise complete cases cleanly (reporting NaN when pairwise n < 3 or zero variance and excluding non-estimable pairs from the BH family); clustering, PCA, and MICE enforce complete/finite numerical handling and explicitly reject pre-summarized subcolumns.
  • Published D1 references & oracle verification: Hotelling (1933) & Jolliffe (2002); Horn (1965); Pearson (1896); Fisher (1921); Spearman (1904); Kendall (1938, 1945); Lloyd (1982); Arthur & Vassilvitskii (2007); Rousseeuw (1987); Lance & Williams (1967); Ward (1963); Murtagh & Legendre (2014); Rubin (1987); Barnard & Rubin (1999); van Buuren & Groothuis-Oudshoorn (2011); verified in d1_reference_oracles.rs, d1_edge_matrix.rs, parity_g8_barnard_pb_mi.rs, and wave21_r97_r912_clustering.rs.

Simple & Deming Linear Regression

  • Purpose & compatible tables: Fits ordinary least-squares simple linear regression Y = β0+ β1X (including ANCOVA homogeneity-of-slopes and intercept comparisons when ≥ 2 datasets are selected) or Deming Model II orthogonal total least squares accounting for measurement error in both X and Y. Compatible with Xy, Grouped, and MultipleVariables tables (see Analysis Registry: linear-regression).
  • Engine command & canonical options/defaults: Run via analyze.run or fit.run with shorthands linear (canonical), simple_linear, linear_regression, deming, or deming_regression.
    • deming_model_ii: bool (default false; uses fixed orthogonal variance ratio λ = 1.0 with leave-one-out jackknife SEs; custom λ ratios are exposed via curvebook_fit::deming_regression).
    • force_through_origin: bool (default false; fixes β0= 0, df= n - 1).
    • confidence_bands, prediction_bands: bools enabling Working–Hotelling / Student-t confidence and prediction intervals.
    • interpolate_unknowns: bool enabling forward (X to Y) prediction and exact Fieller inverse calibration (Y to X, handling bounded Finite, split, or AllReals inverse sets).
    • x_range_filter: optional inclusive [x_min, x_max] predictor filter restricting points entering the fit (plot_x_min, plot_x_max, plot_segments default 100, hard cap 10,000 control overlay evaluation independently).
  • Reported values: MainSummary (Slope, Intercept, 1/slope, X-intercept, SEs, conf% CIs, R2, Pearson r, Sy.x, RSS, F, P, Wald–Wolfowitz runs test sorted along X, replicate lack-of-fit F test), ModelComparison (ANCOVA slope homogeneity and intercept/elevation comparisons across multiple datasets), InterpolatedUnknowns (Interpolated X / Interpolated Y), and curve bands.
  • Assumptions & QOL-7 diagnostics: Notes orthogonal Deming λ = 1.0 assumption, runs-test departure from linearity, replicate lack-of-fit, and range-filter exclusions (remediation: None).
  • Edge cases & limits: Returns InsufficientData when n ≤ 2 (or n < 1 when force_through_origin with nonzero X variance), rejects non-finite points or zero X variance (all X = 0 when forced through origin), and rejects pre-summarized inputs where raw pairs are needed; if slope == 0 or Deming jackknife variance collapses, X-intercept / 1/slope are omitted cleanly (None).
  • Published D1 references & oracle verification: Deming (1943); Linnet (1990) jackknife Deming SEs; Fieller (1954) inverse calibration; Zar (2010) ANCOVA slope/intercept comparison; verified against R 4.5.2 stats::lm in r13_1_d1_oracles.rs, d1_nist_and_pharma_oracles.rs, and d1_edge_matrix.rs.

Nonlinear Regression & Custom Equations

  • Purpose & compatible tables: Fits built-in parametric models (Parametric Equations Registry) or sandboxed custom algebraic, piecewise <A>/<B>, implicit, and first-order ODE equations using trust-region Levenberg–Marquardt, Poisson deviance IRLS, outlier-resistant Cauchy regression, or ROUT outlier elimination, supporting global parameter sharing, hooks, profile-likelihood CIs, model comparison, and unknown interpolation. Compatible with Xy, Grouped, and MultipleVariables tables (see Analysis Registry: nonlinear-regression; complete algorithmic details in Curve Fitting Reference).
  • Engine command & canonical options/defaults: Run via analyze.run or fit.run using shorthand nonlinear (canonical), aliases (nonlinear_regression, curve_fit, fit, custom_equation, custom_dsl), or any built-in equation ID directly as the kind shorthand (log_agonist_vs_response_4pl, michaelis_menten, etc.). Canonical parameter keys (NonlinearFitSpec):
    • Model: equation_id, custom_dsl.
    • Objective & weights: method (least_squares default, poisson_deviance, robust_cauchy, rout_outlier_elimination), fdr_q_percent (default 1.0, bounded to (0, 50]), weighting (none default, relative_square, relative, general_power_y + weighting_power, inverse_x, inverse_x2, observed_sd).
    • Constraints & solver: parameter_rules (scope: local, shared_global, constant, hooked_constant, per_dataset_constant, column_title_constant, plus initial_override, lower_bound, upper_bound), max_iters (default 1000, HARD_MAX_ITERS = 50,000), x_range_filter, y_range_filter, plot_function_only, plot_x_min, plot_x_max.
    • Uncertainty & diagnostics: profile_likelihood_ci (true default), identify_unstable_parameters, flag_r_squared_below, confidence_bands, prediction_bands, interpolate_unknowns, replicates_lack_of_fit_test, normality_of_residuals, homoscedasticity_test, emit_residuals_tab, emit_covariance_tab.
    • Model comparison: comparison (extra_sum_of_squares_f, aicc, likelihood_ratio_test), alternative_equation_id, shared_parameter_comparison.
  • Reported values: ParametersAndConfidenceIntervals (best-fit estimates, SEs, Venzon–Moolgavkar profile or Wald CIs including Open endpoints, dependency R2j, Hougaard |g1|, parameter notes, plus derived physiological scalars like EC50/t_half/Span), MainSummary (N, Kfree, df, unweighted R2 & rss, weighted_ss, Sy.x or RSDR, AICc, BIC, runs test, replicates lack-of-fit, Shapiro–Wilk/Anderson–Darling/Lilliefors normality, Spearman homoscedasticity), Residuals, CovarianceMatrix, ModelComparison, InterpolatedUnknowns (Interpolated Mean X / Interpolated Replicates with Extrapolated flags), and Diagnostics (fit_auc). See Curve Fitting Reference.
  • Assumptions & QOL-7 diagnostics: Under robust_cauchy, omits parametric covariance/CIs/bands cleanly (InferenceAvailability::NotApplicableInRobustMode); flags Ambiguous / Unstable fits when Jacobian rank is deficient, Dependency > 0.9999, or profile bounds plateau; flags Dependency > 0.99, |g1| > 1.0, and unweighted R2< flag_r_squared_below (remediation: None).
  • Edge cases & limits: Honors exact replicate sufficient statistics on pre-summarized XY subcolumns (MeanSdN, MeanSemN, MeanCvN); enforces strict DSL/ODE compilation and step limits (MAX_AST_NODES = 4,096, MAX_ODE_STEPS = 50,000; see Curve Fitting Reference: Caps).
  • Published D1 references & oracle verification: NIST StRD NLS (nist_strd.rs), d1_nist_reparam_builtins.rs, d1_nist_and_pharma_oracles.rs, d1_non_nist_fitting.rs, d1_custom_equations.rs, d1_fit_uncertainty.rs, r45_robust_suppression.rs, and r13_1_d1_oracles.rs (Curve Fitting Reference: D1 Verification).

Analyze a Stack of P Values

  • Purpose & compatible tables: Treats one or more numeric columns containing raw hypothesis-test P values p ∈ [0.0, 1.0] as standalone testing families, returning multiplicity-adjusted P values (FWER) or Benjamini–Hochberg / Benjamini–Krieger–Yekutieli / Benjamini–Yekutieli q-values (FDR), ascending ranks, and discovery indicators strictly in original row order. Compatible with Column, Xy, Grouped, and MultipleVariables tables (see Analysis Registry: p-value-stack).
  • Engine command & canonical options/defaults: Run via analyze.run or stats.pvalueStack using shorthands pvalue_stack (canonical), stats.pvalue_stack, p_value_stack, pvalues, pvaluestack, stats.pvaluestack:
    • method (PValueStackMethod): benjamini_hochberg_fdr (default), bonferroni, holm_bonferroni, sidak, holm_sidak, benjamini_krieger_yekutieli_fdr, benjamini_yekutieli_fdr.
    • threshold: strict decision threshold (α for FWER, target FDR Q for FDR) in (0.0, 1.0) (default 0.05).
    • column: optional single 0-based column index override when not using selected_data_sets.
  • Reported values:
    • MainSummary (pvalue-stack-summary): Method, error-rate family (FWER vs FDR), threshold, valid hypothesis count m, discoveries, non-discoveries, discovery fraction, skipped blank/excluded cells, minimum raw P, and minimum adjusted P/q, plus scalars (InputCount, Discoveries, MinRawP, MinAdjustedP, Threshold, TotalInputCount, TotalDiscoveries).
    • MultipleComparisons (pvalue-stack-adjusted): Original row label, 1-based row index, competition rank, raw P, adjusted P or FDR q, and boolean Discovery?.
  • Assumptions & QOL-7 diagnostics: Documents whether the selected procedure controls FWER or FDR under independence (Sidak/HolmSidak/BH/BKY) vs arbitrary dependence (Bonferroni/HolmBonferroni/BY), plus non-numeric text-cell ignores (remediation: None).
  • Edge cases & limits: Rejects raw values outside [0.0, 1.0] or non-finite values with InvalidParameter (while skipping blank/excluded cells cleanly), requires threshold strictly in (0.0, 1.0), and rejects pre-summarized subcolumns (RequiresRawReplicates) since summary spreads are not independent P values. Handles ties accurately in both rank reporting and monotonicity enforcement.
  • Published D1 references & oracle verification: Bonferroni (1936) & Dunn (1961); Holm (1979); Šídák (1967); Holland & Copenhaver (1987); Benjamini & Hochberg (1995); Benjamini & Yekutieli (2001); Benjamini, Krieger & Yekutieli (2006); verified to TOL = 1e-12 against R 4.5.2 p.adjust and closed-form BKY oracles in r1010_pvalue_stack_oracles.rs, and against statsmodels 0.15.0 multipletests(method="fdr_tsbky") in d1_extended_stats_oracles.rs.

Statistical Power & Sample Size

  • Purpose & compatible tables: Computes prospective or post-hoc statistical sample sizes (n1, n2, N), achievable power (1 - β), minimum detectable effect size, sensitivity parameter grids, and power-vs-N curves across independent, paired, one-sample, one-way ANOVA, two-proportion, Pearson correlation, goodness-of-fit χ2, and simple linear regression designs. Accepts any TableKind and optionally hooks scalar parameters from an InfoSheet (see Analysis Registry: power-analysis).
  • Engine command & canonical options/defaults: Run via analyze.run or stats.run with shorthands power (canonical), power_analysis, stats.power, power_sample_size:
    • family (PowerTestFamily): two_sample_unpaired_t (default), two_sample_paired_t, one_sample_t, one_way_anova, two_proportions, correlation, chi_square, simple_linear_regression.
    • solve_target (PowerSolveTarget): sample_size, power, detectable_effect.
    • tail_mode: two_sided, one_sided_greater, one_sided_less (one-sided directional alternatives are disallowed on inherently non-directional one_way_anova and chi_square).
    • alpha in (0, 1) (default 0.05); target_power in (0, 1) (required for sample_size / detectable_effect); sample_size, optional sample_size_group2, and allocation_ratio (k = n2/ n1> 0).
    • effect (PowerEffectSpec, supporting standardized d, d_z, f, h, w, r, r_squared, f_squared or raw means + SD, proportions p1, p2, or regression slope + σx, σε), num_groups (≥ 2 for one_way_anova), chi_square_df, two_proportions_mode (pooled_null_unpooled_alt Fleiss/G*Power, unpooled Wald, cohens_h arcsine + continuity_correction), correlation_method (fisher_z, pwr_hybrid, exact_conditional_t), and optional info_sheet_id.
  • Reported values:
    • MainSummary (power-summary): Family, solve target, tail mode, α, target power, standardized and raw effect sizes, discrete integer n1, n2, Ntotal, achieved_power at discrete integer N, exact continuous_n and power_at_continuous_n, denominator df, critical threshold, noncentrality parameter λ, and implied metrics (p2, Cohen's h, R2).
    • MultipleComparisons (power-sensitivity): Multi-scenario (α, 1 - β, effect) sensitivity grid.
    • CurveCoordinates (power-curve): Sample-size vs achieved power curve plus FittedCurveOverlay and analyzable_data_sheet.
  • Assumptions & QOL-7 diagnostics: Checklist notes discrete rounding uplift between continuous_n and integer n_per_group, asymptotic vs exact distribution scope (e.g., normal approximation for two proportions vs exact noncentral-t/F), and invalid effect boundaries (remediation: None).
  • Edge cases & limits: Powered by tail-safe noncentral-t, noncentral-F, and noncentral-χ2 distributions and Brent–Dekker root finding (curvebook_math); zero standardized effect sizes or p1= p2 with TwoProportions raise ZeroVariance when solving for sample size; R^2 must lie in [0, 1) and two_proportions probabilities in [0, 1] (InvalidParameter).
  • Published D1 references & oracle verification: Cohen (1988); Owen (1965) noncentral-t; Fleiss, Tytun & Ury (1980) & Fleiss, Levin & Paik (2003); Chow, Shao & Wang (2008); Fisher (1921); verified against R 4.5.2 pwr package benchmarks and noncentral distributions in power_oracle.rs and r35_power_multiplicity_oracles.rs.
Ready · Offline Desktop · CLI · Local MCP Pure Rust Zero Telemetry MIT / Apache-2.0