Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2022 Dec 30.
Published in final edited form as: Adv Neural Inf Process Syst. 2021 Dec;34:9869–9881.

A Kernel-based Test of Independence for Cluster-correlated Data

Hongjiao Liu 1, Anna M Plantinga 2, Yunhua Xiang 3, Michael C Wu 4
PMCID: PMC9801702  NIHMSID: NIHMS1860456  PMID: 36590676

Abstract

The Hilbert-Schmidt Independence Criterion (HSIC) is a powerful kernel-based statistic for assessing the generalized dependence between two multivariate variables. However, independence testing based on the HSIC is not directly possible for cluster-correlated data. Such a correlation pattern among the observations arises in many practical situations, e.g., family-based and longitudinal data, and requires proper accommodation. Therefore, we propose a novel HSIC-based independence test to evaluate the dependence between two multivariate variables based on cluster-correlated data. Using the previously proposed empirical HSIC as our test statistic, we derive its asymptotic distribution under the null hypothesis of independence between the two variables but in the presence of sample correlation. Based on both simulation studies and real data analysis, we show that, with clustered data, our approach effectively controls type I error and has a higher statistical power than competing methods.

1. Introduction

We are often interested in studying the dependence between two multivariate variables. For example, in genetic studies, we may want to assess the association between multiple genetic variants within a gene and a group of traits that likely share a common genetic mechanism [1, 2]. In microbiome studies, we may wish to investigate the association between the overall composition of human microbiota, including hundreds of microbial taxa, and multiple host metabolites from a particular metabolic pathway [3, 4]. Such multivariate analyses aggregate information across variables and are often more powerful than univariate analyses. Meanwhile, correlated observations arise in many practical situations. Family-based designs are common in genetic studies [5], where multiple family members are recruited together into the study. Longitudinal data are common in epidemiological studies [6], where variables of interest are measured on the subjects repeatedly over time. Such study designs introduce clustered dependence among the observations and require proper accommodation. In this work, we aim to develop an approach for assessing the dependence between two multivariate variables, based on cluster-correlated data.

A variety of parametric and semi-parametric methods has been proposed to study the association between one or multiple exposure variables and a multivariate longitudinal (or other cluster-correlated) outcome. These methods often extend upon existing tools for univariate longitudinal data. For example, many studies stack the multivariate outcome into a single response vector and then apply the usual methods that account for clustered data, such as generalized estimating equations (GEE) [7, 8] and random effects models [9, 10]. Such approaches generally apply to a low-dimensional setting [11] and are subject to limitations typical of parametric and semi-parametric methods. Random-effect-based methods require assumptions on the distribution of the multivariate outcome. GEE-based methods rely on good estimation of the correlation structure within clusters as well as across different outcome variables to achieve a high efficiency. Finally, both approaches assume parametric (often linear) relationships between the exposure and the outcome. Therefore, they can only evaluate a limited number of dependence patterns, and are not sufficient as independence tests.

Here we base our approach on the Hilbert-Schmidt Independence Criterion (HSIC), a non-parametric kernel-based measure for assessing the generalized dependence between two multivariate, and potentially high-dimensional, variables [12]. By mapping the two variables into reproducing kernel Hilbert spaces (RKHS’s), the population HSIC can be viewed as a measure of maximized covariance between functions in the two RKHS’s. When the RKHS’s being used are characteristic [13], the population HSIC is zero if and only if the two variables are independent. This measure makes no assumption on the distributions of the variables or the nature of the dependence.

The original HSIC-based independence test [14] applies to independent and identically distributed (i.i.d.) observations. Several extensions have been made to accommodate non-i.i.d. data, but none of the tests, to our knowledge, directly applies to clustered data at an observation level. Zhang et al. (2008) [15] extended the HSIC to certain sequence data, such as XOR sequence and Gaussian process, by specifying the correlation structure of the data as a graphical model and deriving the test statistic based on the maximal cliques. Chwialkowski et al. [16] and Wang et al. [17] developed HSIC-based tests to evaluate the dependence between two time series or random processes in general. Flaxman et al. [18] considered spatial and temporal data; they proposed to first use Gaussian process regression to remove dependence on space and time from the raw variables, and then perform the HSIC test on the resulting de-correlated residuals. However, their approach generally applies to independence testing between two univariate variables. A study with an aim closest to ours is by Rudra et al. [19]: They analyzed the association between multiple genetic variants and a multivariate longitudinal outcome. Rudra et al. concatenated the outcome measurements from different time points at the subject level, and then applied the HSIC test to the subject-level data. Although this is a straightforward approach to deal with clustered correlation, there could be a loss of statistical power by analyzing data at the subject/cluster level rather than observation level.

In this work, we present the first HSIC-based independence test for cluster-correlated data. Using the empirical HSIC [14] as our test statistic, we derive its asymptotic distribution under the null hypothesis of independence between the two variables but in the presence of clustered correlation among observations. We also examine the behavior of the test statistic under the alternative hypothesis and establish the consistency of our test. Furthermore, we provide a way to approximate the asymptotic null distribution of the test statistic and allow for statistical testing in practice. In simulation studies, our proposed test controls type I error rates well and has a much higher statistical power than competing methods across a range of scenarios. In an application to a longitudinal microbiome-metabolite data set, compared to other approaches, our proposed test identifies a larger number of metabolic pathways significantly associated with the overall microbiome composition, highlighting the value of our test in scientific studies.

