EProportions · Guide test 301
Weighted genetic burden test
Tests an aggregate score of variants, particularly useful when effects tend to share direction.
Do it in CodeSplash
In the app, set it up in Analyze with this method:
- Rare-variant set tests (SKAT, SKAT-O, burden) — Is a set of rare variants in a gene, taken together, associated with the trait?
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
0: every effect raises the trait (the burden test's case); ½: mixed directions (SKAT's case).
Your data
Rare variants and a trait, simulated| Person | Trait | Minor alleles in the set |
|---|---|---|
| 1.000 | 2.678 | 4.000 |
| 2.000 | −1.494 | 0.000 |
| 3.000 | 0.580 | 0.000 |
| 4.000 | 0.069 | 1.000 |
| 5.000 | 1.163 | 0.000 |
| 6.000 | −0.727 | 0.000 |
| 7.000 | 0.155 | 1.000 |
| 8.000 | −0.269 | 0.000 |
| 9.000 | 0.477 | 1.000 |
| 10.000 | −1.350 | 0.000 |
| 11.000 | 0.633 | 1.000 |
| 12.000 | −0.936 | 0.000 |
300 people, 10 rare variants (106 carry at least one) · first 12 of 40 rows
If H₀ were true
- The reference: how χ² varies across samples when H₀ is true.
- Your statistic, from the data above.
- The p-value: the area at least as extreme as yours (p = < .001).
- The hatched rejection region at α = .050: statistics landing here reject H₀.
The formula
With your numbers
- each person's weighted count of rare alleles in the set
- 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 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
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.
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()
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
- SKAT and SKAT O documentationsearch.r-project.org
- SKATsearch.r-project.org
- SKAT_Null_Modelsearch.r-project.org
- 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.