Tutorials › Statistical Genetics › The SKAT Statistic as a Weighted Genotype Kernel

Kernel Tests and SKAT Methods · Tutorial 440 of 989

The SKAT Statistic as a Weighted Genotype Kernel

Learn how SKAT’s weighted score squares become a kernel matrix that compares individuals through their genotype profiles.

Advanced 10 min read

What You'll Learn

  • Define the genotype matrix, score vector, variant-weight matrix, and SKAT quadratic statistic
  • Derive the identity between the variant-score and individual-kernel forms
  • Compute weighted genotype similarities and a kernel matrix from hypothetical data
  • Interpret the kernel as a weighted inner product, including the effect of genotype coding
  • Recognize why nonnegative variant weights make the kernel positive semidefinite
  • Avoid confusing genotype similarity with phenotype similarity or causal evidence

From Variant Scores to Individual Similarities

SKAT is often introduced through a score for each variant: each score measures how strongly that variant’s genotype pattern aligns with the outcome residuals under the null model. The SKAT statistic combines these scores by squaring and weighting them. That construction has an equivalent interpretation: it measures how the residuals align with a matrix of weighted genetic similarities among individuals.

The equivalence is useful because it changes the viewpoint without changing the statistic. In the variant view, the calculation aggregates evidence across genotype columns. In the individual view, it compares pairs of genotype profiles. The kernel matrix makes that second view explicit.

Definition: Let \(n\) denote the number of individuals and \(m\) the number of variants. Let \(G\) be the \(n \times m\) genotype matrix, with entry \(G_{ij}\) the coded genotype for individual \(i\) at variant \(j\). Let \(r\) be the \(n\)-vector of outcome residuals used in the SKAT score under the null model. For nonnegative variant weights \(w_1,\ldots,w_m\), define \(W=\operatorname{diag}(w_1,\ldots,w_m)\), the variant-score vector \(U=G^{T}r\), and the SKAT statistic \(Q=U^{T}WU\). The corresponding individual-level kernel is \(K=GWG^{T}\).

For an additive genotype coding, \(G_{ij}\) is commonly a dosage from 0 to 2, representing the number of copies of a specified allele. Other codings are possible, but the coding must be fixed and interpreted consistently. In a binary-trait analysis, \(r\) is based on the difference between each observed outcome and its null-model expectation. More generally, \(r\) denotes the residual vector entering the score. Examples below use hypothetical residuals and focus on the algebra, not on fitting a null model.

The weights in \(W\) are multipliers in the statistic: variant \(j\)'s score contributes \(w_j U_j^2\). They must be nonnegative for the usual kernel interpretation below. Different conventions may define a weight before it is squared or transformed; the \(w_j\) here always mean the final nonnegative multiplier in \(Q\).

The Kernel Matrix as Weighted Genotype Similarity

Write the genotype profile of individual \(i\) as the row vector \(G_i=(G_{i1},\ldots,G_{im})\). The \(i,k\) entry of \(K\) is

$$ K_{ik}=\sum_{j=1}^{m}w_jG_{ij}G_{kj}. $$

Thus, \(K_{ik}\) is a weighted inner product of two individuals’ genotype profiles. Equivalently, form a weighted profile \(z_i=(\sqrt{w_1}G_{i1},\ldots,\sqrt{w_m}G_{im})\); then \(K_{ik}=z_i^{T}z_k\). A variant with a larger weight contributes more to the similarity, while a variant with weight zero contributes nothing.

With uncentered genotype dosages, this is an uncentered inner product: it is not automatically a correlation or a distance. Individuals can have a positive kernel entry because they share nonzero dosages at weighted variants. Centering genotype columns before constructing the kernel instead measures inner products of deviations from the column centers. That is a different kernel construction, so the choice must be stated rather than silently assumed.

Why the Two Forms of the Statistic Are Equal

The variant-score form and the individual-kernel form are two matrix expressions for the same quantity. The identity follows directly from substituting \(U=G^{T}r\) and regrouping the products.

$$ \begin{aligned} Q &=U^{T}WU\\ &=(G^{T}r)^{T}W(G^{T}r)\\ &=r^{T}GWG^{T}r\\ &=r^{T}Kr\\ &=\sum_{i=1}^{n}\sum_{k=1}^{n}r_i r_k K_{ik}. \end{aligned} $$

The last expression shows how the statistic combines residuals across individuals, weighted by their genotype similarities. The contributions are not all necessarily positive: if \(r_i\) and \(r_k\) have opposite signs, their product is negative. It is the complete quadratic form, not each pairwise term separately, that equals the nonnegative sum of weighted squared variant scores.

Justification: Since \(W\) is diagonal, \(U^{T}WU=\sum_{j=1}^{m}w_jU_j^2\), which is nonnegative when every \(w_j\geq 0\). For any \(n\)-vector \(a\), \(a^{T}Ka=a^{T}GWG^{T}a=\sum_{j=1}^{m}w_j(G_j^{T}a)^2\geq 0\), where \(G_j\) is column \(j\) of \(G\). Therefore \(K\) is positive semidefinite. This property follows from the construction and does not require the columns to be independent.

Worked Example: Computing the Statistic in Both Forms

Suppose three hypothetical individuals have genotype matrix \(G\), residual vector \(r\), and weights \(w_1,w_2\) as follows. The residuals are in arbitrary outcome units.

$$ G= \begin{pmatrix} 1&0\\ 0&1\\ 1&1 \end{pmatrix}, \qquad r= \begin{pmatrix} 1\\-1\\0.5 \end{pmatrix}, \qquad W= \begin{pmatrix} 2&0\\ 0&0.5 \end{pmatrix}. $$