The remaining sections are organized as following. In Section 2, we provide our background assumption on clustered data and an overview of the HSIC statistic. In Section 3, we study the asymptotic behavior of the HSIC statistic under null and alternative hypotheses, and construct a statistical test of independence for cluster-correlated data. In Section 4, we demonstrate the performance of our proposed test on both simulated and real data. In Section 5, we summarize our work, discuss the limitations of our proposed test and provide a conclusion.

2. Background

In this section, we introduce our assumption on cluster-correlated data and give an overview of the HSIC statistic.

2.1. General setting

Let PXY be a probability measure defined on a sample space 𝒳 × 𝒴, where both 𝒳 and 𝒴 can be multi-dimensional. Let PX and PY be the marginal distributions on 𝒳 and 𝒴, respectively. The variables X and Y are statistically independent if PXY = PXPY (equivalently, we can write X ⫫ Y).

We consider a sample of clustered data {(Xj,Yj)}j=1n drawn from PXY, where the pattern of clustered correlation is balanced and complete:

Assumption 2.1. The observations (X1, Y1), ⋯, (Xn, Yn) are identically distributed according to PXY, and can be divided into m clusters of fixed size d (i.e., n = md). In particular, the m clusters

{[(Xdi−d+1,Ydi−d+1),⋯,(Xdi,Ydi)]}i=1m

are independent from one another while having identical within-cluster correlation structure.

The specific correlation structure among the observations in each cluster can be arbitrary. We are interested in studying the dependence between X and Y based on the sample {(Xj,Yj)}j=1n.

2.2. Hilbert-Schmidt Independence Criterion

We briefly review the Hilbert-Schmidt Independence Criterion (HSIC) proposed by Gretton et al. (2005a) [12]. The HSIC measures the generalized dependence between two variables X and Y, by embedding X and Y into reproducing kernel Hilbert spaces (RKHS’s) and maximizing the covariance between functions of X and Y in the RKHS’s.

Let ℋX be an RKHS on 𝒳 with associated kernel function (i.e., inner product in the RKHS) kX:𝒳×𝒳→ℝ, and let ℋY be an RKHS on 𝒴 with associated kernel function kY:𝒴×𝒴→ℝ. Following Gretton et al. (2007) [14], the cross-covariance operator CXY : ℋY → ℋX can be defined such that, for any f ∈ ℋX and g ∈ ℋY,

〈f,CXYg〉ℋX=EXY[(f(X)−EX[f(X)])(g(Y)−EY[g(Y)])]=ℂov(f(X),g(Y)).

As shown by Gretton et al. (2005b) [20], the operator norm (i.e., the largest singular value) of CXY, defined by ‖CXY‖≔supf∈ℋX,g∈ℋY,‖f‖∞≤1,‖g‖∞≤1ℂov(f(X),g(Y)), is zero if and only if X ⫫ Y, given that the kernels kX and kY are universal (see Definition 5 of [20]). In this sense, ‖CXY‖ is a measure of independence between X and Y.

The largest singular value of CXY becomes zero when the sum of all squared singular values, denoted as the squared Hilbert-Schmidt norm [12], is zero. Therefore, the squared Hilbert-Schmidt norm of CXY, ‖CXY‖HS2, is also an independence criterion. This measure is defined as the population HSIC, which can be expressed conveniently in terms of kernel functions:

HSIC(PXY)≔‖CXY‖HS2=EXX′YY′[kX(X,X′)kY(Y,Y′)]+EXX′[kX(X,X′)]EYY′[kY(Y,Y′)]−2EXY[EX′[kX(X,X′)]EY′[kY(Y,Y′)]],

where X′ is an independent copy of X. It is obvious that, if X is independent from Y, then we have HSIC(PXY) = 0. Furthermore, for certain characteristic kX and kY [13], HSIC(PXY) = 0 if and only if X ⫫ Y. Example characteristic kernels include Gaussian kernels and Laplacian kernels [21].

To estimate the population HSIC from a sample {(Xj,Yj)}j=1n, the empirical HSIC can be used:

HSIC(Pn)≔1n2∑i,jnkX(Xi,Xj)kY(Yi,Yj)+1n4∑i,j,q,rnkX(Xi,Xj)kY(Yq,Yr)−2n3∑i,j,qnkX(Xi,Xj)kY(Yi,Yq).

Define the kernel matrices KX and KY such that the (i, j)-th element of KX is kX(Xi, Xj) and the (i, j)-th element of KY is kY(Yi, Yj). Then the empirical HSIC can also be written in terms of KX and KY:

HSIC(Pn)=1n2tr(HKXHKY),

where H=I−1n11T is a centering matrix.

Both Gretton et al. (2007) [14] and Zhang et al. (2012) [22] have derived the asymptotic distribution of HSIC(Pn) under the null hypothesis of independence between X and Y as a weighted sum of chi-square variables, when the observations are i.i.d. In Section 3, we examine the asymptotic behavior of HSIC(Pn) based on cluster-correlated observations. It turns out that the null distribution in this case is still a weighted sum of chi-square variables, where the weights are now modified.

3. HSIC for cluster-correlated data

Based on the clustered data setting in Section 2.1, we aim to test the null hypothesis H0 : X ⫫ Y using the empirical HSIC statistic. We first define some useful parameters and statistics.

Assume that the kernel matrices KX and KY defined in Section 2.2 are positive semi-definite. We focus our attention on the centered kernel matrices: K˜X≔HKXH and K˜Y≔HKYH. Let k˜X and k˜Y be the centered kernel functions1 derived from kX and kY, with associated RKHS’s ℋ˜X and ℋ˜Y, respectively. Note that the empirical HSIC can be written as HSIC(Pn)=1n2tr(K˜XK˜Y).

