Skip to content

EProportions · Guide test 301

Weighted genetic burden test

Tests an aggregate score of variants, particularly useful when effects tend to share direction.

Runs in CodeSplash (Experimental)Python (calls R) example not runR example not run

Do it in CodeSplash

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

In Rare-variant set tests (SKAT, SKAT-O, burden), choose Test = Weighted burden.

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 · Weighted genetic burden test

300
10
0.50
0.80
0.00

0: every effect raises the trait (the burden test's case); ½: mixed directions (SKAT's case).

0.050

Your data

Rare variants and a trait, simulated
PersonTraitMinor alleles in the set
1.0002.6784.000
2.000−1.4940.000
3.0000.5800.000
4.0000.0691.000
5.0001.1630.000
6.000−0.7270.000
7.0000.1551.000
8.000−0.2690.000
9.0000.4771.000
10.000−1.3500.000
11.0000.6331.000
12.000−0.9360.000

300 people, 10 rare variants (106 carry at least one) · first 12 of 40 rows

If H₀ were true

χ² = 23.33
  1. The reference: how χ² 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 = < .001).
  4. The hatched rejection region at α = .050: statistics landing here reject H₀.

The formula

Qb=12(∑jwj∑iGij yi−μ^iσ^)2,Qbλb∼χ12Q_b=\tfrac12\Big(\sum_jw_j\sum_iG_{ij}\,\frac{y_i-\hat\mu_i}{\hat\sigma}\Big)^2,\qquad \frac{Q_b}{\lambda_b}\sim\chi^2_1

With your numbers

Qb=299025.6,Qb/λb=23.33,10 variantsQ_b = 299025.6,\quad Q_b/\lambda_b = 23.33,\quad 10\text{ variants}
∑jwjGij\sum_jw_jG_{ij}
each person's weighted count of rare alleles in the set
λb\lambda_b
the variance of the summed score under H₀

The verdict

χ²(1) = 23.33, p < .001

p ≤ α = .050: reject H₀

Most powerful when most variants push the trait the same way; opposite effects cancel. Research use only, not a diagnostic or clinical result.

Statistic
23.332
p-value
0.0000
Weighted genetic burden test on 300 people, 10 rare variants (106 carry at least one): χ²(1) = 23.33, p < .001. The p-value is below α = .050, so the data are hard to reconcile with H0.

Weighted genetic burden test on 300 people, 10 rare variants (106 carry at least one): χ²(1) = 23.33, p < .001. The p-value is below α = .050, so the data are hard to reconcile with H₀.

Question and hypotheses

H0: a prespecified aggregated genetic burden has no association with outcome.

Assumptions

Correct outcome model/covariates, population structure control, suitable genotype quality and prespecified weights; the strongest power assumes mostly aligned effects.

Formula

Bi=∑jwjGijg(E[Yi])=XiTβ+γBiH0:γ=0\begin{gathered}B_i=\sum_jw_jG_{ij}\\[5pt] g(E[Y_i])=X_i^T\beta+\gamma B_i\\[5pt] H_0:\gamma=0\end{gathered}

Parameters and notation

Bi is a weighted allele burden; g is identity/logit or another appropriate link.

Structure of the method

Collapse a prespecified set of genotypes into one weighted burden and test its coefficient in a suitable outcome regression. In a kernel formulation, a rank-one burden kernel provides the analogous score direction. This pooling emphasizes aligned effects and can lose opposing signals through cancellation.

Estimated and nuisance parameters

Estimate covariate coefficients, burden coefficient when fitting the alternative and relevant outcome variance/dispersion. Genotype frequencies may determine weights through a fixed rule. The burden score itself is constructed per person, while set membership, allele orientation and weighting policy are design choices.

Settings and design choices

Define variant masks, functional annotations, minor-allele coding, frequency thresholds and weights before looking at association. Specify score, Wald or likelihood-ratio inference and the outcome link. The baseline SKAT call with r.corr=1 demonstrates the burden endpoint within that package’s kernel/weight conventions.

Fitting and adaptation

Refit null and, when needed, alternative models on matched samples. Adaptation to rare binary outcomes can require specialized small-sample or separation-aware methods. Learning directions or weights from the same phenotype without external training or calibrated adaptation invalidates the ordinary one-degree-of-freedom reference.

Sensitivity and robustness

Protective and harmful effects can cancel; neutral variants dilute signal, and ancestry differences can confound burden. Sparse carriers or separation make ordinary logistic Wald tests unreliable. Report carrier counts, variant filters, missingness handling and effect scale along with significance; a burden result is not a variant-specific causal estimate.

How to use and calibrate

Use a one-df score, Wald or likelihood-ratio test in the fitted model, with rare-outcome corrections where necessary.

Example application

Test whether carrying more damaging variants in a gene changes risk.

Interpretation and pitfalls

Watch out

Opposite effects can cancel. “Burden test” is a family; collapsing rules, direction and variant weights must be stated.

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

Continuous-trait variant, additive genotype dosage, Beta(1,25) rare-variant weights. SKAT-O adaptively combines variance-component and burden evidence with its own calibration; r.corr=1 is the weighted burden endpoint.

Python · invokes R

Not run — Python launcher syntax checked; R backend runtime not verified · needs Python standard library + Rscript; R packages: SKAT

# Python launcher for the complete R implementation below.
# Requires Rscript on PATH and the listed R packages.
import shutil
import subprocess
rscript = shutil.which("Rscript")
if rscript is None:
    raise RuntimeError("Install R and make Rscript available on PATH.")
r_code = r"""
set.seed(2026)
n<-200;m<-12;maf<-seq(.01,.15,length.out=m);G<-sapply(maf,function(p)rbinom(n,2,p));age<-rnorm(n);y<-.3*age+rnorm(n);null<-SKAT::SKAT_Null_Model(y~age,out_type="C");print(SKAT::SKAT(G,null,weights.beta=c(1,25),method="davies",r.corr=1))
"""
# No shell interpolation. A failed R execution raises an error in Python.
result = subprocess.run([rscript, "--vanilla", "-"], input=r_code,
                        text=True, capture_output=True)
print(result.stdout)
if result.stderr:
    print(result.stderr)
result.check_returncode()
R

Not run — Syntax checked; runtime not verified in the final environment · needs SKAT

set.seed(2026)
n<-200;m<-12;maf<-seq(.01,.15,length.out=m);G<-sapply(maf,function(p)rbinom(n,2,p));age<-rnorm(n);y<-.3*age+rnorm(n);null<-SKAT::SKAT_Null_Model(y~age,out_type="C");print(SKAT::SKAT(G,null,weights.beta=c(1,25),method="davies",r.corr=1))

Sources

Statistics guide v4 (historical):
Python: Python launcher syntax checked; R backend runtime not verified · R: Syntax checked; runtime not verified in the final environment
Reference's record:
Edition 2 review: Python: skip · R: not executed (Rscript unavailable); why not run: Python: Python-to-R bridge; Rscript is unavailable. R code was not executed. Python: Not run in the reference's review: Python-to-R bridge; Rscript is unavailable. R code was not executed. R: Reviewed but not run: R wasn't available to the reference's authors.

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