Skip to content

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.

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 = 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)

300
10
0.50
0.80
0.50

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.000−0.5224.000
2.000−1.4940.000
3.0000.5800.000
4.000−1.5311.000
5.0001.1630.000
6.000−0.7270.000
7.000−1.4451.000
8.000−0.2690.000
9.000−1.1231.000
10.000−1.3500.000
11.000−0.9671.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

Q = 42281.20
  1. 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).
  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

Q=12∑jwj2(∑iGij yi−μ^iσ^)2 ∼ ∑kλkχ1,k2 under H0Q=\tfrac12\sum_jw_j^2\Big(\sum_iG_{ij}\,\frac{y_i-\hat\mu_i}{\hat\sigma}\Big)^2\ \sim\ \sum_k\lambda_k\chi^2_{1,k}\ \text{under }H_0

With your numbers

Q=42281.2,10 variants,λ1=2051.9 (of 10)Q = 42281.2,\quad 10\text{ variants},\quad \lambda_1 = 2051.9\ (\text{of } 10)
wj=Beta(MAFj;1,25)w_j=\mathrm{Beta}(\mathrm{MAF}_j;1,25)
weights that favor the rarest variants
λk\lambda_k
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 H0.

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

Q=(y−μ^0)TK(y−μ^0)K=GW2GTQ∼H0∑jλjχ1,j2\begin{gathered}Q=(y-\widehat\mu_0)^TK(y-\widehat\mu_0)\\[5pt] K=GW^2G^T\\[5pt] Q\overset{H_0}{\sim}\sum_j\lambda_j\chi^2_{1,j}\end{gathered}

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.

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=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()
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=0))

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 299, updated from the reference's edition 2 (reviewed 14 November 2026) as STAT299.