Let γX,r be the r-th largest eigenvalue and uX,r = (uX,r(X1), ⋯, uX,r(Xn))T be the r-th eigen-vector of K˜X. Similarly, we define the eigenvalues γY,r’s and eigenvectors uY,r’s for K˜Y. On the other hand, let λX,r be the r-th largest eigenvalue of the kernel k˜X with respect to PX, with associated eigenfunction ϕX,r(·), such that t∫k˜X(x,x′)ϕX,r(x′)dPX(x′)=λX,rϕX,r(x). Similarly, we define the eigenvalues λY,r’s and eigenfunctions ϕY,r’s for the kernel k˜Y with respect to PY.

For any fixed R∈ℕ, let k˜X,R(x,x′)≔∑r=1RλX,rϕX,r(x)ϕX,r(x′). For each r where γX,r > 0, let gX,r(x)≔nγX,r∑j=1nk˜X(x,Xj)uX,r(Xj). Define k˜Y,R and gY,r similarly. The upcoming theorems will rely on the following assumption:

Assumption 3.1. Suppose that E[k˜X2(X,X′)]<∞ and E[k˜Y2(Y,Y′)]<∞. Assume that, for each R∈ℕ, the classes 𝒞X≔{x↦(k˜X−k˜X,R)2(x,x′):x′∈𝒳} and 𝒞Y≔{y↦(k˜Y−k˜Y,R)2(y,y′):y′∈𝒴} are PX-Donsker and PY-Donsker [23], respectively. Further assume that, for each r, the functions x → gX,r(x) and y → gY,r(y) converge uniformly in probability as m → ∞, with their limit functions in L2(PX) and L2(PY), respectively.

In general, Assumption 3.1 ensures that the data-dependent eigenvalues and (elements of) eigenvectors of the kernel matrices K˜X and K˜Y converge in probability to eigenvalues and eigenfunctions of the kernels k˜X and k˜Y. We show in Appendix A.1 that the Donsker class condition in Assumption 3.1 holds for Gaussian kernels. Now we can establish the asymptotic distribution of HSIC(Pn) under H0 : X ⫫ Y based on clustered data.

Theorem 3.2. Suppose that, for two multivariate random variables X and Y, we have centered kernels k˜X and k˜Y with discrete eigenvalues. Suppose that Assumption 2.1 and Assumption 3.1 hold. Under the null hypothesis H0 : X ⫫ Y, we have

n HSIC(Pn)=1ntr(K˜XK˜Y)→d∑t=1∞ℓtzt2 as m→∞, (1)

where zt’s are i.i.d. standard normal variables, and ℓt’s are the solutions to the eigenvalue problem

ℓtψt,rs=1d∑p,q=1∞E[(∑i=1dλX,rλY,sϕX,r(Xi)ϕY,s(Yi))(∑i=1dλX,pλY,qϕX,p(Xi)ϕY,q(Yi))]ψt,pq

for some double sequence {ψt,rs}r,s=1∞∈ℝ

The proof of Theorem 3.2 is provided in Appendix B. To prove the theorem, we first show the convergence of eigenvalues and eigenvectors of K˜X and K˜Y in the presence of clustered data. We then adopt a strategy similar to that of Zhang et al. (2012) [22]: The test statistic n HSIC(Pn) can be expressed as a sum of squared terms, ∑r,s=1nQrs2, where the terms Qrs’s depend on eigenvalues and eigenvectors of the kernel matrices. We could show that Qrs’s are asymptotically jointly normal with mean zero under H0, and the asymptotic variances and covariances of these terms depend on eigenvalues and eigenfunctions of the kernels k˜X and k˜Y.

As a result, the asymptotic distribution of HSIC(Pn) under H0 is a weighted sum of chi-square variables. In particular, we require the number of clusters, m, to be sufficiently large. Knowing the null distribution of the test statistic enables us to construct a statistical test at a given significance level. To examine the power of the proposed test, we further explore the behavior of the test statistic when the null hypothesis is violated. The next theorem states the asymptotic behavior of HSIC(Pn) under the alternative hypothesis Inline graphic.

Theorem 3.3. Suppose that, for two multivariate random variables X and Y, we have centered kernels k˜X and k˜Y with discrete eigenvalues. Suppose that Assumption 2.1 and Assumption 3.1 hold. If

there exists some r,s∈ℕ such that E[ϕX,r(X)ϕY,s(Y)]≠0, (2)

then

n HSIC(Pn)=1ntr(K˜XK˜Y)→p∞ as m→∞.

When k˜X and k˜Y are characteristic kernels, Condition (2) is equivalent to Inline graphic.

Here Condition (2) is a sufficient condition for Inline graphic : If X ⫫ Y, then E[ϕX,r(X)ϕY,s(Y)]=E[ϕX,r(X)]E[ϕY,s(Y)]=0 for all r,s∈ℕ; as a contrapositive, (2) implies Inline graphic. When characteristic kernels are used, based on the definition and property of the population HSIC, we can show that Inline graphic also implies (2).

The proof of Theorem 3.3 is provided in Appendix C. To prove the theorem, we show that, under Condition (2), there exists a statistic smaller than d HSIC(Pn) that converges in probability to a positive constant, which results in n HSIC(Pn) = md HSIC(Pn) going to infinity, as the number of clusters (m) goes to infinity. When the test statistic goes to infinity, the rejection rate of the test would approach one. Hence, based on Theorem 3.3, we have established the consistency of the proposed test.

