Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

How Pulse is validated

Pulse checks its inferential figures (test statistics, p-values, intervals, regression coefficients and standard errors, matrix results and significance overlays) against established external implementations wherever one exists. This page lists, operator by operator, what each is checked against, how tightly, and where the check lives, so you can see why to trust a number and where the evidence is thinner.

How the checks work.

  • R goldens. make reference runs pinned R scripts (scripts/reference/) on R 4.6.1, with versions pinned for psych, car, ppcor, corpcor, GPArotation, sandwich, lmtest, biotools, nortest, survey, glmnet, lavaan and others. Each number is written at full precision (%.17g) together with the exact input data. Every golden file ends in a SHA-256 footer that the tests check, so a value cannot be edited by hand without the test failing. CI never runs R: the goldens are committed, and the Go tests compare against them on every go test, typically at a relative tolerance of 1e-10.
  • Weighted reference. For weighted analysis, a separate harness (internal/service/testdata/weight_reference/) checks the weight-aware tests, regressions and overlays. For frequency weights it runs the stock R function on rows repeated by their weight (rep()). For probability weights it uses a closed form on Kish-rescaled weights with scipy tails, cross-checked with statsmodels. The tolerance is 1e-12 relative.
  • Multivariate and SEM. Matrix operators are checked against numpy, statsmodels and the R packages named in each row. Structural equation models are checked against lavaan and cross-checked with semopy.
  • Undefined figures. Edge cases where R returns NaN or Inf are pinned too: Pulse reports those as null, never as a made-up number.

Reading a row.

  • Validated against names the reference and its version.
  • Tightest tolerance is the strictest comparison the tests apply.
  • Gap says plainly where the evidence is weaker: a loose or hand-computed check, no weighted check, or no external implementation at all.
  • An operator with no weighted form says so instead of citing a weighted check: a weight on it is refused (PULSE_WEIGHT_UNSUPPORTED), never ignored, and a test pins that refusal at predict and at run.

The registry behind this page is gated: every test file it cites must exist, and every built-in test, regression, matrix operator and inferential overlay must have a row. An operator is never silently missing from this page.

To regenerate the goldens, see Regenerating goldens in the contributor guide.

Aggregators

OperatorValidated againstTightest toleranceGap
AGG_AVERAGENIST StRD certified values (univariate: PiDigits, Lottery, Lew, Mavro, Michelso, NumAcc1–4)digits achieved per dataset (see the NIST table)—
AGG_STDDEVNIST StRD certified values (univariate sample standard deviation, params.ddof 1: PiDigits, Lottery, Lew, Mavro, Michelso, NumAcc1–4)digits achieved per dataset (see the NIST table)—
AGG_WELFORDNIST StRD certified values (univariate sample standard deviation (the stddev component): PiDigits, Lottery, Lew, Mavro, Michelso, NumAcc1–4)
exact rational arithmetic on the input doubles: mean, shifted_mean and m2 of three merged partials under common offsets up to 1e12, unweighted and frequency-weighted
1e-13 relative—

Attributes

OperatorValidated againstTightest toleranceGap
ATTR_REG_INFLUENCEstatsmodels 0.14.5 OLSInfluence.cooks_distance / dffits (R cooks.distance / dffits)
weighted reference (see above)
R 4.6.1 cooks.distance / dffits over a bound lm and binomial-logit, poisson-log and gamma-inverse glm (params.fit)
R 4.6.1 dffits over a bound probit, cloglog, poisson identity / sqrt and gamma log / identity glm (params.fit; its sign is that of g′(μ))
R 4.6.1 + MASS 7.3-66 cooks.distance and dffits at dispersion 1 (family$dispersion <- 1) over a bound negative binomial fit (params.fit)
R 4.6.1 + MASS 7.3-66 cooks.distance at summary.glm’s φ̂ and dffits on the leave-one-out σ over a bound fixed-θ negative binomial fit with dispersion: estimated (params.fit)
weighted reference (see above)
1e-9 relative (absolute below 1)Over a probability-weighted bound fit the figures are refused (permanently), not validated.
ATTR_REG_LEVERAGER 4.6.1 hatvalues over a bound lm and binomial-logit, poisson-log and gamma-inverse glm (params.fit)
R 4.6.1 hatvalues over a bound probit, cloglog, poisson identity / sqrt and gamma log / identity glm (params.fit)
R 4.6.1 + MASS 7.3-66 hatvalues over a bound negative binomial fit (log / sqrt / identity link, θ estimated or fixed; params.fit)
weighted reference (see above)
1e-9 relative (absolute floor 1e-12)The OLS refit’s leverage is checked against Pulse’s own OLS (and the statsmodels influence figures that read it); a probability-weighted bound fit is refused (permanently), not validated.
ATTR_REG_RESIDUALstatsmodels 0.14.5 GLMResults.resid_response / resid_pearson / resid_deviance / resid_working (binomial-logit, poisson-log, gamma-inverse fits through params.fit, params.kind)
statsmodels 0.14.5 OLSInfluence.resid_studentized_internal / resid_studentized_external (the OLS refit, params.kind standardized / studentized; R rstandard / rstudent)
weighted reference (see above)
R 4.6.1 rstandard / rstudent over a bound lm and binomial-logit, poisson-log and gamma-inverse glm (params.fit, params.kind standardized / studentized)
R 4.6.1 residuals(type = "working") over a bound probit, cloglog, poisson identity / sqrt and gamma log / identity glm (params.fit, params.kind working)
R 4.6.1 + MASS 7.3-66 residuals (pearson / deviance / working), rstandard (both types) and rstudent at dispersion 1 over a bound negative binomial fit (glm.nb, θ estimated or fixed; params.fit)
R 4.6.1 + MASS 7.3-66 rstandard (both types) at summary.glm’s φ̂ and rstudent on the leave-one-out σ over a bound fixed-θ negative binomial fit with dispersion: estimated (glm(negative.binomial(θ)); params.fit)
weighted reference (see above)
1e-9 relative (absolute below 1)The refit’s response residual is checked against Pulse’s own OLS. Over a probability-weighted bound fit the standardized / studentized kinds are refused (permanently), not validated.

