EProportions · Guide test 299
Sequence kernel association test or SKAT
Tests association between a genetic variant set and an outcome using a variance component score statistic.
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 = SKAT.
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 · Sequence kernel association test (SKAT)
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 | −0.522 | 4.000 |
| 2.000 | −1.494 | 0.000 |
| 3.000 | 0.580 | 0.000 |
| 4.000 | −1.531 | 1.000 |
| 5.000 | 1.163 | 0.000 |
| 6.000 | −0.727 | 0.000 |
| 7.000 | −1.445 | 1.000 |
| 8.000 | −0.269 | 0.000 |
| 9.000 | −1.123 | 1.000 |
| 10.000 | −1.350 | 0.000 |
| 11.000 | −0.967 | 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 Q varies across samples when H₀ is true, Σ λⱼ χ²₁ with the eigenvalues of this set (Imhof) (a weighted sum of χ²₁ with the eigenvalues of this set, by Imhof's integral).
- 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
- weights that favor the rarest variants
- eigenvalues of the weighted genotype covariance; the null is their χ² mixture (the curve)
The verdict
Q = 42281.20, p < .001
p ≤ α = .050: reject H₀
Squares each variant's score, so effects in both directions add up; when all effects share a direction the burden test is usually stronger. Research use only, not a diagnostic or clinical result.
- Statistic
- 42281.203
- p-value
- 0.0003
Sequence kernel association test (SKAT) on 300 people, 10 rare variants (106 carry at least one): Q = 42281.20, p < .001. The p-value is below α = .050, so the data are hard to reconcile with H₀.
Question and hypotheses
H0: all variant effects in a prespecified set are zero.
Assumptions
Independent or appropriately modeled related individuals; correct null outcome model and covariates; valid genotype quality and prespecified variant weighting.
Formula
Parameters and notation
G is genotype matrix,W diagonal variant weights; λj eigenvalues of the covariate-adjusted kernel under the null covariance. Some conventions absorb a 1/2 or weights directly into K.
Structure of the method
Fit the null outcome model with covariates but no tested variant effects, form residuals and a genotype kernel, and evaluate the variance-component score against a weighted chi-square mixture. The eigenvalues come from the covariate-adjusted null kernel; an ordinary chi-square with variant-count degrees of freedom is incorrect.
Estimated and nuisance parameters
Null regression coefficients, residual variance for continuous traits, allele frequencies and mixture eigenvalues are estimated. Variant effects are not individually fitted for the classical score test. Kernel weights and variant-set definitions are design choices, although some weights use allele-frequency estimates by a prescribed rule.
Settings and design choices
Specify outcome/link, covariates, ancestry/relatedness treatment, variant filters, kernel and weight convention. In the R package weights are square-root kernel weights relative to some paper notation; avoid squaring twice. State mixture-tail method and binary small-sample/imbalance adjustments rather than relying on generic defaults.
Fitting and adaptation
Refit the null model on the actual analysis sample and use the matching genotype rows. Adaptation means improving the null model or validated calibration, not optimizing weights against the same phenotype without adjustment. The package recommends specialized binary-trait routines for relevant sparse/imbalanced settings.
Sensitivity and robustness
Population structure, unmodeled kinship, missing-genotype imputation and many ultra-rare variants affect validity. Near-zero or numerically unstable eigenvalues need documented handling. Report variant counts, allele frequencies, kernel and null-model diagnostics; a gene-level association does not identify which variants are causal or their effect directions.
How to use and calibrate
Fit the null generalized linear model, compute the variance-component score, and evaluate the chi-square mixture using Davies/saddlepoint or validated small sample methods.
Example application
Test a gene containing rare variants with mixed effect directions.
Interpretation and pitfalls
Watch out
Weights, covariates, ancestry and case-control imbalance affect validity. Ordinary χ² with number-of-variants df is wrong.
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=0))
"""
# 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=0))
Sources
- SKAT and SKAT O documentationsearch.r-project.org
- Wu et al. (2011) — Wu et al. (2011) · Rare-Variant Association Testing for Sequencing Data with the Sequence Kernel Association Testpmc.ncbi.nlm.nih.gov
- SKATsearch.r-project.org
- Method sourcepmc.ncbi.nlm.nih.gov
- 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 299, updated from the reference's edition 2 (reviewed 14 November 2026) as STAT299.