In practice, the weights ℓt’s in (1) of Theorem 3.2 are unknown and we need to estimate them with empirical counterparts. In a similar spirit to Theorem 4 of Zhang et al. (2012) [22], the following proposition provides an approximation for the asymptotic null distribution of HSIC(Pn) and allows for independence testing in clustered data.

Proposition 3.4. Assume that the conditions in Theorem 3.2 hold. To test the null hypothesis H0 : X ⫫ Y at a significance level α, we can compare the statistic n HSIC(Pn)=1ntr(K˜XK˜Y) against the (1 − α)-quantile of the distribution of

T˜=1m∑t=1n2ℓ˜tzt2,

where zt’s are i.i.d. standard normal variables and ℓ˜t‘s are eigenvalues of V˜V˜T, with V˜=[v˜1,⋯,v˜m]. Each vector v˜i is obtained by vectorizing (i.e., stacking the columns of) the n × n matrix M˜i, whose (r, s)-th entry is

M˜i,rs=1d∑j=di−d+1diγX,rγY,suX,r(Xj)uY,s(Yj).

The proof of Proposition 3.4 is provided in Appendix D, where we show that T˜ has the same asymptotic distribution as n HSIC(Pn) under H0. Note that the eigenvalues of V˜V˜T, an n2 × n2 matrix, are the same as the eigenvalues of V˜TV˜, an m × m matrix. In practice, we can calculate the eigenvalues of V˜TV˜ instead to avoid excessive computational burden.

The distribution of T˜, which is a mixture of chi-square variables, can be efficiently approximated by Davies’ exact method [24]. This method is shown to work well in previous studies [1, 25] that have statistical tests based on a mixture of chi-square distributions.

4. Experiments

In this section, we conduct simulation studies and real data analysis to demonstrate the performance of our proposed test.

4.1. Simulation studies

4.1.1. Methods

We consider a longitudinal data setting, where a set of exposure variables X∈ℝp and a set of outcome variables Y∈ℝp are measured on m subjects at 3 time points. In other words, the observations {(Xj,Yj)}j=1n are grouped into m clusters with cluster size d = 3. To introduce correlation across different time points as well as across different variables, we use a Kronecker product-based covariance structure [7], which has often been used to model multivariate longitudinal data [11].

The general simulation setting is as following. For each cluster, let xij denote the i-th variable in X measured at the j-th time point, for i = 1, ⋯, p and j = 1, 2, 3. Let yij be defined similarly. Within each cluster, we let (x11, x12, x13, ⋯, xp1, xp2, xp3)T ~ 𝒩(5×13p, ΣX), where ΣX = RX⊗Rcl, with

RX=(1ρX⋯ρXρX1⋯ρX⋮⋮⋱⋮ρXρX⋯1)p×p, Rcl=(1ρcρc2ρc1ρcρc2ρc1).

Here ⊗ is the Kronecker product. Marginally, we have imposed an exchangeable correlation structure RX across the p variables in X and an AR(1) correlation structure Rcl across the three time points. The correlations between distinct variables at different time points are products of the marginal correlations: e.g., ℂorr(x11,x22)=ρXρc.

We simulate a situation where a single exposure (say, the r-th variable in X) affects multiple outcomes, with different effect sizes on different outcomes. Within each cluster, we use the model:

(y11,y12,y13,⋯,yq1,yq2,yq3)T=(β1f(xr1),β1f(xr2),β1f(xr3),⋯,βqf(xr1),βqf(xr2),βqf(xr3))T+ϵ, (3)

where βs, with s = 1, ⋯, q, is the effect size of the chosen exposure on the s-th outcome, and ϵ ~ 𝒩(0, ΣY), with ΣY = RY ⊗ Rcl. RY is the correlation matrix for the q variables in Y. In simulations, we set p = q = 20, ρX = 0.5 and consider various levels of within-cluster correlation: ρc = 0.3, 0.5 or 0.7. We also let RY = RX.

Type I error simulation

To evaluate the type I error rate (rejection rate under H0), we let β1 = ⋯ = βq = 0, so that the null hypothesis H0 : X ⫫ Y is true. We perform both the proposed HSIC test with proper accommodation for clustered correlation (HSICcl), and the original HSIC test without any adjustment (HSICorig) as in [22] and [1]. These two methods are applied to the data {(Xj,Yj)}j=1n at the observation level. We consider m = 500, 1000 or 1500 clusters and calculate the empirical type I error rates in each setting based on 1000 simulated data sets.

From Model (3), both X and Y have multivariate normal distributions under H0. While we focus on normal data here, additional Type I error simulations based on non-normal data are considered in Appendix F.1.

Power simulation

To evaluate the power (rejection rate under H1), we randomly select one exposure variable from X to be the causal exposure, and make the first η proportion (η = 10%, 20%, 30%, 40%) of outcomes in Y depend on that exposure (with nonzero βs’s). We let the function f(x) take two forms: f(x) = x (Power Scenario 1) and f(x) = log((x − 4)2) (Power Scenario 2). For s = 1, ⋯, ηq, the effect sizes βs’s are generated from a Uniform(0, 25/m) distribution under Power Scenario 1, and from Uniform(0, 10/m) under Power Scenario 2.