Statistical tests

OperatorValidated againstTightest toleranceGap
TEST_ANOVA_FR 4.6.1 aov
NIST StRD certified values (one-way ANOVA: SiRstv, SmLs01–09, AtmWtAg)
weighted reference (see above)
1e-12 relativeOn NIST SmLs07–09 the figures agree to about 4 digits. That is the ceiling for any double-precision package: values such as 1000000000000.4 are not exactly representable, and exact arithmetic on the parsed doubles reaches only 4.0, 3.9 and 3.9 digits. Pulse reaches that ceiling.
TEST_ANOVA_RMR 4.6.1 aov with Error() strata
weights refused, not validated (see the catalog entry)
1e-10 relative—
TEST_ANOVA_WELCHR 4.6.1 oneway.test
weighted reference (see above)
1e-12 relative—
TEST_BARTLETT_SPHERICITYR 4.6.1 psych::cortest.bartlett
weighted reference (see above)
1e-12 relative—
TEST_BOX_MR 4.6.1 biotools::boxM
weighted reference (see above)
1e-12 relative—
TEST_BROWN_FORSYTHER 4.6.1 anova(lm(abs(x - median) ~ g))
weighted reference (see above)
1e-12 relative—
TEST_CHISQR 4.6.1 chisq.test(correct = FALSE) (independence; the default applies no Yates correction) and chisq.test(p = expected) (goodness of fit)
R 4.6.1 chisq.test(correct = TRUE) (params.correct: Yates on a 2 × 2 table, inert on larger ones)
weighted reference (see above)
Agresti worked example (R chisq.test help) and scipy for the effect size
1e-12 relative—
TEST_FISHER_EXACTR 4.6.1 fisher.test
weighted reference (see above)
1e-12 relative—
TEST_HOTELLING_T2R 4.6.1 Hotelling::hotelling.test
weighted reference (see above)
1e-12 relative—
TEST_KENDALL_TAUR 4.6.1 cor.test(method = "kendall")
weighted reference (see above)
1e-12 relative—
TEST_KRUSKAL_WALLISR 4.6.1 kruskal.test (H, df, p, rank sums, tie factor); near H = 0, where kruskal.test’s own form cancels, H evaluated in deviation form
weighted reference (see above)
R 4.6.1 kruskal.test help examples (effect size)
1e-12 relative—
TEST_KSR 4.6.1 ks.test (exact psmirnov)
weighted reference (see above)
1e-12 relative—
TEST_MANN_WHITNEY_UR 4.6.1 wilcox.test(exact = FALSE, correct = TRUE) (U, rank sum, tie-corrected variance, z, p)
R 4.6.1 wilcox.test(exact = TRUE) (params.exact: the permutation p on mid-ranks, ties included)
weighted reference (see above)
R 4.6.1 wilcox.test help examples (effect size)
1e-12 relativeThe default p is the tie- and continuity-corrected normal approximation; wilcox.test defaults to its exact p when both groups are under 50, so ask for params.exact to match it there. The exact p is computed while min(n_a, n_b)·(n_a + n_b) ≤ 5000; past that the approximation stays, with a warning.
TEST_MANOVAR 4.6.1 manova with summary.manova
weighted reference (see above)
1e-12 relative—
TEST_MARDIAR 4.6.1 Mardia skewness and kurtosis
weighted reference (see above)
1e-12 relative—
TEST_PAIRED_TR 4.6.1 t.test(paired = TRUE)
weighted reference (see above)
1e-12 relative—
TEST_PEARSON_RR 4.6.1 cor.test
weighted reference (see above)
1e-12 relative—
TEST_PROP_ZR 4.6.1 prop.test(correct = FALSE) (z as the signed root of X-squared, p; the two-proportion Wald interval). The default one-proportion interval is Pulse’s Wald interval on p − p0, evaluated in R
R 4.6.1 prop.test(correct = TRUE) and its Wilson interval, with and without the correction (params.correct, params.interval wilson)
weighted reference (see above)
textbook worked example
1e-12 relative—
TEST_SHAPIRO_WILKR 4.6.1 nortest::sf.test (Shapiro–Francia)
weights refused, not validated (see the catalog entry)
1e-10 relative—
TEST_SPEARMAN_RR 4.6.1 cor.test(method = "spearman") (exact AS 89)
weighted reference (see above)
1e-12 relative—
TEST_TR 4.6.1 t.test (one-sample on mu; two-sample Welch, var.equal = FALSE, including common offsets of 1e6 to 1e12 tested on the exact deviations): t, df, p, interval, means, variances
R 4.6.1 t.test(var.equal = TRUE) (params.variance pooled): t, df, p, interval, pooled variance
weighted reference (see above)
1e-12 relative—
TEST_TRENDR 4.6.1 cor.test(method = "kendall"), cross-checked with Kendall::MannKendall
weights refused, not validated (see the catalog entry)
1e-10 relative—
TEST_TUKEY_HSDR 4.6.1 TukeyHSD, ptukey refined by quadrature
weights refused, not validated (see the catalog entry)
1e-10 relative—
TEST_WELCHR 4.6.1 t.test(var.equal = FALSE) (including common offsets of 1e6 to 1e12 tested on the exact deviations): t, Welch–Satterthwaite df, p, interval, means, variances
weighted reference (see above)
1e-12 relative—
TEST_WILCOXON_SRR 4.6.1 wilcox.test(paired = TRUE)
weighted reference (see above)
1e-12 relative—
TEST_Z_TWO_SAMPLER 4.6.1 pnorm / qnorm on the Welch standard error (no stock R function; common offsets of 1e6 to 1e12 on the exact deviations): z, p, interval, means, variances
weighted reference (see above)
1e-12 relative—

Regressions

