run_all_inference()
returns many tests and intervals for the same data. They do not all
deserve the same trust at a small sample size. This page says which ones
are valid at every sample size, which ones are valid only as the sample
grows, how fast, and for which classes nobody knows. Citation keys in
square brackets, such as [Hall1992], are entries of
REFERENCES.md.
The tables below are not typed by hand. They are rendered from the
registry in R/inference_procedure_regime.R by
R/package_tests/render_procedure_trust_tables.R, and a test
fails if this page and the registry disagree. Nothing on this page was
tuned to simulation output.
Every procedure is in one of two regimes.
exact tests and the randomization test
rand. Their size should be at the nominal level at n = 10
as well as n = 1000. If one is off, that is a defect, not an expected
small-sample effect. The rand test is exact under the sharp
null [Fisher1935].The regime is a property of the procedure, not of the class. A finite-sample procedure that falls back to a normal approximation in some cell is still labelled finite sample, so a miss there counts as a defect to fix.
For an asymptotic procedure, the registry gives the order of the
two-sided size (or coverage) error, written O(n^-k) and read “the error
shrinks like n to the power minus k”. A larger k means the procedure
becomes reliable at a smaller sample size. The orders for a regular
parametric model are in the first table. They come from Edgeworth
expansions [Hall1992] and chi-square approximation errors
[BarndorffNielsenCox1994]. The bias of the point estimate
is O(n^-1) for a regular maximum-likelihood estimate
[CoxSnell1968]. The difference in means is unbiased under
randomization [Neyman1923].
The “n” in an order is not always the number of subjects. The effective-n rule says which count drives the error. Matched designs are limited by the number of pairs, survival models by the number of events, hurdle models by the number of nonzero counts, and an unequal allocation by the smaller arm. The second table lists the rules.
An order says how the error shrinks. It does not give the constant in front of it. A procedure with a better order can still be worse at n = 30.
Procedures.
| Procedure | Regime | Size error in a regular model | Basis of that rate | Citations |
|---|---|---|---|---|
exact |
finite sample | exact | theory | none |
rand |
finite sample | exact | theory | [Fisher1935] [LehmannRomano2005] |
wald |
asymptotic | O(n^-1) | theory | [Hall1992] [CoxSnell1968] |
jackknife |
asymptotic | O(n^-1) | literature | [ShaoTu1995] |
score |
asymptotic | O(n^-1) | theory | [BarndorffNielsenCox1994] |
lik_ratio |
asymptotic | O(n^-1) | theory | [BarndorffNielsenCox1994] |
gradient |
asymptotic | O(n^-1) | literature | [Terrell2002] [Lemonte2016] |
lik_ratio_bartlett_approx |
asymptotic | O(n^-2) | literature | [Lawley1956] [BarndorffNielsenHall1988] |
lik_ratio_bartlett_exact |
asymptotic | O(n^-2) | literature | [Lawley1956] [BarndorffNielsenHall1988] |
param_boot |
asymptotic | O(n^-2) | literature | [Beran1988] [DiCiccioMartinStern2001] |
param_boot_direct |
asymptotic | O(n^-1) | literature | [Hall1992] |
bootstrap |
asymptotic | O(n^-1) | literature | [Hall1992] |
bayes_boot |
asymptotic | O(n^-1) | literature | [Rubin1981] [Lo1987] |
rand_bootstrap |
asymptotic | O(n^-1) | assumed default | none |
Effective-n rules (every rule other than
n).
| Effective n | Meaning | Applies to |
|---|---|---|
n |
number of subjects | every other class and design |
n_pairs |
number of matched pairs | InferenceOrdinalPairedSignTest |
n_pairs_plus_reservoir |
matched pairs plus unmatched subjects | 26 classes |
n_min_arm |
size of the smaller arm | designs @prob_T |
n_events |
number of events (failures, or incident cases) | 25 classes |
n_nonzero |
number of nonzero counts | InferenceCountHurdleNegBin,
InferenceCountHurdlePoisson,
InferenceCountKKHurdlePoissonOneLik |
n_clusters |
number of clusters | designs DesignFixedBlockedCluster,
DesignFixedCluster |
n_strata |
number of strata | InferenceIncidCMH |
Non-regular cases. Classes counted once per kind.
| Kind | Classes | Size error | Why | Citations |
|---|---|---|---|---|
| boundary | 2 | unknown | The estimate can sit on the edge of the parameter space (a fitted probability at 0 or 1), where the usual limit does not apply. | [SelfLiang1987] |
| variance component | 10 | unknown | A random-effect variance near zero is on the boundary, and the likelihood limit for it is not chi-square. | [SelfLiang1987] [StramLee1994] |
| mixture | 3 | unknown | The inflation probability can be on the boundary, where the information is singular. | [SelfLiang1987] |
| nonparametric rate | 4 | O(n^-2/3) | The standard error needs an estimate of the density at the quantile (the sparsity), which converges slower than n^-1/2. | [HallSheather1988] [Koenker2005] [Powell1991] |
| design mismatch | 2 | O(1) | The variance formula ignores the covariate balancing of the design, so the interval stays conservative as n grows. | [BaiRomanoShaikh2021] [BugniCanayShaikh2018] [LiDingRubin2018] |
| other | 3 | unknown | Non-standard limit: unidentified nuisance parameters under the null, or an estimated scale. | [Davies1977] [Huber1981] |
Classes whose rate is not known.
| Kind | Classes whose rate is not known |
|---|---|
| boundary | InferenceIncidBinomialIdentityRiskDiff,
InferenceIncidLogBinomial |
| mixture | InferenceCountZeroInflatedNegBin,
InferenceCountZeroInflatedPoisson,
InferencePropZeroOneInflatedBetaRegr |
| other | InferenceContinKKRobustRegrOneLik,
InferenceContinRobustRegr,
InferenceOrdinalStereotypeLogitRegr |
| variance component | InferenceContinKKGLMM,
InferenceCountKKGLMM, InferenceOrdinalKKCLMM,
InferenceOrdinalKKCLMMCauchit,
InferenceOrdinalKKCLMMCloglog,
InferenceOrdinalKKCLMMProbit,
InferenceOrdinalKKGLMM, InferencePropKKGLMM,
InferenceSurvivalGLMMWeibullFrailtyLoggammaOneLik,
InferenceSurvivalGLMMWeibullFrailtyNormalOneLik |
Two cautions on the first table. The default bootstrap
type is BCa, whose two-sided error is O(n^-2) in theory, but it falls
back to a percentile interval in some cases and some classes are pinned
to it, so the table gives the percentile order as a lower bound. The
order of rand_bootstrap was not derived anywhere I could
find; the bootstrap order is assumed and no citation is given.
The orders above hold in a regular model. Some classes are not regular. The last two tables list them. For most of them the registry records the rate as unknown, which means exactly that: no order was derived or measured. It does not mean the procedure is bad. It means do not read the first table as a promise for these classes.
[SelfLiang1987].[SelfLiang1987]
[StramLee1994], and its effect on the treatment test is not
characterised here.[SelfLiang1987].[HallSheather1988];
extending that to the regression Wald is by analogy, not proved (see
[Koenker2005], [Powell1991]).[BaiRomanoShaikh2021]
[BugniCanayShaikh2018] [LiDingRubin2018].[Davies1977]. Robust
regression with an estimated scale has a known first-order limit but no
known higher-order rate [Huber1981].Each (design, class, procedure) cell has a basis for its rate:
exact
and rand cell, and the bias of a difference in means.Scope: 33 designs, 88 inference classes, 17,139 (design, class, procedure) triples, the ones the calibration study runs.
| Regime | Triples | theory | literature | empirical | assumed default | unknown |
|---|---|---|---|---|---|---|
| finite sample | 1,826 | 1,826 | 0 | 0 | 0 | 0 |
| asymptotic | 15,313 | 0 | 114 | 0 | 12,307 | 2,892 |
| all | 17,139 | 1,826 | 114 | 0 | 12,307 | 2,892 |
| Regularity (asymptotic procedures) | Triples | Share |
|---|---|---|
| regular | 12,307 | 80.4% |
| boundary | 792 | 5.2% |
| variance component | 364 | 2.4% |
| mixture | 1,188 | 7.8% |
| nonparametric rate | 74 | 0.5% |
| design mismatch | 40 | 0.3% |
| other | 548 | 3.6% |
Of the 15,313 asymptotic triples, 80.4% rest on an assumed default and 18.9% have an unknown rate.
Most asymptotic cells are assumed defaults. Treat the order of such a cell as a reasonable guess, not as a result.
The calibration study measures the size, coverage and bias of each
cell at fixed sample sizes, with Monte Carlo intervals. The published
results are on the calibration-results branch: https://github.com/kapelner/EDI/tree/calibration-results.
Use them to see how far a particular cell is from its nominal level at
your sample size. They are measurements at the design and sample sizes
studied, not guarantees for other settings.