In the power simulation, we perform HSICcl and two other HSIC-based competing methods. The two competing methods analyze data at the cluster/subject level. In the first method (HSICmean), for each cluster, we take an average of observations at different time points: We consider the new variables X*≔(13∑j=13x1j,⋯,13∑j=13xpj)T and Y*≔(13∑j=13y1j,⋯,13∑j=13yqj)T and then perform the original HSIC test based on {(Xi*,Yi*)}i=1m. In the second method (HSICcat), we follow the strategy of Rudra et al. [19] and concatenate the observations at different time points for each cluster: We consider the new variables X** ≔ (x11, x12, x13, ⋯, xp1, xp2, xp3)T and Y** ≔ (y11, y12, y13, ⋯, yq1, yq2, yq3)T and then perform the original HSIC test based on {(Xi**,Yi**)}i=1m.

We consider m = 500 clusters and calculate the empirical power in each setting based on 1000 simulated data sets.

Kernel choices

For both X and Y, we consider two different kernels: the Gaussian kernel kX(z1,z2)=kY(z1,z2)=exp(−‖z1−z2‖22/τ) and the linear kernel kX(z1,z2)=kY(z1,z2)=z1Tz2. For the Gaussian kernel, the shape parameter τ is chosen as the median of the Euclidean distance between each sample pair. While the Gaussian kernel is a characteristic kernel [21], the linear kernel is not characteristic and is designed to detect linear or close-to-linear relationships between X and Y. Nevertheless, linear kernels have been shown to be reasonably powerful in previous association studies [25, 2] and can be computationally efficient (see Appendix G.2).

Additional simulation studies are provided in Appendix F. Additional implementation details including computation time and code availability are provided in Appendix G.

4.1.2. Results

Table 1 shows the empirical type I error rates of HSICorig and HSICcl for normal data. The type I error rate of HSICorig is inflated in each setting, where the inflation becomes greater as the within-cluster correlation (ρc) increases. In contrast, HSICcl has a well-controlled type I error rate across all levels of within-cluster correlation. Using the linear kernel, HSICcl has type I error rates close to the nominal α in all situations. Using the Gaussian kernel, HSICcl is conservative when the number of clusters is moderate (m = 500), but its type I error rate gets close to the nominal α at a larger sample size (m = 1500). For non-normal data (Figure F1 in Appendix), the pattern is similar: HSICcl is able to control the type I error rate, either with the Gaussian kernel or with the linear kernel.

Table 1:

Empirical type I error rate of HSICorig and HSICcl at nominal level α for normal data under simulation.

α m ρ c Gaussian kernel Linear kernel
HSICorig HSICcl HSICorig HSICcl
0.05 500 0.3 0.119 0.024 0.068 0.047
0.5 0.603 0.031 0.141 0.044
0.7 1.000 0.030 0.330 0.044
1000 0.3 0.115 0.029 0.070 0.043
0.5 0.591 0.034 0.166 0.054
0.7 1.000 0.034 0.348 0.043
1500 0.3 0.113 0.047 0.082 0.053
0.5 0.608 0.043 0.145 0.053
0.7 1.000 0.044 0.352 0.052
0.01 500 0.3 0.018 0.005 0.021 0.013
0.5 0.190 0.005 0.035 0.011
0.7 0.998 0.009 0.114 0.008
1000 0.3 0.022 0.006 0.015 0.010
0.5 0.180 0.010 0.050 0.008
0.7 0.999 0.010 0.111 0.010
1500 0.3 0.027 0.007 0.019 0.010
0.5 0.209 0.008 0.047 0.010
0.7 0.999 0.008 0.117 0.009

HSICcl based on the Gaussian kernel is more conservative, likely because the Gaussian kernel is associated with a larger number of non-zero eigenvalues in finite samples than the linear kernel in our simulation setting. The null distribution for Gaussian-kernel-based HSICcl thus involves more terms in the weighted sum of chi-square variables (as the weights depend on eigenvalues), which might aggregate more finite-sample errors and make the test statistic converge slower to the asymptotic distribution.

Figure 1 shows the empirical power of HSICcl and the two competing methods under Power Scenario 1. In all situations, HSICcl has a higher power than both HSICmean and HSICcat, regardless of the level of within-cluster correlation or the kernel being used. In addition, the power of HSICcl improves quickly as a higher proportion of variables in Y is associated with X. Since X and Y are linearly associated in Scenario 1, it is not surprising that the linear kernel is powerful in detecting this dependence. The Gaussian kernel has a comparable performance as the linear kernel.

Figure 1:

Figure 1:

Empirical power of HSICcl and competing methods at nominal level α = 0.05 under Power Scenario 1. The x-axis represents the proportion of variables in Y that are associated with X. The top row shows results based on the Gaussian kernel, and the bottom row shows results based on the linear kernel.

Figure 2 shows the empirical power under Power Scenario 2, where X and Y have a non-linear relationship. Similar to Power Scenario 1, for both the Gaussian kernel and the linear kernel, HSICcl achieves a higher power than the competing methods under all levels of within-cluster correlation. When compared between kernels, HSICcl based on the Gaussian kernel is more powerful than HSICcl based on the linear kernel in each setting, showing the advantage of the Gaussian kernel as a characteristic kernel to detect general dependence patterns.

Figure 2:

Figure 2:

Empirical power of HSICcl and competing methods at nominal level α = 0.05 under Power Scenario 2. The x-axis represents the proportion of variables in Y that are associated with X. The top row shows results based on the Gaussian kernel, and the bottom row shows results based on the linear kernel.

