On this page
- Data Transforms, Reshaping & Simulation
- Column Descriptive Statistics, Normality & One-Sample Tests
- Outlier Detection (Grubbs & ROUT)
- Two-Group & One-Sample Comparisons
- Bland–Altman Method Comparison
- Multiple Row-Wise t-Tests & Nonparametric Tests
- Passing–Bablok Regression
- One-Way ANOVA & Nonparametric Equivalents
- Two-Way, Three-Way & Multifactor ANOVA / REML
- Nested t-Test & Nested One-Way ANOVA
- Contingency, Proportions, Odds/Risk Ratios & Agreement
- Survival Analysis (Kaplan–Meier & Cox PH)
- ROC Curve Analysis
- Generalized Linear Models (Linear, Logistic, Poisson)
- Multivariate Analysis (PCA, PCR, Correlation, Clustering, MICE)
- Simple & Deming Linear Regression
- Nonlinear Regression & Custom Equations
- Analyze a Stack of P Values
- Statistical Power & Sample Size
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
AnalysisSpeccontrols: Every analysis storesconfidence_level(engine commands enforceconfidence_percentin (1.0, 99.99], default95.0;AnalysisSpecvalidates [0.01, 99.99]),p_value_format, andselected_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 commandstransform.run,stats.run,fit.run,analysis.add,analysis.run,analysis.updateParams,analysis.retargetData). Unknown option keys for a selectedAnalysisKindare rejected cleanly (ErrorCode::BadInput; see Engine Error Codes). - Shared multiplicity procedure names (
multiplicity): Post-hoc and row-wise procedures use canonicalsnake_casenames:none(default unadjusted / omnibus only),tukey_hsd,dunnett(paired withcontrol_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, andfisher_lsd. FDR methods interpretthresholdas desired false discovery rate Q; FWER methods interpretthresholdas family-wise α (default0.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
DataSheetalongside a summaryResultSheet. Accepts all Table Archetypes (Math,Normalize,RemoveBaseline,Transpose,PruneRows,SelectAndTransform,Simulate,RandomSample; see Analysis Registry:transform). - Engine command & canonical options/defaults: Run via
analyze.runortransform.runusing shorthandsmath(canonical),transform,normalize,remove_baseline,baseline,transpose,prune,prune_rows,select,select_and_transform,simulate, orrandom_sample. Canonical parameter keys span all operation modes:math:x_transform,y_transform(Noneor preset:log10,ln,log2,exp10,exp,reciprocal,square,sqrt,logit,probit,arcsin_sqrt, etc.),error_propagation(replicate_endpointsorfirst_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
DataSheetand aMainSummary(summary)ResultTabrecording transform metadata, anchor scalars (ZeroAnchor,HundredAnchor), or sampling parameters (sample_size,population_size,seedwhen exact inf64). 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 orMeanCvNwith zero transformed mean); setsremediation: None. - Edge cases & limits: In pre-summarized subcolumns (
MeanSdN,MeanSemN,MeanCvN,MeanLowHigh,MedianIqr,UpperLowerLimits),FirstOrderDeltaMethodscales spread by |g'(mean)| (swapping asymmetric-Error/+Errorbounds when g' < 0 and preserving exclusion provenance notes), whereasReplicateEndpointsmaps [mean- SD, mean+ SD] through g and halves the width. Equalzero_anchor == hundred_anchorfails withTransformError(InvalidInput), andRandomSamplehonors stratified quotas deterministically viaDeterministicRng. - 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.080/120-digit rational/transcendental references,LINEAR_TOL = 1e-12),d1_randomization.rs, andd1_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 withColumn,Xy,Grouped, andMultipleVariablestables (see Analysis Registry:descriptive-stats). - Engine command & canonical options/defaults: Run via
analyze.runorstats.runwith shorthandsdescriptive_stats(canonical),descriptive, orcolumn_stats.aggregation:row_means(default, collapses raw replicate subcolumns by row mean first) orpooled_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 (defaultNone).run_normality_battery: bool (defaulttrue).hypothetical_value: optional finite null location μ0 triggering one-sample Student t and Wilcoxon signed-rank tests (defaultNone).
- Reported values:
DescriptiveSummary(desc-summaryordesc-pooled): N, Minimum, 25% Percentile, Median, 75% Percentile, Maximum, Range, Mean, Std. Deviation, Std. Error of Mean, Lower/Upperconf%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): Whenhypothetical_valueis 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
ChecklistItemper column (Passif P > α,Warnif P ≤ α) plusInfochecklist notes when ignoring non-numeric text cells; strictlyremediation: None. - Edge cases & limits: On pre-summarized subcolumns (
MeanSdN,MeanSemN,MeanCvN),summarize_pre_summarized_pointsreconstructs 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);ZeroVariancesuppresses t-statistics cleanly while reporting constant summaries;EmptyInputwhen 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.1normaltest/anderson&statsmodels 0.15.0normal_ad/lilliefors), andr017_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, andMultipleVariablestables (see Analysis Registry:outlier-detection). - Engine command & canonical options/defaults: Run via
analyze.runorstats.runwith shorthandsoutliers(canonical),outlier,rout, orgrubbs.- ROUT (
OutlierSpec::Rout, default shorthand"rout"/"outliers"):fdr_q_percentin (0.0, 100.0] (default1.0for Q = 1%). Note univariate column ROUT permits Q ∈ (0, 100], whereas curve-fitting ROUT restricts Q ∈ (0, 50]. - Grubbs (
OutlierSpec::Grubbs):alphain (0.0, 1.0) (default0.05) anditerative(bool, defaultfalsefor single outlier vstruefor sequential ESD elimination).
- ROUT (
- Reported values:
MainSummary(outliers— "Identified Outliers") listingColumn, 1-basedRow Index, observedValue, testStatistic(G or ti= |yi- M| / RSDR), andThreshold / P(Grubbs critical Gcrit or BH adjusted q-value). Emits scalarsOutlierCountper column, plusRobustCenterandRSDRunder ROUT. - Assumptions & QOL-7 diagnostics: Grubbs assumes approximate normality of the clean core; ROUT uses the median and 68.27% percentile
RSDRacross absolute deviations from the median, testing only the top 30% furthest observations via Benjamini–Hochberg (1995). Checklist reports detected outlier count (Infoif > 0,Passif 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;
ROUThandles n ≥ 3 without masking multiple extreme outliers; zero-spread clean cores (RSDRat 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, andd1_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
ColumnandMultipleVariablestables (usingmv_group_column+mv_response_columnto split a two-level factor in long tables; see Analysis Registry:two-group-comparison). - Engine command & canonical options/defaults: Run via
analyze.runorstats.runwith shorthandsunpaired_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 amongunpaired_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 (defaulttrue). Note one-tailed rank tests evaluate the tail strictly in the observed sample direction (r35_survival_twogroup_oracles.rs).compute_effect_sizes: bool (defaulttrue): 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:
MainSummarytab (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. Forratio_paired_tandlognormal_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 keepremediation: None. - Edge cases & limits: Supports pre-summarized subcolumns (
MeanSdN,MeanSemN,MeanCvN) for parametricunpaired_t,welch_t, andone_sample_t(*_from_summary, retaining exact variance F-test while omitting raw-onlylevene_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, andwave21_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 - Bor% difference100 · (A - B) / ((A + B)/2)) versus pair averages(A + B) / 2, estimating mean bias and 95% (orconfidence_level) Limits of Agreement (LoA= bias± z1-α/2· SDdiff). Compatible withColumn,Xy, andMultipleVariablestables (see Analysis Registry:bland-altman). - Engine command & canonical options/defaults: Run via
analyze.runorstats.runwith shorthandsbland_altman(canonical) orstats.bland_altman.column_a: 0-based index of method A (default0).column_b: 0-based index of method B (default1).percent_difference: bool (defaultfalsefor absoluteA - B;truefor percentage difference).xy_compare_x_vs_y: optional bool onXytables (Some(true)forces X vs Y0;Some(false)usesY[column_a]vsY[column_b];Nonedefaults to X vs Y0 when one Y dataset exists and Y datasets otherwise).
- Reported values:
MainSummarytab (bland-altman): Number of paired subjects n, Mean Bias with SE andconf%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.Residualstab: 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/InvalidParameterunderpercent_difference: trueif 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, andaudit_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), andMultipleVariablestables (see Analysis Registry:multiple-row-t-tests). - Engine command & canonical options/defaults: Run via
analyze.runorstats.runwith shorthandsmultiple_row_t_tests(canonical),stats.multiple_row_t_tests,multiple_row_tests,multiple_t_tests.paired: bool (defaultfalse). Requires matched replicate subcolumns withinGrouped/Xyor an even number (≥ 4) of selected columns inColumntables.nonparametric: bool (defaultfalse; runs Mann–Whitney U or Wilcoxon signed-rank per row whentrue).assume_equal_sd: bool (defaulttrue; Student pooled variance whentrue, Welch–Satterthwaite whenfalse; applies only when!paired && !nonparametric).multiplicity,threshold(default0.05),report_confidence_intervals,control_column(supportsBenjaminiHochbergFdr,TwoStageBkyFdr,BenjaminiYekutieliFdr,HolmSidak,Bonferroni,Sidak, orNone).
- 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 (
FWERvsFDR,remediation: None). - Edge cases & limits: Strictly rejects pre-summarized subcolumns (
StatsError::RequiresRawReplicates) acrossGrouped,Xy, andColumninputs because raw replicate cells per row are required. OnColumntables with split-group selection, requires at least 4 selected columns (even count whenpaired: 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.0fdr_tsbky), andaudit_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, andMultipleVariablestables (see Analysis Registry:passing-bablok). - Engine command & canonical options/defaults: Run via
analyze.runorstats.runwith shorthandspassing_bablok(canonical) orstats.passing_bablok.x_column: 0-based index of reference assay column X (default0).y_column: 0-based index of candidate assay column Y (default1).
- Reported values:
MainSummaryandParametersAndConfidenceIntervalstabs plus scalars (Slope,Slope CI lower/upper,Intercept,Intercept CI lower/upper,CUSUM H,CUSUM statistic,CUSUM P value,N,Valid slopes,K offset) andResidualstab 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
ZeroVariancewhen 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, heteroscedasticBrownForsytheAndWelch, nonparametricKruskalWallis) or matched repeated-measures subject rows (RepeatedMeasures, mixed-effects REML, nonparametricFriedman), with FWER/FDR post-hoc comparisons, trend tests, and Compact Letter Displays (CLD). Compatible withColumnandMultipleVariablestables (see Analysis Registry:one-way-anova). - Engine command & canonical options/defaults: Run via
analyze.runorstats.runwith shorthandsone_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 torepeated_measures).mixed_effects_reml: bool (defaultfalse; engages REML automatically when repeated-measures subjects have missing cells, or explicitly on complete tables).df_method:kenward_roger(default) orsatterthwaite.residual_covariance:compound_symmetry(default) orunstructured(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(default0.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 forNewmanKeulswhere simultaneous CIs are undefined), and Piepho (2004) CLD groupings (Graphsbrackets & 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= 0Infovs optimizer upper search boundWarn), and listwise missing-block exclusion counts in non-REML RM/Friedman; strictlyremediation: None. - Edge cases & limits: Supports pre-summarized subcolumns (
MeanSdN,MeanSemN,MeanCvN) forOrdinaryAnovaandBrownForsytheAndWelch(ordinary_one_way_from_summary), omitting Levene/normality checks that require raw replicates; REML handles unbalanced/incomplete subject blocks automatically unlessunstructuredcovariance 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.2stats&nlmeind1_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
Groupedtables, and general N-way multifactor ANOVA onMultipleVariablessheets) with Type I or Type III marginal sums of squares, interactions, and simple-effects or main-effect post-hoc comparisons. Compatible withGroupedandMultipleVariablestables (see Analysis Registry:factorial-anova). - Engine command & canonical options/defaults: Run via
analyze.runorstats.runwith shorthandstwo_way_anova(canonical),factorial_anova, orthree_way_anova.three_way: bool (defaultfalse; expects 4 grouped dataset columns encoding 2 × 2 factors by K row levels).multifactor_columns,response_column: factor and outcome column indices onMultipleVariablessheets.max_interaction_order: integer interaction cap (e.g.,2or3).ss_type:type_iii(default marginal SS for unbalanced designs) ortype_i(sequential).repeated_measures:none(default),column_factor_matched,row_factor_matched,both_factors_matched.mixed_effects_reml: bool,df_method(kenward_rogerdefault orsatterthwaite),residual_covariance(compound_symmetrydefault orunstructured),fit_reml_on_missing: bool (defaulttruein REML paths; errors withInsufficientSampleSizeif missing RM cells exist andfit_reml_on_missing: falsewithout unstructured/REML).compute_effect_sizes,multiplicity,threshold(default0.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&CovarianceMatrixfor REML variance components / unstructured covariance;MultipleComparisonsfor cell/simple-effect and main-effect comparisons (requiring explicit validcontrol_columnwhenDunnettis 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::RequiresRawReplicatesonGroupedtables); compacts empty/fully-excluded factor levels cleanly before Type III effect coding; falls back fromUnstructuredtoCompoundSymmetryREML when subject covariance is non-positive-definite or under-observed (recordingUnstructuredFallbackReasonin checklist & footnote); rejects missing cells whenfit_reml_on_missingis 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/nlmeind1_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 withNestedtables (see Analysis Registry:nested-comparison). - Engine command & canonical options/defaults: Run via
analyze.runorstats.runwith shorthandsnested_anova(canonical),nested_t,nested.two_group_t_test: bool (defaultfalse; requires exactly 2 selected treatment groups whentrue).df_method:kenward_roger(default) orsatterthwaite.multiplicity,threshold(default0.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 innested_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 (
Passwhen ICC> 0.05,Infootherwise) and REML boundary status (zero-boundary σ̂2subcluster= 0Infovs search-limitWarn), keepingremediation: 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, andr36_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:
Contingencyaccepts all methods;PartsOfWholeacceptspearson_chi_squareandexact_binomial;Columnacceptsexact_binomialonly (see Analysis Registry:contingency). - Engine command & canonical options/defaults: Run via
analyze.runorstats.runwith shorthandscontingency(canonical),chi_square,fisher_exact,barnard_exact,stats.barnard_exact,cohen_kappa,kappa,fleiss_kappa,exact_binomial,binomial.method:pearson_chi_square(withyates_continuitybool 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, withweighting:unweighted,linear,quadratic),fleiss_kappa(N subjects × k categories),exact_binomial(null_proportionp0∈ (0, 1), default0.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 forPartsOfWholegoodness-of-fit, normalized internally; uniform 1/k whenNone).
- Reported values:
MainSummary(contingency-main,parts-gof),ParametersAndConfidenceIntervals(contingency-ratios,contingency-mcnemar,kappa-agreement, etc.), andDiagnosticstabs 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 withremediation: None. - Edge cases & limits: All-zero margin rows/columns are trimmed before association tests (failing with
EmptyInputorInsufficientSampleSizeif the reduced table falls below 2 × 2); non-integer or negative counts fail table count validation;CochranArmitageTrendreturnsNonestatistics 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.0unweighted/linear/quadraticcohens_kappa),parity_g8_barnard_pb_mi.rs, andwave21_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
Survivaltables (KaplanMeier) andMultipleVariablestables (KaplanMeierviamv_time_column,mv_status_column, optionalmv_group_column;CoxProportionalHazardsviatime_column,status_column,predictor_columns; see Analysis Registry:survival). - Engine command & canonical options/defaults: Run via
analyze.runorstats.runwith shorthandskaplan_meier(canonical),survival,log_rank,cox_ph, orcox.- 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(default0.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(efrondefault,breslow,exact).
- Kaplan–Meier:
- 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-pairwisefor ≥ 3 cohorts), andfitted_curvesstep coordinates. - Cox PH:
ParametersAndConfidenceIntervals(cox-phwith β̂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.
- Kaplan–Meier:
- 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 setsconverged = falsecleanly 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.3ind1_reference_oracles.rs,d1_poisson_cox_result_sheets.rs,d1_edge_matrix.rs,r35_survival_twogroup_oracles.rs, andr13_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
ColumnandMultipleVariablestables (see Analysis Registry:roc-curve). - Engine command & canonical options/defaults: Run via
analyze.runorstats.runwith canonical key/shorthandroc:ci_method:de_long(default, DeLong et al. 1988 exact structural components) orhanley_mc_neil(Hanley & McNeil 1982 exponential approximation). Pairwise DeLong correlated and unpaired two-curve AUC comparisons are also supported incurvebook-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+) plusFittedCurveOverlaypoints for plotting.
- Assumptions & QOL-7 diagnostics: Flags AUC< 0.5 (
Warndiscrimination-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+leavesNone/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.rsandaudit_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 withMultipleVariables,Xy, andColumntables (see Analysis Registry:generalized-linear-model). - Engine command & canonical options/defaults: Run via
analyze.runorstats.runwith shorthandsglm(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 (defaulttrueon 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–Wilkwithremediation: None), Albert–Anderson (1984) complete or quasi-complete separation inlogisticIRLS, 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 inpoisson; categorical predictors reduced to < 2 levels after complete-case filtering raiseZeroVariance; requires n ≥ p + 1 complete rows (at least 3 rows onXytables); rejects pre-summarized subcolumns. Inlogisticseparation, marksseparation_detected = truecleanly 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.2stats::lmandstats::glmind1_reference_oracles.rs,d1_edge_matrix.rs, andd1_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 withMultipleVariables,Xy, andColumntables (see Analysis Registry:multivariate). - Engine command & canonical options/defaults: Run via
analyze.runorstats.runwith shorthandspca(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,averageUPGMA,weightedWPGMA,centroidUPGMC,medianWPGMC,ward_d2Murtagh–Legendre Ward criterion),k_means_k(optional k ≥ 2 partitioning viak-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 MatchingMICE PMM, pooled via Rubin 1987 and Barnard–Rubin 1999 small-sample degrees of freedom).
- PCA / PCR:
- Reported values:
- PCA / PCR:
MainSummary(pca-eigenvalues,pcr-summarywith R2, adjusted R2, F, RMSE, AIC/BIC),ParametersAndConfidenceIntervals(pca-loadings,pcr-predictorsback-transformed to original predictor scale,pcr-components), scores/biplot contributions, andDiagnostics(pcr-diagnosticsleverage & 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), andCovarianceMatrix(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).
- PCA / PCR:
- 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
NaNwhen 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, andwave21_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, andMultipleVariablestables (see Analysis Registry:linear-regression). - Engine command & canonical options/defaults: Run via
analyze.runorfit.runwith shorthandslinear(canonical),simple_linear,linear_regression,deming, ordeming_regression.deming_model_ii: bool (defaultfalse; uses fixed orthogonal variance ratio λ = 1.0 with leave-one-out jackknife SEs; custom λ ratios are exposed viacurvebook_fit::deming_regression).force_through_origin: bool (defaultfalse; 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 boundedFinite, split, orAllRealsinverse sets).x_range_filter: optional inclusive[x_min, x_max]predictor filter restricting points entering the fit (plot_x_min,plot_x_max,plot_segmentsdefault100, hard cap10,000control 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
InsufficientDatawhen n ≤ 2 (or n < 1 whenforce_through_originwith 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; ifslope == 0or 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::lminr13_1_d1_oracles.rs,d1_nist_and_pharma_oracles.rs, andd1_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 withXy,Grouped, andMultipleVariablestables (see Analysis Registry:nonlinear-regression; complete algorithmic details in Curve Fitting Reference). - Engine command & canonical options/defaults: Run via
analyze.runorfit.runusing shorthandnonlinear(canonical), aliases (nonlinear_regression,curve_fit,fit,custom_equation,custom_dsl), or any built-in equation ID directly as thekindshorthand (log_agonist_vs_response_4pl,michaelis_menten, etc.). Canonical parameter keys (NonlinearFitSpec):- Model:
equation_id,custom_dsl. - Objective & weights:
method(least_squaresdefault,poisson_deviance,robust_cauchy,rout_outlier_elimination),fdr_q_percent(default1.0, bounded to (0, 50]),weighting(nonedefault,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, plusinitial_override,lower_bound,upper_bound),max_iters(default1000,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(truedefault),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.
- Model:
- Reported values:
ParametersAndConfidenceIntervals(best-fit estimates, SEs, Venzon–Moolgavkar profile or Wald CIs includingOpenendpoints, dependency R2j, Hougaard |g1|, parameter notes, plus derived physiological scalars likeEC50/t_half/Span),MainSummary(N, Kfree, df, unweighted R2 &rss,weighted_ss, Sy.x orRSDR, AICc, BIC, runs test, replicates lack-of-fit, Shapiro–Wilk/Anderson–Darling/Lilliefors normality, Spearman homoscedasticity),Residuals,CovarianceMatrix,ModelComparison,InterpolatedUnknowns(Interpolated Mean X/Interpolated ReplicateswithExtrapolatedflags), andDiagnostics(fit_auc). See Curve Fitting Reference. - Assumptions & QOL-7 diagnostics: Under
robust_cauchy, omits parametric covariance/CIs/bands cleanly (InferenceAvailability::NotApplicableInRobustMode); flagsAmbiguous/Unstablefits when Jacobian rank is deficient,Dependency > 0.9999, or profile bounds plateau; flagsDependency > 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, andr13_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, andMultipleVariablestables (see Analysis Registry:p-value-stack). - Engine command & canonical options/defaults: Run via
analyze.runorstats.pvalueStackusing shorthandspvalue_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) (default0.05).column: optional single 0-based column index override when not usingselected_data_sets.
- Reported values:
MainSummary(pvalue-stack-summary): Method, error-rate family (FWERvsFDR), 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 booleanDiscovery?.
- 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-12against R 4.5.2p.adjustand closed-form BKY oracles inr1010_pvalue_stack_oracles.rs, and againststatsmodels 0.15.0multipletests(method="fdr_tsbky")ind1_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
TableKindand optionally hooks scalar parameters from anInfoSheet(see Analysis Registry:power-analysis). - Engine command & canonical options/defaults: Run via
analyze.runorstats.runwith shorthandspower(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-directionalone_way_anovaandchi_square).alphain (0, 1) (default0.05);target_powerin (0, 1) (required forsample_size/detectable_effect);sample_size, optionalsample_size_group2, andallocation_ratio(k = n2/ n1> 0).effect(PowerEffectSpec, supporting standardizedd,d_z,f,h,w,r,r_squared,f_squaredor raw means + SD, proportions p1, p2, or regression slope + σx, σε),num_groups(≥ 2 forone_way_anova),chi_square_df,two_proportions_mode(pooled_null_unpooled_altFleiss/G*Power,unpooledWald,cohens_harcsine +continuity_correction),correlation_method(fisher_z,pwr_hybrid,exact_conditional_t), and optionalinfo_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_powerat discrete integer N, exactcontinuous_nandpower_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 plusFittedCurveOverlayandanalyzable_data_sheet.
- Assumptions & QOL-7 diagnostics: Checklist notes discrete rounding uplift between
continuous_nand integern_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 withTwoProportionsraiseZeroVariancewhen solving for sample size;R^2must lie in [0, 1) andtwo_proportionsprobabilities 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
pwrpackage benchmarks and noncentral distributions inpower_oracle.rsandr35_power_multiplicity_oracles.rs.