Skip to content

BCompare groups · Guide test 272

Lancaster combination test

Combines transformed p values using chi square distributions with specified degrees of freedom.

Runs in CodeSplashPython example validatedR example validated

Do it in CodeSplash

In the app, set it up in Analyze with this method:

In Combine p-values (global test across studies), choose Combination method = Lancaster.

Do it in CodeSplash Run this test on your own data, in Python or R.

Bench

Change the design, drag the data, move α. The statistic, its reference distribution and the verdict follow.

Bench · Lancaster combination test

10
1.20
0.50
4

Lancaster's weight: each p becomes a χ² quantile with this many df (2 is Fisher).

0.050

Your data

Drag a point or use ↑/↓ to change it
p-values · n = 10 · mean 0.41

If H₀ were true

X = 50.83
  1. The reference: how X varies across samples when H₀ is true.
  2. Your statistic, from the data above.
  3. The p-value: the area at least as extreme as yours (p = .117).
  4. The hatched rejection region at α = .050: statistics landing here reject H₀.

How the studies combine

Each p becomes a χ² quantile; more df per study weighs moderate p-values more than Fisher does. Dashed gray: what k uniform p-values would look like.

The formula

X=∑i=1kFχνi2−1(1−pi)∼χ∑iνi2X=\sum_{i=1}^kF^{-1}_{\chi^2_{\nu_i}}(1-p_i)\sim\chi^2_{\sum_i\nu_i}

With your numbers

X=50.83,νi=4,∑νi=40X = 50.83,\quad \nu_i = 4,\quad \textstyle\sum\nu_i = 40
νi\nu_i
the study's prespecified df (weight); 2 for every study is Fisher's method
Fχν2−1(1−p)F^{-1}_{\chi^2_{\nu}}(1-p)
the χ² quantile that leaves p in the upper tail

The verdict

X(40) = 50.83, p = .117

p > α = .050: compatible with H₀

Larger νi give more weight to moderate p-values and less to one extreme study. Fix the weights (often study size) before looking at the p-values.

Statistic
50.826
p-value
0.1173
Lancaster combination test on p-values: n = 10: X(40) = 50.83, p = .117. The p-value is above α = .050, so the data are compatible with H0.

Lancaster combination test on p-values: n = 10: X(40) = 50.83, p = .117. The p-value is above α = .050, so the data are compatible with H₀.

Question and hypotheses

H0: all component null hypotheses hold; H1: at least one fails.

Assumptions

Valid component p values for the individual nulls; a prespecified combination and study/test set. Exact formulas below generally assume independent continuous Uniform(0,1) p values under the complete null; dependence requires a justified adjustment.

Formula

X=∑iFχνi2−1(1−pi)∼χ∑iνi2X=\sum_iF^{-1}_{\chi^2_{\nu_i}}(1-p_i)\sim\chi^2_{\sum_i\nu_i}

Parameters and notation

νi>0 are prespecified degrees-of-freedom weights; νi=2 recovers Fisher.

Structure of the method

Convert each p value to an upper-tail chi-square quantile with its designated degrees-of-freedom weight, then add the transformed values. Independence gives a chi-square reference whose degrees of freedom are the sum of the specified weights; setting every weight to two recovers Fisher’s statistic.

Estimated and nuisance parameters

The degrees-of-freedom weights are positive design inputs, not estimated effect parameters. Quantile-transformed component scores are computed outputs. Any estimated variance or model coefficient used to form an input p value belongs to that original test and must be accounted for there.

Settings and design choices

State every degrees-of-freedom weight and the rationale for weighting. Do not confuse quantile weighting with multiplying −2 log p by an arbitrary coefficient. Use upper-tail inverse functions for extremely small p values to avoid losing precision by forming 1−p numerically.

Fitting and adaptation

A new application should preserve prespecified weights and validate component p values. Dependence requires a justified covariance-aware or resampling calibration of the weighted statistic. Choosing weights after seeing which components are significant is adaptive selection and requires additional inferential justification.

Sensitivity and robustness

Large weights can concentrate influence in particular studies even when the nominal sum degrees of freedom also grows. Correlated inputs, sparse/discrete tests and rounded probabilities break the simple exact argument. Report weight sensitivity as a planned robustness analysis rather than selecting whichever weighting scheme gives the smallest p value.

How to use and calibrate

Use the upper chi square tail and report all νi.

Example application

Combine evidence while assigning different information weights.

Interpretation and pitfalls

Watch out

Degrees-of-freedom weights are not interchangeable with arbitrary multipliers of log p. Dependence needs adjustment.

What changed in edition 2

  • New sections: structure of the method, estimated and nuisance parameters, settings and design choices, fitting and adaptation, sensitivity and robustness.

Python and R

Lancaster uses prespecified chi-square degrees of freedom/weights for each independent p-value; all df=2 recovers Fisher.

Python · native

Validated — Executed successfully in the validation environment · needs numpy, scipy

import numpy as np
from scipy import stats
rng = np.random.default_rng(2026)
p=np.array([.01,.04,.2,.5,.1])
df=np.array([2,4,2,6,2]);T=stats.chi2.isf(p,df).sum()
print(T,stats.chi2.sf(T,df.sum()))
Output
32.40802629684246 0.008844745530338531
R

Validated — Executed successfully in the validation environment · needs Base/standard library

p<-c(.01,.04,.2,.5,.1)
df<-c(2,4,2,6,2);T<-sum(qchisq(1-p,df));print(c(statistic=T,p=pchisq(T,sum(df),lower.tail=FALSE)))
Output
   statistic            p 
32.408026297  0.008844746

Sources

Statistics guide v4 (historical):
R: Executed successfully in the validation environment
Reference's record:
Edition 2 review: Python: executed · R: not executed (Rscript unavailable). Python: Ran in the reference's review, on this exact code. R: Reviewed but not run: R wasn't available to the reference's authors.

From the CodeSplash statistics guide (v4), entry 272, updated from the reference's edition 2 (reviewed 14 November 2026) as STAT272.