Overall, both Power Scenario 1 and 2 show the considerable power gain of HSICcl over analyzing data at the cluster level. We also note that, the power gain of HSICcl decreases as the within-cluster correlation increases. This is expected since there will be less pronounced information loss in averaging or concatenating the data at the cluster level if observations within a cluster are highly correlated.

While the above results are based on a fixed cluster size, we have also investigated the effect of cluster size on the performance of HSICcl (Appendix F.2). When the number of clusters (m) and the level of within-cluster correlation (ρc) are fixed, type I error control is similar for different cluster sizes (Figure F2–F3), suggesting that the convergence speed of the test statistic under H0 is likely not affected by cluster size. However, a larger cluster size tends to result in a higher statistical power (Figure F4), possibly due to an increase in the overall sample size, which allows for additional information gain.

4.2. Application to real data

The vaginal microbiota plays an important role in maintaining vaginal homeostasis. Common vaginal conditions, such as bacterial vaginosis, are characterized by shifts in vaginal microbiome composition and changes in vaginal metabolites [4, 26]. Studying the association between the microbiome and the metabolites helps us better understand how the vaginal microbiota contributes to the host metabolic environment, and identifies potential metabolic biomarkers for vaginal conditions [4]. Here we apply HSICcl and competing methods to test the dependence between the overall vaginal microbiome composition and different metabolic pathways, using data from the Menopause Strategies: Finding Lasting Answers for Symptoms and Health (MsFLASH) Vaginal Health Trial [27].

The MsFLASH trial was a 12-week randomized clinical trial to evaluate the treatment effect of vaginal estradiol vs. placebo on vaginal discomfort in postmenopausal women [27] (see Appendix H.1 for more details). As part of an effort to investigate the mechanism of postmenopausal vaginal discomfort, vaginal microbiota and vaginal fluid metabolites were characterized longitudinally and available in 141 participants at baseline, 4 and 12 weeks [28]. The vaginal microbiome profiles included abundance data of 381 taxa. The metabolome profiles included abundance data of 171 metabolites, which were grouped into 95 metabolic pathways. We apply HSICcl, HSICmean and HSICcat to assess the dependence between the overall vaginal microbiome composition and the metabolites in each pathway, across all 95 pathways. In other words, for each test, we have m = 141, d = 3, X∈ℝ381 and Y∈ℝq, where q is the number of metabolites in a pathway, ranging from 1 to 21 in this data set; 95 tests are performed in total.

Table 2 shows the number of metabolic pathways identified to be associated with the vaginal microbiome composition, at a Bonferroni-corrected significance level α = 0.05/95 = 5.3 × 10−4. Due to the close relationship between vaginal microbiota and vaginal metabolites, all methods have identified a considerable number of significant metabolic pathways. Still, HSICcl identifies a larger number of pathways than HSICmean and HSICcat, either with the Gaussian kernel or with the linear kernel. In particular, based on the Gaussian kernel, HSICcl successfully identifies all the significant pathways discovered by HSICmean and HSICcat, and discovers 4 (7) additional pathways compared to HSICcat (HSICmean) (Figure H1). 67 out of 68 pathways discovered by HSICcl using the linear kernel are also identified by HSICcl using the Gaussian kernel (Figure H2). For this data set, the Gaussian kernel appears to be more powerful in detecting dependence than the linear kernel, indicating a possibly non-linear relationship between certain metabolites and microbial taxa abundances.

Table 2:

Number of metabolic pathways identified to be associated with the vaginal microbiome composition based on the MsFLASH data set (α = 5.3 × 10−4).

Kernel HSICmean HSICcat HSICcl
Gaussian 68 71 75
Linear 64 64 68

We focus on some of the top pathways (with high statistical significance) identified using HSICcl and highlight their biological relevance. The top pathways include multiple metabolic pathways for amino acids. The human vaginal microbiota is dominated by bacteria in the Lactobacillus genus [29], which are known to produce branched-chain amino acids including valine, leucine and isoleucine [30]. All these amino acids are present in our top pathways. In particular, one pathway related to leucine metabolism is only identified by HSICcl but not by HSICmean or HSICcat. Therefore, our finding is consistent with previous studies on bacterial metabolism, confirming the power improvement in using HSICcl for scientific discovery.

5. Discussion

We have introduced a novel kernel-based approach, HSICcl, to evaluate the generalized dependence between two multivariate variables based on cluster-correlated data. Using the previously developed HSIC statistic as our test statistic, we have derived its asymptotic null distribution in the presence of clustered correlation and constructed a statistical test of independence accordingly. We have also established the consistency of the proposed test. Both simulation studies and application to real longitudinal data demonstrate the power gain in using our proposed test, compared to methods based on measurements averaged or concatenated at the cluster level.

One limitation of our framework is that the proposed test only applies to balanced and complete clustered data, which might not be always available in practice. In longitudinal studies, for example, subjects might be followed at different time points from one another (resulting in unbalanced data), or become lost to follow-up (resulting in incomplete data). For incomplete data, one solution is to impute the missing data before applying HSICcl. Further extension of the test for unbalanced or incomplete clustered data will be interesting for future study.

Another limitation is that our proposed test relies on asymptotic results, and the null distribution might not be accurately approximated when the number of clusters is small, which is likely true of many family-based or longitudinal studies. Permutation-based approaches could be a surrogate for HSICcl at small sample sizes (see Appendix F.3), although their computational burden is large compared to HSICcl (see Table G1). Computationally efficient adaptations of HSICcl to small sample sizes, such as those proposed by Lee et al. [31] and Zhan et al. [32], would be another useful extension.