First calculate the variant scores: \(U_1=1(1)+0(-1)+1(0.5)=1.5\), and \(U_2=0(1)+1(-1)+1(0.5)=-0.5\). Thus,

$$ Q=2(1.5)^2+0.5(-0.5)^2=4.5+0.125=4.625. $$

Now calculate the individual kernel. Each entry is a weighted genotype inner product, giving

$$ K=GWG^{T}= \begin{pmatrix} 2&0&2\\ 0&0.5&0.5\\ 2&0.5&2.5 \end{pmatrix}. $$

Multiplication gives \(Kr=(3,-0.25,2.75)^{T}\), so \(r^{T}Kr=1(3)+(-1)(-0.25)+0.5(2.75)=4.625\). Both routes give the same statistic. The numerical agreement is an algebraic identity, not an approximation.

Reading the Kernel Through Individuals

The diagonal entry \(K_{ii}\) is the weighted squared length of individual \(i\)'s genotype profile. An off-diagonal entry \(K_{ik}\) is the weighted overlap between individuals \(i\) and \(k\). These entries describe genotype relationships under the chosen coding and weights; they do not describe similarity of outcomes.

The kernel also makes clear why SKAT uses squared variant scores. Each variant contributes its own squared alignment with the residual vector, and the weights scale those contributions before they are added. In the individual representation, those same contributions are assembled into \(K\), and the residual vector is evaluated against that matrix. This is a change in representation, not a different test.

Worked Example: Building a Kernel From Genotype Profiles

Consider three hypothetical individuals typed at two variants. Use dosages as shown and weights \(w_1=1\) and \(w_2=0.25\).

$$ G= \begin{pmatrix} 0&1\\ 1&1\\ 2&0 \end{pmatrix}, \qquad W= \begin{pmatrix} 1&0\\ 0&0.25 \end{pmatrix}. $$

For individuals 1 and 2, the weighted similarity is \(K_{12}=0(1)(1)+0.25(1)(1)=0.25\). For individuals 2 and 3, it is \(K_{23}=1(1)(2)+0.25(1)(0)=2\). The complete matrix is

$$ K= \begin{pmatrix} 0.25&0.25&0\\ 0.25&1.25&2\\ 0&2&4 \end{pmatrix}. $$

For example, individual 3 has \(K_{33}=1(2^2)+0.25(0^2)=4\). Individuals 1 and 3 have zero weighted inner product because they do not both carry a nonzero dosage at either weighted variant. These statements concern the specified dosage coding and weights; they do not imply that the individuals are globally similar or dissimilar in every genetic respect.

Worked Example: Verifying the Kernel Quadratic Form

Use the genotype matrix and weights from the preceding example, and suppose the hypothetical residuals are \(r=(1,0,-1)^{T}\). The variant scores are \(U_1=0(1)+1(0)+2(-1)=-2\) and \(U_2=1(1)+1(0)+0(-1)=1\). Therefore

$$ Q=1(-2)^2+0.25(1)^2=4.25. $$

In the kernel form, \(Kr=(0.25,-1.75,-4)^{T}\), and hence \(r^{T}Kr=1(0.25)+0(-1.75)+(-1)(-4)=4.25\). The two diagonal contributions are \(K_{11}+K_{33}=0.25+4\); the cross-term is zero because \(K_{13}=0\). The example verifies the same identity using a residual vector with a negative component.

What the Kernel View Does—and Does Not—Establish

The kernel view matters because it connects a variant-based score statistic to a structured comparison among individuals. It can make the role of weights and genotype coding easier to inspect, and it provides the matrix used in the quadratic-form representation. The statistic can be computed either from the variant scores or from \(r^{T}Kr\); the preferable calculation depends on the data dimensions and implementation.

The algebra alone does not determine a p-value. Inferential calibration depends on the null model and its assumptions, including how the residuals and their dependence are handled. Nor does a large statistic identify a particular causal variant: \(Q\) aggregates contributions across the weighted genotype columns. The null distribution and p-value calculations require separate treatment.

Common Mistake

  • Wrong reasoning: “Because \(K_{ik}\) is a similarity, every term \(r_i r_k K_{ik}\) must be positive, so the statistic is just a sum of positive pairwise similarities.”
  • Correction: The residual product \(r_i r_k\) can be negative, so individual pairwise terms can be negative. The complete quadratic form is nonnegative because it equals \(\sum_j w_j U_j^2\) when the weights are nonnegative.
  • Another pitfall: Calling \(K_{ik}\) a phenotype similarity or interpreting it as a correlation. It is a weighted genotype inner product under the chosen coding; it is not generally normalized, centered, or bounded between \(-1\) and \(1\).
Key takeaway: With \(U=G^{T}r\), nonnegative diagonal weights \(W\), and \(K=GWG^{T}\), the SKAT statistic has equivalent forms \(Q=U^{T}WU=r^{T}Kr\). The kernel entry \(K_{ik}\) is the weighted inner product of individuals \(i\) and \(k\)'s genotype profiles.

Check Your Understanding

Use the definitions and identities above to answer these questions.

  1. For \(m\) variants, what does the score \(U_j\) represent in terms of genotype column \(G_j\) and residual vector \(r\)?
  2. Write the expression for \(K_{ik}\) using the genotype entries and variant weights. What kind of quantity does it measure?
  3. Why does \(w_j\geq 0\) for every variant imply that \(K\) is positive semidefinite?
  4. Can an individual pair’s contribution \(r_i r_k K_{ik}\) be negative even when \(K\) is positive semidefinite? Explain.
  5. What changes if genotype columns are centered before forming \(K\), and why should that choice be stated?
Clinical Biostats