OperatorValidated againstTightest toleranceGap
REG_BAYES_LINEARR 4.6.1 matrix algebra for the normal-inverse-gamma posterior
R 4.6.1 closed form of Müller’s sandwich posterior with the per-entity Newey–West (covariance hac + entity) and Driscoll–Kraay meats (at prior precision 0 asserted equal to sandwich 3.1-3 vcovPL on lm), unweighted and frequency-weighted
R 4.6.1 closed form of Müller’s sandwich posterior with the two-way cluster meat (at prior precision 0 asserted equal to sandwich 3.1-3 vcovCL(cluster = ~a + b) on lm), unweighted and frequency-weighted
weighted reference (see above)
1e-12 relative—
REG_GLMR 4.6.1 glm (binomial-logit, poisson-log, gamma-inverse)
R 4.6.1 glm (binomial probit / cloglog, poisson identity / sqrt, gamma log / identity: coefficients, standard errors, vcov, deviance, null deviance, AIC, dispersion, fitted means, working residuals), refitted to its fixed point
weighted reference (see above)
R 4.6.1 logLik / AIC of binomial-logit, poisson-log and gamma-inverse glm (two_log_lik, aic; gamma’s dispersion at deviance / n counted); the non-canonical links’ AIC against glm_links.json, the negative binomial’s against glm_nb.json
weighted reference (see above)
R 4.6.1 glmnet (penalties)
R 4.6.1 + mpath 0.4-2.28 glmregNB (U69 #638): the penalized negative binomial — l2 / l1 / elasticnet, unpenalized predictors, θ re-estimated by theta.ml around the penalized fit or fixed — coefficients, θ, the l2 penalized-Fisher sandwich standard errors and SE(θ), deviance, and the penalized hat (bound fit and ATTR_REG_LEVERAGE refit)
weighted reference (see above)
R 4.6.1 + MASS 7.3-66 (U69 #638): the negative binomial under selection and resample, θ re-estimated in every candidate and replicate — stepAIC on glm.nb (forward / backward / both, AIC / BIC: final terms and the final model’s coefficients, θ, SE(θ)), a fixed θ against the exact greedy over glm(negative.binomial(θ)); base-R glm.nb replicate loops (leave-one-out, delete-a-cluster and frequency-weighted jackknife, a bootstrap over R’s own index sets): the coefficients’ and θ̂’s replicate SE, ame / mem effects’ replicate SE
R 4.6.1 sandwich (robust standard errors; vcov)
weighted reference (see above)
weighted reference (see above)
R 4.6.1 sandwich 3.1-3 vcovHC HC0 / HC1 / HC3 on the non-canonical links
R 4.6.1 + MASS 7.3-66 glm.nb (negative binomial, θ estimated on log / sqrt / identity, pushed to its fixed point) and glm(negative.binomial(θ)) (θ fixed): coefficients, standard errors and vcov at dispersion 1, θ, SE(θ), twice the log-likelihood, AIC, deviance, null deviance, fitted means, residuals; sandwich 3.1-3 vcovHC HC0 / HC1 / HC3
weighted reference (see above)
R 4.6.1 + MASS 7.3-66 summary(glm(negative.binomial(θ))) (θ fixed, dispersion: estimated, log / sqrt link): φ̂ = Pearson χ²/df, vcov and standard errors scaled by it, t p-values on df, Wald-t intervals
weighted reference (see above)
R 4.6.1 + MASS 7.3-66 + sandwich 3.1-3: analytic marginal effects (margins: ame / mem, response / link scale) of logit, probit, cloglog, poisson, gamma inverse / log and negative binomial glm fits — the mean of β·μ′(η), the delta-method Jacobian on vcov, vcovHC HC3 and vcovCL — with statistics, p-values and intervals, and under binary: "contrast" a 0/1 term’s μ(1) − μ(0); cross-checked against marginaleffects 1.0.0 avg_slopes / slopes(newdata = "mean") (its 1 − 0 contrast of a 0/1 term) at 1e-7
R 4.6.1 manual replicate loops: marginal effects under resample (U69 #639) — logit / probit / poisson glm ame, mem and the 0/1 contrast, leave-one-out, delete-a-cluster and frequency-weighted jackknife and a bootstrap over R’s own index sets, each replicate refitting and re-estimating the effect; replicate SE, Wald / percentile p-values and normal intervals
weighted reference (see above)
R 4.6.1 + MASS 7.3-66 + car 3.1-5 vif (collinearity: VIF, tolerance, generalized VIF of a factor’s dummies, df, GVIF^(1/(2 df))) on binomial-logit, poisson-log, fixed-θ negative binomial and gamma-log glm fits refitted to their fixed point (basis model: the IRLS working weights), and on lm over the same predictors and prior weights (basis predictors); end to end through FEAT_ONE_HOT
weighted reference (see above)
R 4.6.1 + MASS 7.3-66 + sandwich 3.1-3 + lmtest 0.9-40: the Compose nested-model comparison (compare) of two glm fits refitted to their fixed point — anova(m0, m1, test = "LRT" | "F") on logit, probit, poisson, gamma inverse / log and fixed-θ negative binomial fits (the full fit’s Pearson dispersion), MASS anova.negbin (θ estimated, 2 loglik change; cross-checked against lrtest), waldtest(m0, m1, vcov = vcov | vcovHC(type = "HC3"), test = "Chisq" | "F")
weighted reference (see above)
R 4.6.1 + lmtest 0.9-40: the Compose nested-model comparison of two sweep-bound glm fits (U69 #643) — R ranks every candidate row window by a full-model coefficient, picks the same winner and runs anova(m0, m1, test = "LRT") (poisson) or waldtest(m0, m1, test = "Chisq") (logit) on its rows
R 4.6.1 + car 3.1-5: the Compose Wald comparison over a resampled glm fit (U69 #642) — manual delete-a-cluster and leave-one-out jackknife and a bootstrap over R’s own index sets of the full logit / poisson / gamma log model, linearHypothesis(m1, vcov. = V, test = "Chisq") on the replicate covariance V (1e-6 on the gamma log link, whose IRLS converges linearly)
weighted reference (see above)
1e-12 relativePenalized fits on a non-canonical link are checked by their KKT conditions, not against glmnet. Off the canonical link IRLS converges linearly, so at the default tol (1e-8) the coefficients sit within about 1e-7 of the MLE; the oracle fits at tol 1e-13. The negative binomial refuses selection and resample (no oracle); its penalized fit is pinned on the log link only (mpath fits no other); its probability-weighted fit is checked for scale invariance only. Marginal effects are slopes only (no discrete factor contrasts: regressions take no factor predictors; a 0/1 dummy gets its slope, where marginaleffects reports a 1 − 0 contrast, so that cross-check skips it) and are refused over a predictor derived from another predictor, a penalty, selection or bounds; under resample they are re-estimated per replicate (margins_resample.json). The collinearity block’s penalized basis-predictors figure is checked equal to the unpenalized one (a design figure), not against an external penalized VIF. A nested-model comparison under a probability weight runs the Wald test only (F / LRT refused), checked against its own covariance rather than an external survey test.
REG_MMM_BAYESREG_BAYES_LINEAR’s closed-form conjugate posterior (R 4.6.1 matrix algebra), in the conjugate limit: adstock and curve pinned, flat priors (posterior means, SDs and σ), under each adstock kernel (geometric, delayed, weibull_cdf, weibull_pdf) with the Hill curve and under the logistic and Michaelis–Menten curves
simulation-based calibration (Talts et al. 2018) on the default priors of every adstock kernel × saturation curve cell (4 × 3), and with a simulated lift test in the likelihood on two cells (geometric × hill, delayed × logistic): 200 seeded replicates per run, rank of the truth among 99 thinned draws
WIN_DISTRIBUTED_LAG’s kernel weights (R 4.6.1 decay^((l − peak)^2), pweibull, dweibull via its oracle) for the in-model adstock; each saturation curve’s closed form and finite-difference partials; a closed-form log posterior and a finite-difference gradient for each kernel and curve, with and without lift tests (a closed-form window Δ in ROI and β mode)
Stan (CmdStan 2.40.0 via cmdstanr 0.9.0, R 4.6.1) sampling the same model and default priors, written independently, on stored simulated series: one case per adstock kernel (geometric, delayed, weibull_cdf, weibull_pdf) × saturation curve (hill, logistic, michaelis_menten) cell, twelve in all, plus two with a lift test in the likelihood (a switch-off on geometric × hill, a +50% test on delayed × logistic) (posterior means of every coefficient and each channel’s ROI)
Stan (CmdStan 2.40.0 via cmdstanr 0.9.0, R 4.6.1) sampling the geo-hierarchical model (params.geo: non-centred partial pooling of each channel’s ROI and decay, HalfNormal(0.5) pooling scales, an intercept per geo), written independently, on two stored simulated three-geo × two-channel panels (geometric × hill) with curves shared and with per_geo_curves (posterior means of every coefficient — per-geo intercepts and β, population β, decay and curve, σ, every τ — each channel’s population ROI μ and its all-geo and per-geo ROI)
simulation-based calibration (Talts et al. 2018) of the geo-hierarchical model on a fixed three-geo × two-channel panel (geometric × hill, default priors), curves shared and with per_geo_curves: 100 seeded replicates per variant (26 weeks per geo), rank of the truth among 99 thinned draws for every per-geo intercept, μ, τ and non-centred offset η
Stan (CmdStan 2.40.0 via cmdstanr 0.9.0, R 4.6.1) NUTS on two stored series of the one-market cross-check — geometric × hill, and delayed × logistic with a lift test — each fitted with params.sampler hmc (static HMC, path_length π/2, adapted step size) and the case’s params and seed (posterior means of every coefficient and the channel’s ROI)
simulation-based calibration (Talts et al. 2018) of the geometric × hill cell on the default priors with every replicate fitted by static HMC (path_length π/2, adapted step size): 200 seeded replicates, rank of the truth among 99 thinned draws
synthetic data with known true parameters (internal/mmmfixture)
bit-equal weights; curves 1e-14 absolute, partials 1e-7 relative; density and lift Δ 1e-9 relative; gradient 1e-6 relativeStatic HMC (params.sampler hmc) is cross-checked against Stan on two one-market cells and calibrated on geometric × hill, at path_length π/2 only; the other cells and geo panels under HMC rest on the NUTS checks of the same density. The one-market Stan cross-check covers one channel and one control per kernel × curve cell at the default priors, and one lift test on two cells; the geo-hierarchical one covers three geos × two channels on geometric × hill only. Custom priors, β mode, several lift tests and the model-owned holdout are covered by the closed-form and calibration checks only; on a geo panel, lift tests and every kernel × curve cell but geometric × hill have no Stan or calibration check. The calibrations run with the outcome scale fixed, because the default priors are stated on the max-scaled outcome and so move with the data.
REG_MMM_HILLminpack.lm::nlsLM 1.2-4 on the same objective, start and bounds (coefficients, standard errors, R², residual SE)
minpack.lm::nlsLM 1.2-4 on the same joint objective, start and boxes under params.adstock, one case per kernel — geometric, delayed, weibull_cdf, weibull_pdf — its weights written independently (closed forms; stats::pweibull / dweibull), cross-checked against nls.lm on an analytic Jacobian (coefficients incl. the kernel parameters, standard errors, R², residual SE)
synthetic data with known true parameters (internal/mmmfixture)
synthetic series with a known kernel per params.adstock value (recovery within 3 SE), WIN_DISTRIBUTED_LAG’s weights (distlagparams.Resolve, unnormalised) and central differences of the residual Jacobian
1e-6 relative (the solver’s stop rule)—
REG_MULTINOMIALR 4.6.1 + nnet 7.3-21 multinom, Newton-polished to the MLE: coefficients, standard errors (solve(Hessian)), Wald p-values and intervals, vcov, deviance, null deviance, two_log_lik, aic and every row’s fitted probabilities; a named reference, a dictionary level no row carries (dropped)
weighted reference (see above)
R 4.6.1 + nnet 7.3-21 fitted(multinom) and predict(multinom, newdata, type = "probs") at the polished MLE (agreeing to 1e-6 with multinom’s own optimum): the ATTR_REG_PREDICT row scores — P(y = category) and the log-odds against the reference — of the training rows and of a grid of new rows, through the bound fit’s scorer; the class, the saved-and-reloaded model file and the Compose fits binding end to end
weighted reference (see above)
weighted reference (see above)
R 4.6.1 + nnet 7.3-21 multinom, the manual-deletion jackknife: every leave-one-out and delete-a-cluster refit polished to its MLE (each agreeing with multinom on the same deletion to 1e-6), the jackknife standard errors of every “<level>:<term>” coefficient; MASS 7.3-66 stepAIC on multinom (forward / backward / both, k = 2 and log(n), a term entering or leaving across every category): the selected terms (forward in entry order) and the final model’s MLE and deviance — resample and selection, every refit at the full fit’s categories and reference
R 4.6.1 + glmnet 5.1 family = "multinomial", type.multinomial = "ungrouped", standardize = FALSE, Newton-polished on the active set and KKT-checked against the stated objective: the penalty (l2 / l1 / elasticnet, unpenalized on each) symmetric coefficients of every category (intercepts centred, exact zeros exactly), deviance, null deviance, and a grid’s probabilities and per-category linear predictors through the bound fit’s scorer
weighted reference (see above)
weighted reference (see above)
weighted reference (see above)
R 4.6.1 + nnet 7.3-21: analytic per-category marginal effects (margins: ame / mem, response and link scale) at the polished multinom MLE — π_k(β_kj − Σπ_mβ_mj), the delta-method gradient (checked against a central difference) on the classical, hc1 and cluster covariance — with Wald statistics, p-values and intervals, a named reference; cross-checked against marginaleffects 1.0.0 avg_slopes / slopes(type = "probs") on multinom set to that MLE at 1e-7
weighted reference (see above)
weighted reference (see above)
R 4.6.1 + nnet 7.3-21 anova.multinom: the Compose nested-model comparison (compare) of two multinom fits polished to their MLE — the likelihood ratio (deviance change on χ² with df = (K − 1) per added predictor, each fit’s residual df (K − 1)·N* − edf and deviance; a named reference) and the Wald test over every “<level>:<term>” coefficient of the added predictors on the full fit’s analytic or hc1 covariance (the classical one cross-checked against the same Wald on vcov(multinom) at 1e-4)
weighted reference (see above)
weighted reference (see above)
1e-12 relativeThe robust covariance is checked against its closed form in R, not an independent package (sandwich has no multinom method); hc2 / hc3 / hac are refused, not validated. A penalised fit has no analytical inference (null standard errors, p-values and intervals; vcov refused); its resampled figures are pinned against the manual-deletion jackknife over fresh penalised fits, not an R oracle, and an even category count under pure l1 (glmnet’s median centring) is checked for the centring rule, not against glmnet. The probability-weighted fit is multinom on the rescaled weights, not a design-based survey estimator. The bootstrap has no R oracle (its replicates are Pulse’s seeded draws): it is pinned seed-stable and worker-invariant, and its category-loss skip by construction; the weighted jackknife (JK1) has no R oracle either. Selection candidates can fit different rows when a predictor has nulls (each candidate fits the rows its predictors admit, a row at a category outside the first candidate’s not fitted), unlike stepAIC, which refuses a changed row count. Term_tests read the plain fit only, and margins beside a penalty or selection are refused, not validated; resampled margins (each replicate re-estimating the effects) are pinned against the coefficient table and Pulse’s own replicate fits, not an R oracle.
REG_OLSNIST StRD certified values (linear regression: Norris, Pontius, NoInt1–2 (intercept: false), Filip, Longley, Wampler1–5)
R 4.6.1 lm
R 4.6.1 glmnet (penalties), nnls (non-negative)
R 4.6.1 sandwich / lmtest (HC0–HC3, cluster, HAC standard errors; vcov)
weighted reference (see above)
weighted reference (see above)
R 4.6.1 logLik / AIC of lm with and without an intercept (two_log_lik, aic; σ counted)
weighted reference (see above)
R 4.6.1 + MASS 7.3-66 + sandwich 3.1-3: analytic marginal effects (margins, ame / mem) of lm with their delta-method standard errors, t statistics, p-values and intervals; cross-checked against marginaleffects 1.0.0 avg_slopes / slopes(newdata = "mean") at 1e-7
R 4.6.1 manual replicate loops: marginal effects under resample (U69 #639) — lm leave-one-out jackknife and a bootstrap over R’s own index sets, each replicate refitting and re-estimating the effect; replicate SE, Wald / percentile p-values and normal intervals
R 4.6.1 + car 3.1-5 vif on lm (collinearity: VIF, tolerance and, over a factor’s dummies grouped as one term, Fox & Monette’s generalized VIF, df and GVIF^(1/(2 df)); the closed form re-derived from the weighted design)
weighted reference (see above)
R 4.6.1 + sandwich 3.1-3 + lmtest 0.9-40: the Compose nested-model comparison (compare) of two lm fits — anova(m0, m1) F and test = "Chisq", waldtest(m0, m1, vcov = vcov | vcovHC(type = "HC3")), a restricted fit through the origin; statistic, df, p-value, each fit’s residual df and RSS, σ̂²
weighted reference (see above)
R 4.6.1 + lmtest 0.9-40: the Compose nested-model comparison of two sweep-bound lm fits (U69 #643) — R ranks every candidate row window by the full model’s residual standard error, picks the same winner and runs anova(m0, m1) on its rows; statistic, df, p-value, each fit’s residual df and RSS
R 4.6.1 + car 3.1-5: the Compose Wald comparison over a resampled lm fit (U69 #642) — manual leave-one-out jackknife and a bootstrap over R’s own index sets of the full model, linearHypothesis(m1, vcov. = V, test = "Chisq") on the replicate covariance V; the covariance, statistic and p-value
weighted reference (see above)
1e-12 relativeOn NIST Wampler5 the coefficients reach 5.7 digits, level with LAPACK’s QR (5.6): the double-precision limit for its large residuals.
REG_ORDINALR 4.6.1 + MASS 7.3-66 polr (logit / probit / cloglog), polished by Newton to its MLE: coefficients, thresholds, standard errors and vcov from the analytic observed information (polr’s numerical Hessian agrees to 1e-4), deviance, null deviance, two_log_lik, AIC, the mean fitted probabilities (colMeans(fitted())); sandwich 3.1-3 sandwich / vcovCL (HC0, HC1, CR1); brant 0.3.0 (omnibus and per-predictor χ², the binary logits at their fixed point); params.levels dropping an unlisted response as factor(y, levels =) does
R 4.6.1 + ordinal 2026.7-26 nominal_test on clm (and clm(nominal = ~ all) for the omnibus): params.nominal_test, the likelihood-ratio test of proportional odds against the partial proportional-odds fit, each partial fit polished by Newton to its MLE on the analytic derivatives (nominal_test agreeing to 1e-6), per predictor and omnibus, on logit / probit / cloglog; a pinned non-convergent case and a pinned crossing case null with their warnings
weighted reference (see above)
weighted reference (see above)
weighted reference (see above)
R 4.6.1 + MASS 7.3-66 predict(polr, type = "probs") and $lp at the polished MLE (agreeing to 1e-6 with polr’s own optimum): the ATTR_REG_PREDICT row scores — P(y = level), P(y ≤ level), the expected level, the class and xᵀβ — on the logit / probit / cloglog cases, through a bound fit and its saved-and-reloaded model file
weighted reference (see above)
weighted reference (see above)
R 4.6.1 + MASS 7.3-66 exp(coef(polr)) and the delta method (exp(confint.default(polr)) on the classical unweighted cases): the exponentiate cumulative odds ratios of the predictors, their standard errors exp(β)·SE and the exponentiated Wald interval, on every link, weighting and covariance (classical, hc0, hc1, cluster)
R 4.6.1 + MASS 7.3-66 polr, the manual-deletion jackknife: every leave-one-out and delete-a-cluster refit polished to its MLE (each agreeing with polr on the same deletion to 1e-6), the jackknife standard errors of the predictors and thresholds; MASS::stepAIC on polr (forward / backward / both, k = 2 and log(n)): the selected terms (forward in entry order) and the final model’s MLE and deviance — resample and selection, every refit at the full fit’s levels
R 4.6.1 + MASS 7.3-66 polr at its polished MLE + sandwich 3.1-3: analytic per-level marginal effects (margins: ame / mem of each predictor on each level’s probability, −β·[f(ζ_k − η) − f(ζ_{k−1} − η)], and the link-scale −β) with their delta-method standard errors on the analytic, hc1 and CR1 covariances, Wald statistics, p-values and intervals, on logit / probit / cloglog; cross-checked against marginaleffects 1.0.0 avg_slopes / slopes on polr (Richardson Jacobian) at 1e-7
weighted reference (see above)
R 4.6.1 + MASS 7.3-66 anova.polr + sandwich 3.1-3: the Compose nested-model comparison (compare) of two polr fits polished to their MLE — the likelihood ratio (deviance change, df = added predictors, each fit’s residual df Σw − edf and deviance) and the Wald test on the full fit’s analytic or hc1 covariance (cross-checked against the same Wald on vcov(polr) / sandwich(polr, adjust = TRUE) at 1e-4); unweighted and polr(weights = f) against its rep() expansion
1e-10 relativeThe Brant test’s omnibus statistic reads the symmetric covariance of the binary logits’ slopes (Brant 1990); brant 0.3.0 stores the (m, l) cross block untransposed at (l, m), so its omnibus figure differs (per-predictor statistics agree) — the oracle script reproduces the package’s figure exactly and pins the symmetric one. Penalty and collinearity are refused (no oracle), and covariance hc2 / hc3 / hac (no row-wise hat matrix, no series). Resampled margins (each replicate re-estimating the effects) are pinned against the coefficient table and Pulse’s own replicate fits, not an R oracle. The bootstrap has no R oracle (its replicates are Pulse’s seeded draws): it is pinned seed-stable and worker-invariant, and its level-loss skip by construction. Selection rows can differ across candidates when a predictor has nulls (each candidate fits the rows its predictors admit), unlike stepAIC, which refuses a changed row count. The nominal test nulls a figure whose partial fit crosses its cumulative probabilities at a fitted row or does not converge, where ordinal::nominal_test still prints a number (clm reports convergence code 1 at a separated split; at a crossing it prices only the observed levels); under a probability weight it is absent (no likelihood, as the multinomial term_tests LR).

Matrix operators

OperatorValidated againstTightest toleranceGap
MAT_COLLINEARITYR 4.6.1 car::vif, perturb::colldiag1e-9 relative—
MAT_CORRELATIONnumpy / statsmodels
R 4.6.1 cor and cor.test (p-values, intervals)
1e-12 relative—
MAT_COVARIANCEnumpy cov / statsmodels DescrStatsW
R 4.6.1 + lmtest 0.9-40: the Compose comparison of two vector fits member by member (U69 #643) — per restricted member j, anova(lm(j ~ restricted others), lm(j ~ full others)), its test = "Chisq" form and waldtest(m0, m1); each row’s statistic, p-value, RSS pair and σ̂², the df and residual dfs
weighted reference (see above)
1e-12 relative—
MAT_DISTANCER 4.6.1 dist1e-9 relative—
MAT_FACTORR 4.6.1 psych::fa, GPArotation1e-9 exact paths; 1e-4 to 2e-3 vs psych iterations—
MAT_PARTIAL_CORRELATIONR 4.6.1 ppcor / corpcor1e-10 relative—
MAT_PCAR 4.6.1 eigen / prcomp, psych::KMO1e-9 relative—
MAT_RELIABILITYR 4.6.1 psych::alpha, psych::omega1e-10 relative; omega 1e-5—
MAT_SEMR 4.6.1 lavaan (ML, WLSMV, DWLS, bootstrap, multi-group), cross-checked with semopyestimates 1e-4, fit indices 1e-3—

Overlays

OperatorValidated againstTightest toleranceGap
OVERLAY_CHISQ_COLR 4.6.1 chisq.test(table[, j], p = rowSums / N) per column
weighted reference (see above)
1e-12 relative—
OVERLAY_CHISQ_MATRIXR 4.6.1 chisq.test(correct = FALSE) (the default applies no Yates correction)
R 4.6.1 chisq.test(correct = TRUE) (params.correct on a 2 × 2 host)
weighted reference (see above)
1e-12 relative—
OVERLAY_CHISQ_ROWR 4.6.1 chisq.test(table[i, ], p = colSums / N) per row
weighted reference (see above)
1e-12 relative—
OVERLAY_CHISQ_VS_POPR 4.6.1 chisq.test1e-10 relative—
OVERLAY_CHISQ_VS_REFR 4.6.1 chisq.test
weighted reference (see above)
1e-12 relative—
OVERLAY_FISHER_EXACT_CELLR 4.6.1 fisher.test
weighted reference (see above)
1e-12 relative—
OVERLAY_KS_VS_POPR 4.6.1 ks.test / psmirnov1e-10 relative—
OVERLAY_PAIRWISE_PROBIT_TR 4.6.1 evaluation of the design formula1e-10 relativeNo stock implementation exists to compare with; the reference evaluates the published formula.
OVERLAY_PAIRWISE_PROP_ZR 4.6.1 prop.test(correct = FALSE)
weighted reference (see above)
1e-12 relative—
OVERLAY_PAIRWISE_TWO_MEANS_ZR 4.6.1 pnorm on the Welch standard error1e-10 relative—
OVERLAY_PAIRWISE_WEIGHTED_TWO_MEANS_Zweighted reference (see above)1e-12 relative—
OVERLAY_PAIRWISE_WELCH_TR 4.6.1 t.test
weighted reference (see above)
1e-12 relative—
OVERLAY_PROP_Z_CELLR 4.6.1 prop.test(correct = FALSE) on the shared pooled two-proportion kernel, which the overlay runs on the legs each cell reads
weighted reference (see above)
1e-12 relative—
OVERLAY_PROP_Z_PANELR 4.6.1 prop.test(correct = FALSE)
weighted reference (see above)
1e-12 relative—
OVERLAY_PROP_Z_VS_PRIORweighted reference (see above)
an independent re-implementation of the pooled two-proportion z test
1e-12 relative—
OVERLAY_RAKER 4.6.1 loglin, cross-checked with survey::rake1e-9 relative—
OVERLAY_STD_RESIDUALR 4.6.1 chisq.test()$stdres
weighted reference (see above)
1e-12 relative—
OVERLAY_SYMMETRYR 4.6.1 mcnemar.test / Bowker
weighted reference (see above)
1e-12 relative—
OVERLAY_T_CELLR 4.6.1 t.test / pt
byte parity with TEST_WELCH on AGG_WELFORD cells, offsets to 1e12 included (so its R pins carry over)
weighted reference (see above)
1e-12 relative—
OVERLAY_T_VS_PRIORweighted reference (see above)
an independent re-implementation of the Welch t test
1e-12 relative—
OVERLAY_T_VS_REFR 4.6.1 t.test / pt
byte parity with TEST_WELCH on AGG_WELFORD cells, offsets to 1e12 included (so its R pins carry over)
weighted reference (see above)
1e-12 relative—
OVERLAY_Z_CELLR 4.6.1 pnorm on the Welch standard error
byte parity with TEST_Z_TWO_SAMPLE on AGG_WELFORD cells, offsets to 1e12 included (so its R pins carry over)
weighted reference (see above)
1e-12 relative—
OVERLAY_Z_VS_PRIORweighted reference (see above)
an independent re-implementation of the Welch z test
1e-12 relative—
OVERLAY_Z_VS_REFR 4.6.1 pnorm on the Welch standard error
byte parity with TEST_Z_TWO_SAMPLE on AGG_WELFORD cells, offsets to 1e12 included (so its R pins carry over)
weighted reference (see above)
1e-12 relative—

NIST StRD certification

The NIST Statistical Reference Datasets carry certified values to 15 significant digits and are the accuracy benchmark statistical packages are measured against. Each dataset runs end to end through Pulse; a figure’s digits are its log relative error against the certified value, LRE = −log10(|x − c| / |c|), floored to 0.1 and capped at 15. Roughly, 15 is exact in double precision, 7 or more is accurate for any practical use, and under 4 means the figure is unreliable on that data. Lower- and average-difficulty sets must reach 7 digits on every figure; higher-difficulty sets are published as achieved. These numbers are the record the tests assert (strd_reference_test.go), so any change in accuracy fails the build until it is reviewed.

Linear regression (REG_OLS)

DatasetNIST difficultyFewest digitsFigures (digits)Note
Norrislower12.4B0 12.4, B1 14.3, SE(B0) 13.0, SE(B1) 13.0, r2 15.0, residual_sd 13.0—
Pontiuslower11.8B0 11.8, B1 15.0, B2 13.8, SE(B0) 12.3, SE(B1) 12.3, SE(B2) 12.3, r2 15.0, residual_sd 12.3—
NoInt1average14.1B1 14.8, SE(B1) 14.1, r2 15.0, residual_sd 14.2—
NoInt2average15.0B1 15.0, SE(B1) 15.0, r2 15.0, residual_sd 15.0—
Filiphigher7.4B0 8.9, B1 9.0, B10 8.9, B2 9.1, B3 9.3, B4 9.5, B5 10.2, B6 9.8, B7 9.4, B8 9.2, B9 9.0, SE(B0) 7.4, SE(B1) 7.4, SE(B10) 7.4, SE(B2) 7.4, SE(B3) 7.4, SE(B4) 7.4, SE(B5) 7.4, SE(B6) 7.4, SE(B7) 7.4, SE(B8) 7.4, SE(B9) 7.4, r2 10.2, residual_sd 8.0—
Longleyhigher13.3B0 15.0, B1 13.3, B2 14.5, B3 14.5, B4 14.8, B5 13.5, B6 14.8, SE(B0) 15.0, SE(B1) 14.6, SE(B2) 15.0, SE(B3) 14.6, SE(B4) 14.5, SE(B5) 15.0, SE(B6) 14.8, r2 15.0, residual_sd 15.0—
Wampler1higher9.6B0 9.6, B1 10.2, B2 10.7, B3 11.4, B4 12.8, B5 14.7, SE(B0) 10.0, SE(B1) 10.0, SE(B2) 10.5, SE(B3) 11.3, SE(B4) 12.6, SE(B5) 14.3, r2 15.0, residual_sd 10.0—
Wampler2higher13.3B0 14.7, B1 14.7, B2 13.5, B3 13.3, B4 13.6, B5 14.3, SE(B0) 14.7, SE(B1) 14.7, SE(B2) 15.0, SE(B3) 15.0, SE(B4) 15.0, SE(B5) 15.0, r2 15.0, residual_sd 14.7—
Wampler3higher9.7B0 9.9, B1 9.7, B2 10.2, B3 11.1, B4 12.3, B5 14.1, SE(B0) 12.5, SE(B1) 14.3, SE(B2) 13.9, SE(B3) 13.8, SE(B4) 13.7, SE(B5) 13.6, r2 15.0, residual_sd 15.0—
Wampler4higher7.7B0 8.0, B1 7.7, B2 8.1, B3 9.0, B4 10.3, B5 12.0, SE(B0) 12.5, SE(B1) 14.6, SE(B2) 13.9, SE(B3) 13.9, SE(B4) 13.7, SE(B5) 13.7, r2 15.0, residual_sd 14.9—
Wampler5higher5.7B0 6.0, B1 5.7, B2 6.1, B3 7.0, B4 8.3, B5 10.0, SE(B0) 12.5, SE(B1) 14.5, SE(B2) 13.9, SE(B3) 13.9, SE(B4) 13.7, SE(B5) 13.7, r2 14.4, residual_sd 14.8—

One-way ANOVA (TEST_ANOVA_F)

DatasetNIST difficultyFewest digitsFigures (digits)Note
SiRstvlower13.0f 13.0, ms_between 14.0, ms_within 13.1, r2 13.1, residual_sd 13.4, ss_between 14.0, ss_within 13.1—
SmLs01lower15.0f 15.0, ms_between 15.0, ms_within 15.0, r2 15.0, residual_sd 15.0, ss_between 15.0, ss_within 15.0—
SmLs02lower15.0f 15.0, ms_between 15.0, ms_within 15.0, r2 15.0, residual_sd 15.0, ss_between 15.0, ss_within 15.0—
SmLs03lower14.9f 14.9, ms_between 15.0, ms_within 15.0, r2 15.0, residual_sd 15.0, ss_between 15.0, ss_within 15.0—
AtmWtAgaverage10.1f 10.1, ms_between 10.2, ms_within 10.9, r2 10.2, residual_sd 11.2, ss_between 10.2, ss_within 10.9—
SmLs04average10.0f 10.4, ms_between 10.0, ms_within 10.2, r2 10.7, residual_sd 10.5, ss_between 10.0, ss_within 10.2—
SmLs05average9.9f 10.2, ms_between 9.9, ms_within 10.2, r2 10.4, residual_sd 10.5, ss_between 9.9, ss_within 10.2—
SmLs06average9.9f 10.1, ms_between 9.9, ms_within 10.2, r2 10.4, residual_sd 10.5, ss_between 9.9, ss_within 10.2—
SmLs07higher4.0f 4.4, ms_between 4.0, ms_within 4.2, r2 4.6, residual_sd 4.5, ss_between 4.0, ss_within 4.2—
SmLs08higher3.9f 4.1, ms_between 3.9, ms_within 4.2, r2 4.4, residual_sd 4.5, ss_between 3.9, ss_within 4.2—
SmLs09higher3.9f 4.1, ms_between 3.9, ms_within 4.2, r2 4.4, residual_sd 4.5, ss_between 3.9, ss_within 4.2—

Univariate summary statistics (AGG_AVERAGE, AGG_STDDEV, AGG_WELFORD)

DatasetNIST difficultyFewest digitsFigures (digits)Note
PiDigitslower14.9mean 15.0, sd 14.9, welford_sd 14.9lag-1 autocorrelation: no built-in aggregator computes it
Lotterylower15.0mean 15.0, sd 15.0, welford_sd 15.0lag-1 autocorrelation: no built-in aggregator computes it
Lewlower15.0mean 15.0, sd 15.0, welford_sd 15.0lag-1 autocorrelation: no built-in aggregator computes it
Mavrolower12.0mean 15.0, sd 12.0, welford_sd 13.1lag-1 autocorrelation: no built-in aggregator computes it
Michelsonot stated12.3mean 15.0, sd 12.3, welford_sd 13.8lag-1 autocorrelation: no built-in aggregator computes it
NumAcc1lower15.0mean 15.0, sd 15.0, welford_sd 15.0lag-1 autocorrelation: no built-in aggregator computes it
NumAcc2average15.0mean 15.0, sd 15.0, welford_sd 15.0lag-1 autocorrelation: no built-in aggregator computes it
NumAcc3average9.4mean 15.0, sd 9.4, welford_sd 9.4lag-1 autocorrelation: no built-in aggregator computes it
NumAcc4higher8.2mean 15.0, sd 8.2, welford_sd 8.2lag-1 autocorrelation: no built-in aggregator computes it