With the continuing emergence of high-dimensional data and the prevalence of cluster-correlated data in different scientific fields, our proposed test is a promising approach to discover novel associations and bring new scientific insights in these settings. Meanwhile, we need to be cautious about potential risks to society that might result from misuse or misinterpretation of our proposed test. For example, confounding is an important factor to consider in genetic and epidemiological studies. A confounder affects both the exposure and the outcome, and could lead to spurious associations between the two variables even if the variables themselves do not have causal relationships. Therefore, as one applies our proposed test to evaluate the association between two variables, it is important to consider the presence of potential confounders and be careful in interpreting the test results. Mistaking certain observed correlation for causation could lead to misinformation in the scientific community and would be especially concerning when the studies being conducted directly influence people’s life.

Supplementary Material

Supplemental

Acknowledgments and Disclosure of Funding

This work is supported by the National Institutes of Health grant R01-GM129512. The MsFLASH data were provided by the Fred Hutchinson Cancer Research Center (MsFLASH Network), which is supported by the National Institute on Aging grant 5R01-AG048209. We would like to thank the anonymous reviewers for their helpful feedback.

Footnotes

The authors declare no competing interests.

1

For the kernel function kX, the corresponding centered kernel function k˜X is: k˜X(x,x′)=kX(x,x′)−EX[kX(X,x′)]−EX′[kX(x,X′)]+EXX′[kX(X,X′)].

Contributor Information

Hongjiao Liu, Department of Biostatistics, University of Washington.

Anna M. Plantinga, Department of Mathematics and Statistics, Williams College

Yunhua Xiang, Department of Biostatistics, University of Washington.

Michael C. Wu, Public Health Sciences Division, Fred Hutchinson Cancer Research Center

References

  • [1].Broadaway K Alaine, Cutler David J, Duncan Richard, Moore Jacob L, Ware Erin B, Jhun Min A, Bielak Lawrence F, Zhao Wei, Smith Jennifer A, Peyser Patricia A, et al. A statistical approach for testing cross-phenotype effects of rare variants. The American Journal of Human Genetics, 98(3):525–540, 2016. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [2].Zhan Xiang, Zhao Ni, Plantinga Anna, Thornton Timothy A, Conneely Karen N, Epstein Michael P, and Wu Michael C. Powerful genetic association analysis for common or rare variants with high-dimensional structured traits. Genetics, 206(4):1779–1790, 2017. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [3].Visconti Alessia, Le Roy Caroline I, Rosa Fabio, Rossi Niccolò, Martin Tiphaine C, Mohney Robert P, Li Weizhong, de Rinaldis Emanuele, Bell Jordana T, Venter J Craig, et al. Interplay between the human gut microbiome and host metabolism. Nature Communications, 10(1):1–10, 2019. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [4].McMillan Amy, Rulisa Stephen, Sumarah Mark, Macklaim Jean M, Renaud Justin, Bisanz Jordan E, Gloor Gregory B, and Reid Gregor. A multi-platform metabolomics approach identifies highly specific biomarkers of bacterial diversity in the vagina of pregnant and non-pregnant women. Scientific Reports, 5(1):1–14, 2015. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [5].Ott Jurg, Kamatani Yoichiro, and Lathrop Mark. Family-based designs for genome-wide association studies. Nature Reviews Genetics, 12(7):465–474, 2011. [DOI] [PubMed] [Google Scholar]
  • [6].Twisk Jos WR. Applied longitudinal data analysis for epidemiology: a practical guide. Cambridge University Press, 2013. [Google Scholar]
  • [7].Galecki Andrzej T. General class of covariance structures for two or more repeated factors in longitudinal data analysis. Communications in Statistics-Theory and Methods, 23(11):3105–3119, 1994. [Google Scholar]
  • [8].O’Brien Liam M and Fitzmaurice Garrett M. Analysis of longitudinal multiple-source binary data using generalized estimating equations. Journal of the Royal Statistical Society: Series C (Applied Statistics), 53(1):177–193, 2004. [Google Scholar]
  • [9].Reinsel Gregory. Estimation and prediction in a multivariate random effects generalized linear model. Journal of the American Statistical Association, 79(386):406–414, 1984. [Google Scholar]
  • [10].Beckett Laurel A, Tancredi Daniel J, and Wilson RS. Multivariate longitudinal models for complex change processes. Statistics in Medicine, 23(2):231–239, 2004. [DOI] [PubMed] [Google Scholar]
  • [11].Verbeke Geert, Fieuws Steffen, Molenberghs Geert, and Davidian Marie. The analysis of multivariate longitudinal data: a review. Statistical Methods in Medical Research, 23(1):42–59, 2014. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [12].Gretton Arthur, Bousquet Olivier, Smola Alex, and Schölkopf Bernhard. Measuring statistical dependence with hilbert-schmidt norms. In International Conference on Algorithmic Learning Theory, pages 63–77. Springer, 2005a. [Google Scholar]
  • [13].Sriperumbudur Bharath K, Gretton Arthur, Fukumizu Kenji, Schölkopf Bernhard, and Lanckriet Gert RG. Hilbert space embeddings and metrics on probability measures. The Journal of Machine Learning Research, 11:1517–1561, 2010. [Google Scholar]
  • [14].Gretton Arthur, Fukumizu Kenji, Teo Choon Hui, Song Le, Schölkopf Bernhard, Smola Alexander J, et al. A kernel statistical test of independence. In NIPS, volume 20, pages 585–592. Citeseer, 2007. [Google Scholar]
  • [15].Zhang Xinhua, Song Le, Gretton Arthur, Smola Alexander J, et al. Kernel measures of independence for non-iid data. In NIPS, volume 22, pages 1937–1944, 2008. [Google Scholar]
  • [16].Chwialkowski Kacper and Gretton Arthur. A kernel independence test for random processes. In International Conference on Machine Learning, pages 1422–1430. PMLR, 2014. [Google Scholar]
  • [17].Wang Guochang, Li Wai Keung, and Zhu Ke. New HSIC-based tests for independence between two stationary multivariate time series. arXiv preprint arXiv:1804.09866, 2018. [Google Scholar]
  • [18].Flaxman Seth R, Neill Daniel B, and Smola Alexander J. Gaussian processes for independence tests with non-iid data in causal inference. ACM Transactions on Intelligent Systems and Technology (TIST), 7(2):1–23, 2015. [Google Scholar]
  • [19].Rudra Pratyaydipta, Broadaway K Alaine, Ware Erin B, Jhun Min A, Bielak Lawrence F, Zhao Wei, Smith Jennifer A, Peyser Patricia A, Kardia Sharon LR, Epstein Michael P, et al. Testing cross-phenotype effects of rare variants in longitudinal studies of complex traits. Genetic Epidemiology, 42(4):320–332, 2018. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [20].Gretton Arthur, Herbrich Ralf, Smola Alexander, Bousquet Olivier, Schölkopf Bernhard, et al. Kernel methods for measuring independence. The Journal of Machine Learning Research, 6:2075–2129, 2005b. [Google Scholar]
  • [21].Fukumizu Kenji, Gretton Arthur, Sun Xiaohai, and Schölkopf Bernhard. Kernel measures of conditional dependence. In NIPS, volume 20, pages 489–496, 2007. [Google Scholar]
  • [22].Zhang Kun, Peters Jonas, Janzing Dominik, and Schölkopf Bernhard. Kernel-based conditional independence test and application in causal discovery. In Proceedings of the Twenty-Seventh Conference on Uncertainty in Artificial Intelligence, UAI’11, page 804–813, Arlington, Virginia, USA, 2011. AUAI Press. [Google Scholar]
  • [23].Van der Vaart Aad W. Asymptotic statistics. Cambridge University Press, 1998. [Google Scholar]
  • [24].Davies Robert B. The distribution of a linear combination of χ2 random variables. Journal of the Royal Statistical Society: Series C (Applied Statistics), 29(3):323–333, 1980. [Google Scholar]
  • [25].Wu Michael C, Lee Seunggeun, Cai Tianxi, Li Yun, Boehnke Michael, and Lin Xihong. Rare-variant association testing for sequencing data with the sequence kernel association test. The American Journal of Human Genetics, 89(1):82–93, 2011. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [26].Srinivasan Sujatha, Morgan Martin T, Fiedler Tina L, Djukovic Danijel, Hoffman Noah G, Raftery Daniel, Marrazzo Jeanne M, and Fredricks David N. Metabolic signatures of bacterial vaginosis. MBio, 6(2), 2015. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [27].Mitchell Caroline M, Reed Susan D, Diem Susan, Larson Joseph C, Newton Katherine M, Ensrud Kristine E, LaCroix Andrea Z, Caan Bette, and Guthrie Katherine A. Efficacy of vaginal estradiol or vaginal moisturizer vs placebo for treating postmenopausal vulvovaginal symptoms: a randomized clinical trial. JAMA Internal Medicine, 178(5):681–690, 2018. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [28].Mitchell Caroline M, Ma Nanxun, Mitchell Alissa J, Wu Michael C, Valint DJ, Proll Sean, Reed Susan D, Guthrie Katherine A, Lacroix Andrea Z, Larson Joseph C, et al. Association between postmenopausal vulvovaginal discomfort, vaginal microbiota, and mucosal inflammation. American Journal of Obstetrics and Gynecology, 2021. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [29].Witkin Steven S and Linhares Iara M. Why do lactobacilli dominate the human vaginal microbiota? BJOG: An International Journal of Obstetrics & Gynaecology, 124(4):606–611, 2017. [DOI] [PubMed] [Google Scholar]
  • [30].Ceccarani Camilla, Foschi Claudio, Parolin Carola, D’Antuono Antonietta, Gaspari Valeria, Consolandi Clarissa, Laghi Luca, Camboni Tania, Vitali Beatrice, Severgnini Marco, et al. Diversity of vaginal microbiome and metabolome during genital infections. Scientific Reports, 9(1):1–12, 2019. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [31].Lee Seunggeun, Emond Mary J, Bamshad Michael J, Barnes Kathleen C, Rieder Mark J, Nickerson Deborah A, ESP Lung Project Team, Christiani David C, Wurfel Mark M, Lin Xihong, et al. Optimal unified approach for rare-variant association testing with application to small-sample case-control whole-exome sequencing studies. The American Journal of Human Genetics, 91(2):224–237, 2012. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • [32].Zhan Xiang, Plantinga Anna, Zhao Ni, and Wu Michael C. A fast small-sample kernel independence test for microbiome community-level association analysis. Biometrics, 73(4):1453–1463, 2017. [DOI] [PMC free article] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Supplemental

RESOURCES