Functional principal variance component testing for a genetic association study of HIV progression

HIV-1C is the most prevalent subtype of HIV-1 and accounts for over half of HIV-1 infections worldwide. Host genetic influence of HIV infection has been previously studied in HIV-1B, but little attention has been paid to the more prevalent subtype C. To understand the role of host genetics in HIV-1C disease progression, we perform a study to assess the association between longitudinally collected measures of disease and more than 100,000 genetic markers located on chromosome 6. The most common approach to analyzing longitudinal data in this context is linear mixed effects models, which may be overly simplistic in this case. On the other hand, existing non-parametric methods may suffer from low power due to high degrees of freedom (DF) and may be computationally infeasible at the large scale. We propose a functional principal variance component (FPVC) testing framework which captures the nonlinearity in the CD4 and viral load with potentially low DF and is fast enough to carry out thousands or millions of times. The FPVC testing unfolds in two stages. In the first stage, we summarize the markers of disease progression according to their major patterns of variation via functional principal components analysis (FPCA). In the second stage, we employ a simple working model and variance component testing to examine the association between the summaries of disease progression and a set of single nucleotide polymorphisms. We supplement this analysis with simulation results which indicate that FPVC testing can offer large power gains over the standard linear mixed effects model.

HIV-1C is the most prevalent subtype of HIV-1 and accounts for over half of HIV-1 infections worldwide. Host genetic influence of HIV infection has been previously studied in HIV-1B, but little attention has been paid to the more prevalent subtype C. To understand the role of host genetics in HIV-1C disease progression, we perform a study to assess the association between longitudinally collected measures of disease and more than 100,000 genetic markers located on chromosome 6. The most common approach to analyzing longitudinal data in this context is linear mixed effects models, which may be overly simplistic in this case. On the other hand, existing non-parametric methods may suffer from low power due to high degrees of freedom (DF) and may be computationally infeasible at the large scale. We propose a functional principal variance component (FPVC) testing framework which captures the nonlinearity in the CD4 and viral load with potentially low DF and is fast enough to carry out thousands or millions of times. The FPVC testing unfolds in two stages. In the first stage, we summarize the markers of disease progression according to their major patterns of variation via functional principal components analysis (FPCA). In the second stage, we employ a simple working model and variance component testing to examine the association between the summaries of disease progression and a set of single nucleotide polymorphisms. We supplement this analysis with simulation results which indicate that FPVC testing can offer large power gains over the standard linear mixed effects model.

1.
Introduction. An important goal of large-scale genomic association studies is to explore susceptibility to complex diseases. These studies have led to identification of many genomic regions as putatively harboring disease susceptibility alleles for a wide range of disorders. For patients with a particular disease, association studies have also been performed to identify genetic variants associated with progression of disease. The disease progression is often monitored by longitudinally measured biological markers. Such longitudinal measures allow researchers to more clearly characterize clinical outcomes that cannot necessarily be captured in one or even a few measurements.
We are motivated by a large-scale association study of HIV-1 Subtype-C (HIV-1C) progression in sub-Saharan African individuals. HIV-1C is the most prevalent subtype of HIV-1 and accounts for over half of HIV-1 infections worldwide [11]. Sub-Saharan Africa, where HIV-1C dominates, was home to an estimated 69% of people living with HIV in 2012 [29]. While a number of human leukoucyte antigen (HLA) alleles [10, 30, 19, e.g.] and other loci have been identified to be associated with AIDS progression in European males infected by HIV-1B [10,22], comparatively little research has focused on host genetic influence in this African population and subtype.
In this study, we seek to relate the longitudinal progression of these two markers -log 10 CD4 (lCD4) count and log 10 viral load (lVL) -to a set of approximately 100,000 single nucleotide polymorphisms (SNPs) located on chromosome 6 in two independent cohorts of treatment-naive individuals in Botswana. We focus on chromosome 6 because it houses the HLA region of genes, which are known to impact immune function. Throughout this paper, we will use y = (y 1 , ..., y r ) T to denote the longitudinal outcome (in the context of this study, either lCD4 or lVL), measured at times t = (t 1 , ..., t r ) T . We will furthermore let a set of genetic markers of interest be denoted z and any potential covariates be x.
The most common approach to analyzing longitudinal data of this kind is to use linear mixed effects (LME) models [16], which relate y linearly to z, x, and t with both fixed and random effects. However, both in the case of HIV progression measured by lCD4 and lVL and in general, such a linear relationship is likely to be overly simplistic. To incorporate nonlinear trajectories, many generalizations of LMEs have been proposed. Typically, methods assume that y is a noisy realization of a smooth underlying function Y (·). These include nonlinear or nonparametric LMEs using a fixed spline basis expansion [18,25,12] for t and adjusting for z. Functional regression methods have been proposed for densely sampled trajectories [6] for a single z as well as for irreguarly spaced longitudinal data where z is also allowed to change over time [33]. In these methods, estimation proceeds via kernel smoothing for both the population mean function and the covariance process of Y (·). [15] proposed an iterative procedure for fitting functional regression models which accounts for within-subject covariance but does not estimate random effects. Similarly, [23] proposed a ridge-based estimator for the case when y is measured on a common, fine grid of points for all subjects, but requires z to be univariate and also ignores random effects. In a similarly dense setting [20] proposed wavelet-based mixed effects models, and inference procedures for the random effects were developed in [2].
While some of these methods can be adapted to test for association, none of them are appealing for our study for the following reasons. First, some require restrictive assumptions about the density of measurements [20, e,g] which are clearly not met here. Further, all of these methods were developed with estimation and regression in mind. While many of them could in principle be used to derive testing procedures, the validity of their inference procedures often rely on the model assumptions on the distribution of y given the SNPs and the covariates. Under model mis-specification, the resulting test may fail to maintain type I error. Additionally, these procedures would require fitting a complex iterative or smoothing-based model thousands or millions of times for genome-wide studies and hence become computationally infeasible. We, on the other hand, propose a novel testing procedure which is valid regardless of the true distribution of y, is fast to fit and has a simple limiting distribution, despite the fact that we account for nonlinearity in y in a manner akin to previous functional regression methods. To do this, we first capture the nonlinearity in y using functional principal components analysis (FPCA) [5,24,32,13,15], Using a eigenfunction decomposition of the smoothed covariance function of Y (·), we approximate each patient's Y (·) by a weighted average of the estimated eigenfunctions, with weights corresponding to functional principal component loadings or scores. Then borrowing a variance component test framework and using these scores as pseudo outcomes, we construct a Functional Principal Variance Component (FPVC) test that can capture the nonlinear trajectories without requiring a normality assumption or fitting individual functional regression models. The test statistics can be approximated by a mixture of chi-square and the small number of eigenfunctions needed to approximate the trajectories can result in a low degree of freedom in the resulting test statistic.
Since the data of interest is sampled at irregular time intervals, we use the best linear unbiased predictor (BLUP) to estimate the scores. The BLUP was also the basis for FPCA with sparse longitudinal data in the principal analysis via conditional expectation (PACE) method [32] under a normality assumption. Here, we use BLUP to motivate our testing procedure but do not require normality for the validity of the FPVC test. The test statistic can be derived through the variance component testing framework and viewed as a summary measure of the overall covariance between the estimated subject-specific scores, which characterize the person's trajectory, and the genetic markers. Similar variance component tests have previously been proposed for standard linear and logistic regressions with observed single outcomes [31].
The primary virtues of FPVC testing are threefold. First, we separate the procedure into two stages of distinct complexity in order to make it feasible at large scale. In the first stage, we model y flexibly using FPCA and obtain a succinct summary of disease progression for each patient, once and for all. In the second stage, we perform a rather simple model at large scale. Thus, we segregate the computationally complex stage (which need occur only once) from the large-scale stage (which could require the same computation on the order of millions of times in, e.g., genome-wide association studies). Second, the summary of y that we obtain from FPCA is the most succinct summary possible, as the eigenfunctions identified by FPCA are the functions that explain the most variability in y. Third, our theoretical results suggest that the null distribution of the FPVC test statistic reduces to a simple mixture of χ 2 distributions. The variability due to estimating the eigenfunctions does not contribute to the null distribution of the test statistic asymptotically at the first order (see (11) and the derivation of the asymptotic null distribution).
The structure of the rest of the paper is as follows. In section 2, we describe FPCA and introduce FPVC testing and our main theoretical results. In section 3, we give details about the association study for HIV progression. In section 4, we discuss simulation results, and in section 5 we discuss further implications of our procedure.

2.1.
The test statistic. In this section, we propose a testing procedure for assessing the association between a set of genetic markers z and a longitudinally measured outcome y, adjusting for covariates x. Let the data for analysis consist of n independent random vectors V , where y i = (y i1 , ..., y ir i ) T is a vector of outcome measurements taken at times t i = (t i1 , ..., t ir i ) T ∈ T r i , T is a closed and bounded interval, z i = (z i1 , ..., z ip ) T is a vector of genetic markers of interest, and x i = (1, x i1 , ..., x iq ) T is a vector of additional covariates that are potentially related to the outcome, all measured on person i. For each i, we take (z T i , x T i ) T to be distributed as (z T , x T ) T . Our goal is to test the null hypothesis To model the longitudinal trajectory, we assume that y ir is a noisy sample of a smooth underlying function Y i (·), evaluated at the point t ir , which following the logic of [32] can be written as a linear combination of its population mean E{Y (·)} and a set of K eigenfunctions {φ k (·)} where ξ ik is the FPCA score associated with the kth eigenfunction, E(ξ ik ) = 0, Var(ξ ik ) = λ k , and the eigenfunctions are ordered such that the kth explains the kth most variance in Y (·). Thus, the relationship between y i and x i and z i must be captured by the only random quantity in (2), the random coefficients {ξ ik } K k=1 . Therefore, testing (1) is equivalent to testing However, direct assessment of the association between {ξ ik } K k=1 and z iS is difficult since {ξ ik } K k=1 are unobservable and K could be infinity.
Most methods of estimating a function like Y i (·) require an explicit tuning of the smoothness of the resulting estimator. Here that corresponds to choosing a (typically small) number K of eigenfunctions as an approximation where K < ∞ could be chosen such that the first K directions capture a proportion of the variation at least as large as ℘ ∈ (0, 1]. Our simulation results (see section 4) suggest that the performance of FPVC testing is not very sensitive to the choice of K provided that ℘ is close to 1. Since {ξ ik } K k=1 are not observable or generally estimable due to sparse sampling of measurement times, we instead infer about the association between Y i (·) and z i based on the best linear unbiased predictor (BLUP), In the PACE method of [32], ξ ik was obtained as E(ξ ik |y i ) under the assumption that ξ ik and ir are jointly normal, but we don't require normality here. We simply take ξ ik as an observable and reasonable approximation to ξ ik even if normality does not hold, as has been argued in [26] and [14].
Thus, we propose to test (1) by testing Taking note that the association we seek to test is conditional on x, one may construct a test for is captured fully based on the model relating x i and ξ i , which may not be true in general. To remove the effect of x i without imposing a strong assumption on how x i affects Y i (·), we instead choose to model the conditional expectation of z ij given To form the test statistic for H 0 , we propose to summarize the overall association between Y (·) and z S based on the Frobenius norm of the standardized covariance between ξ i and z * Though Q 0 takes a simple form and can be motivated naturally as an estimated covariance (and can thus be considered model-free), it can also be viewed as a variance component score test statistic similar to those considered previously for other regression models [8,17]. Details on the derivation of the variance component score test statistic are given in section 2.2.
Both ξ i and z * iS involve various nuisance parameters that remain to be estimated. First, under mild regularity conditions which are outlined in the supplementary article [1], we can use FPCA to estimate the relevant quantities via local linear smoothing as in [13] and [32]. Subsequently, we can estimate ξ ik by , various approaches can be taken depending on the nature of x. For example, when x is discrete, µ z j (x i ) can be estimated empirically. With continuous x, we may impose a parametric model with and obtainz j (x) as g j ( θ j , x), where θ j is an estimate of a finite-dimensional parameter θ j . To take two examples that commonly come up in genomics, if z j takes values in {0, 1}, e.g. under the dominant model, then z j can be modeled using logistic regression, and if z j takes values in {0, 1, 2}, then we may use a binomial generalized linear model or a proportional odds model. There are two reasons to prefer to remove the effect of x from z rather than from ξ: first, it may in general be easier to specify a model for z rather than ξ because of the limited range of z, and, second, this formulation facilitates asymptotic analysis without the need to derive the asymptotic distributions for the estimated FPCA scores. Finally, based on { ξ ik } K k=1 andz j (x i ), our proposed test statistic is

2.2.
Connection to mixed effects models. In this section, we demonstrate that one can arrive at the quantity (4) via a more familiar mixed effects model. Consider the model where B is a K × s matrix with (k, j)th entry β kj and Λ = diag(λ 1 , ..., λ K ). We can obtain Q 0 as the variance component score test statistic for H 0 : B = 0. Specifically, let β kj = ην kj and we consider a working model such that {ν kj } are independently distributed with E(ν kj ) = 0 and Var(ν kj ) = λ 2 k . Under this working model, H 0 : B = 0 is equivalent to This formulation follows the logic of variance component score tests that have been proposed previously [31] and recalls, for example, the likelihood ratio test proposed in [9]. To obtain the variance component test statistic, rewrite the model as Then The log-likelihood for y µi can then be written Because the target of inference is η, we marginalize over the nuisance parameter ν conditional on the observed data to obtain L * (η) = E{L(η)|V} where the expectation is taken over the distribution of ν. We follow the argument in [8] and note that the score at the null value is 0: So we instead consider the score with respect to η 2 , lim η→0 ∂ log L * (η)/∂ and we show in the supplementary article [1] that it can be written up to a scaling constant.
To finally obtain Q 0 , we standardize by n −1 and drop the second term because it converges to a constant, yielding the score statistic taking note of the form of ξ ik from (3). Thus, our proposed test statistic can be obtained as a variance component test under a normal mixed model framework. On the other hand, we can also view Q 0 as a simple summary of the overall covariance between the scores of the FPCA and the genetic markers. We next derive the null distribution of the FPVC test statistic without requiring the normal mixed model to hold.

2.3.
Estimating the null distribution of the test statistic. In order to obtain p-values for FPVC testing, we must identify the null distribution of Q. To this end, we show in [1] that the key quantity in Q under H 0 , i.e. q kj − q kj = o p (1) for each j and k. The key idea for deriving the null distribution of q kj is that, since z * ij is approximately mean 0 conditional on x i , the variability due to approximating ξ ik by ξ ik does not contribute any additional noise to q kj (compared to q kj ) at the first order under H 0 . Thus, we can obtain the limiting distribution of Q by analyzing the quantity Q = j∈S K k=1 q 2 kj . To characterize the null distribution of Q, we need to account for the variability in the estimated model parameters for µ z j (x i ) = g j (θ j , x i ) in z * ij . Without loss of generality, we assume that for each j We show in [1] that the limiting null distribution of Q is a mixture of χ 2 1 random variables, Q ∼ sK l=1 a l χ 2 1 , with mixing coefficients determined by the eigenvalues of the covariance matrix of {Q ikj } j∈S,1≤k≤K . So finally we obtain a p-value for the association between the set z S and Y (·) as P ( sK l=1 a l χ 2 1 > Q | V), where a l is an empirical estimate of a l .
By a similar argument, one could construct an asymptotically equivalent test statistic by estimating ξ i in two stages. Instead of obtaining an estimator directly from FPCA via equation (5), FPCA can be used to estimate only µ(·) and {φ k (·)} K k=1 . By plugging the estimated µ(·) and { φ k (·)} K k=1 into the mixed model (8), one can obtain what we will call the re-fitted test statistic whereξ i = (ξ i1 , ...,ξ iK ) T is the BLUP from the model y ir − µ(t ir ) = K k=1 ξ ik φ k (t ir )+ ir with Cov(ξ i ) = D, for some unspecified positive definite matrix D. By the same argument above, estimation of ξ ik bȳ ξ ik contributes no additional variability to the test statistic at the first order. It follows that and henceQ has the same limiting null distribution as Q. Not surprisingly, simulation results suggest that the performance ofQ is quite similar to the performance of Q. This equivalence indicates that effectively our proposed testing procedure uses FPCA to estimate potentially nonlinear bases and assesses the effect of genetic markers by fitting a mixed model with these basis functions. On the other hand, the test statistics can also be viewed as a simple summary of covariances, and -since we estimate the null distribution without relying on the normality assumption required by the mixed models -our testing procedure remains valid regardless of the adequacy of the mixed model.

2.4.
Combining multiple sources of outcome information. In the HIV progression study, we seek to test the overall association between SNPs and both lCD4 and lVL simultaneously because more and distinct information about HIV progression is captured in both measures than in either one alone. FPVC testing, as outlined above, can be easily adapted to perform a test for the overall association between z S and all outcomes of interest. To use information in multiple outcomes, {y (m) } M m=1 , we simply perform FPCA separately on each y (m) and obtain FPCA scores for each person and each outcome. Subject i's scores for y as before based on Since each outcome may be measured on a different scale, one may use scaling or weighting to allow scores from each outcome to contribute similarly to the test statistic. See section 5 for further discussion of scaling/weighting.

Association study for HIV progression.
In this study, two independent cohorts were recruited in Botswana to detect sets of SNPs related to HIV disease progression as measured by lCD4 and lVL. The first cohort, which we will denote BHP010, was a natural history observational prospective cohort study recruited from clinics in Gaborone. This cohort included HIV-1C-infected individuals with CD4 cell counts above 400 cells per µl and not yet qualified for the Botswana highly active antiretroviral treatment (HAART) program. Patients were not enrolled if they were younger than 18, had an active AIDS-defining illness requiring the initiation of HAART, presented with an AIDS-related malignancy, or had previously been exposed to HAART during pregnancy or breast feeding.
Follow-up visits occurred at approximately three-month intervals with an additional visit one month after enrollment. VL was generally collected at six-month intervals, and most patients in this cohort do not have VL measurements after two years of follow-up. Follow-up began in 2005 and lasted for up to 255 weeks. The mean follow-up time was 41 months. At least two CD4 measurements were required for measuring disease progression, and 449 patients satisfied this criterion. Of these, the median age at baseline was 34 years old with an interquartile range (IQR) of (28, 39). There were 366 women. In 2008, 143 patients were genotyped on an Illumina LCG BeadChip, the chip used in the second cohort. After making exclusions for quality control -call rate greater than 0.99, gender matching listed gender -137 individuals were included in the association study.
The second cohort we will denote BHP011. This cohort came from a randomized, multifactorial, double-blind placebo-controlled trial conducted between December 2004 and July 2009 [3]. The purpose of the trial was to determine the efficacy of micronutrient supplementation (supplementation of multivitamin, selenium, or both) in improving immune function in HIV-1C-infected individuals. It was composed of 878 treatment-naive patients with CD4 higher than 350 cells/µl, as well as body mass index (BMI) greater than 18 for women and 18.5 for men (calculated as weight in kilograms divided by height in meters squared), age of 18 years or older, no current AIDS-defining conditions or history of AIDS-defining conditions, and no history of endocrine or psychiatric disorders.
Patients were followed up for a maximum of 169 weeks. They returned to clinics approximately every 3 months to measure CD4 and approximately every 6 months to measure VL. The mean follow-up time was 696 days. Of these, 838 had at least two CD4 measurements, of whom 613 were women. The median age at baseline was 33 years old with an interquartile range (IQR) of (28,39). In this cohort, 326 individuals were genotyped on Illumina LCG BeadChips, with 320 entered into the association study after quality control exclusions.
FPCA was performed on each cohort separately for both lCD4 and lVL. Three eigenfunctions were chosen for lCD4 and two for lVL in each cohort, which corresponds to 99% of proportion of variance explained for each. The form of the eigenfunctions look similar for both lCD4 and lVL in each cohort and lend themselves to reasonable interpretations. The first eigenfunction tends to serve as a mean shift or an intercept; the second eigenfunction acts something like a slope; and the third eigenfunction behaves approximately as a quadratic term. The vector of estimated "re-fitted" scores (refer to (12)) for each individual to be used in testing can be written ξ i = ( ξ A total of 155,007 SNPs on chromosome 6 were genotyped. After requiring less than 5% missingness and at least five individuals with any minor alleles in each cohort, p = 108, 665 SNPs, z i = (z i1 , ..., z ip ) remained for association testing, where the ordering in z i corresponds to position on the chromosome. The dominant model was used for analysis such that z ij = 1 if any minor alleles are present and z ij = 0 if none are present. Missing values were imputed as the minor allele frequency for that SNP. In order to gain power by pooling information in nearby SNPs, sets of 10 contiguous SNPs were constructed as z iS j = (z ij , ..., z ij+9 ) for j = 1, ..., 108, 656. Here the choice of 10 merely serves as example for illustration and sets could in principle be constructed with more SNPs, but due to the small sample size in each cohort, we kept the size of the sets modest. Tests were performed on each cohort separately, and pvalues were combined using the Fisher method. The false discovery rate was controlled at 0.1 using the Benjamini-Hochberg procedure [4], which is expected to remain valid since although the moving window construction of sets induces high correlations for nearby regions, SNP sets in distant regions are not expected to be correlated [28].
Tests were adjusted for age and gender to remove any possible confounding, so that we are testing for the effect of SNP sets on disease progression conditional on age and gender. Logistic regression was used to remove their effect. The method appears to be robust to this specification, as results were not markedly changed either when no adjustment was made or by specifying a probit model (results not shown). The manhattan plot for the 108,656 tests is given in figure 1. In all, 126 tests passed the FDR threshold, corresponding to 4 broad regions of the chromosome. Six contiguous tests rejected in the region between positions 6,784,416 and 6,793,116 (region 1), which fall between the LY86 and BTF3P7 genes; 117 tests rejected between positions 31,022,266 and 31,080,899 (region 2), including SNPs on the HCG22 and C6orf15 genes; two tests rejected between 122,990,817 and 123,014,708 (region 3) on the PKIB gene; and one test rejected representing SNPs in the region between 162,250,522 and 162,254,546 (region 4) including SNPs on the PARK2 gene. Notably, the C6orf15 gene has been reported to be associated with susceptibility to follicular lymphoma [27], and genes in linkage disequilibrium with HCG22 and C6orf15 have demonstrated associations to total white blood cell counts [21] and multiple myeloma [7].
Furthermore, regions 1, 3, and 4 -whose -log 10 p-values are depicted in figure 2 (a), (c), and (d), respectively -only have strong signals in one of the two cohorts. Region 1 demonstrates association largely in BHP010, as can be seen in the figure where the large triangles in the figure (representing the set-based p-value in BHP010) tend to lie above the large dots (representing the combined set-based p-value), while the diamonds for BHP011 tend to be very low. Conversely, in regions 3 and 4 the association is apparent only in BHP011. Whereas in region 2, associations tend to be strong in both cohorts, and the combined p-values tend to be lower (higher in the figure) than either of the component p-values.
To get a better sense of what the test is picking up on, we looked at average disease progression within groups of patients with similar minor allele burden. To do this, we identified the SNP set with the smallest p-value, which lay in the HCG22 portion of region 2 and included the following SNPs: rs2535308, rs2535307, rs2535306, rs2535305, rs3130955, rs2535304, rs12527394, rs2535303, kgp9442190, and rs3130959. Patients were grouped according to the number of loci among these 10 at which they had any minor alleles. Within these groups, we averaged the estimated mean lCD4 and lVL in each cohort over time Y (·) = µ(·) + K k=1 ξ ik φ k (·). As a demonstration, the results for those with 2, 3, 8, and 9 loci with minor alleles are depicted in figure 3. We selected these groups to demonstrate burden extremes (very few individuals had 0 or 1 loci affected, so they were not shown).
Those with only 2 and 3 affected loci looked to generally be the healthiest group, having higher and more stable CD4 and lower and gently increasing VL throughout the study period in each cohort. Those with 3 affected loci tended to have a more negative CD4 slope and higher and increasing VL over the study period. Those with 9 affected loci in general had the worst progression: low and declining CD4 counts in both cohorts, and high and relatively stable VL in both cohorts. Those with 8 affected loci tend to fall in the middle. Smoothing the raw data directly in each of these groups yielded similar results and nearly identical conclusions (results not shown).

Simulation results.
We have performed simulation studies to assess the finite sample performance of our proposed testing procedure and compare its power to the standard linear-mixed-modelbased procedures. For simplicity, we focused on a single marker z in the absence of covariates and two potential functional outcomes generated from  For each subject i, we generate the number of observations from a Poisson distribution r i ∼ Poisson(λ) + 2, and we generate t ir uniformly over the time interval (0, 2π). The parameter β controls the magnitude of the genetic effect. The parameter α controls how linear the genetic affect is -when α = 0 the genetic effect is entirely linear, and when α = 1 the effect is entirely nonlinear. On the other hand, γ controls the complexity of the mean process and the amount of inter-subject variability -when γ = 0, the mean process is relatively simple but the inter-subject variability is high, and when γ = 1 the mean process is complex and the inter-subject variability is low. The genetic factor z i is generated according to a binomial(2, 0.1), with 0.1 the minor allele frequency. We examined the performance of the FPVC test statistic Q (defined in (13), here denoted by "FPCA") and its asymptotically equivalent counterpartQ (defined in the context of a single outcome in (12), here denoted "Re-fitted"). For the purposes of comparison, we also examined the performance of a similar test statistic that does not use FPVC but instead employs a pre-specified basis. Consider the test is the BLUP from the linear mixed model y ir = β 0 + β 1 t ir + ξ i1 + ξ i2 t ir + ir . In the following, we denote results for Q lin by "Linear".
The number of FPCA scores for the mth outcome, K m , was selected as the smallest K such that the fraction of variation explained (FVE), K k=1 λ k /( k λ k ), was at least ℘ = 0.99. To ensure that the scores for each outcome contributed comparably to the test statistics, we centered and scaled each outcome as ir . In the following we report power as the proportion of 1000 simulations for which the testing procedure produced a p-value below 0.05 to demonstrate the relative performance of the various testing procedures. To ensure that the asymptotic null distribution of the test statistic yields a valid testing procedure, we evaluate the entire distribution of p-values under the null hypothesis, including at levels much lower than 0.05.

Type I error.
In the following we take λ = 6. The empirical type I error rates for testing at the 0.05 level ranged from 0.040 (γ = 0.25) to 0.048 (γ = 0) for Q; from 0.036 (γ = 1) to 0.047 (γ = 0) forQ; and from 0.040 (γ = 0.75) to 0.059 (γ = 1) for Q lin . However, levels much smaller than 0.05 are necessary to control error rates in large-scale testing. Thus, in order to establish the validity of our testing procedure for performing many tests, we establish that the resulting p-values are approximately uniform under the null hypothesis. We performed 10 6 simulations under the null, with n = 200, γ = 1, and α = 0, and we obtained the type I error of FPVC testing at each of the following levels: 1 × 10 −6 , ..., 9 × 10 −6 , 1 × 10 −5 , ..., 9 × 10 −5 , 1 × 10 −4 , ..., 9 × 10 −4 , 1 × 10 −3 , ..., 9 × 10 −3 . Results are depicted in Figure 4. The Figure shows that the level is preserved at all levels of testing. Further simulations would provide better approximations of type I error rates at smaller levels, but these results suggest that the asymptotic null distribution fits quite well in small samples.

4.2.
Power. In figure 5, we display results for n = 100 and all levels of γ and α. There, the figure demonstrates that, despite the fact that the true effect was linear when α = 0, both FPC-based tests dominate the linear-based tests, and the advantage of using FPVC, in terms of power, did not disappear, even when the true effect was linear. Notably, as γ varied, we saw power gains by using the FPVC-based Q andQ, with the gains increasing as γ approached 1 and the functional form of Y (m) i (·) became more complex, and the need to flexibly model it increased.
In all of our simulations, the FPVC methods dominated the linear method in terms of power while maintaining desirable type I error rates. We wanted to ensure that the improvement we were seeing was not simply due to the fact that the linear model used only two scores, a random intercept ξ (m) † i1 and a random slope ξ (m) † i2 , for each outcome whereas the FPVC-based methods used K m scores, where K m was often selected larger than 2. Thus, we also considered the performance of scores based on fixed-basis expansions of t, using either polynomial or spline bases. Specifically, we fit models with K = 2, 3, ..., 6 degrees of freedom. For polynomial bases corresponded to the model y ir = K k=1 (β k +ξ ik ) t k−1 ir + ir for t ir a centered and scaled version of t ir . And for the spline basis, we used cubic B-splines constructed with the specified degrees of freedom with the bs function in the splines R package. Because, in some sense, FPCA does model selection by choosing the basis that explains the most variability in y, we also perform model selection on the pre-specified bases in order to make the comparison fair. We select the model with the lowest AIC and use the ξ ik s from that model in the testing procedure. We will call the test statistic based on B-splines Q B and the model based on polynomial bases Q p .
Results are found in figure 6. We found that there were some situations when using the pre-specified B-spline basis could outperform the FPVC tests, particularly when γ was near 0 (low mean complexity) and α was near 1 (linear genetic effect). However, the polynomial basis never outperformed FPVC. And as the complexity of the trajectory γ increased, the desirability of FPVC testing always increased. This suggests that in simple problems, using a pre-specified basis may be preferable, but for complex effects and complex trajectories, FPVC will likely be preferred. And in general, if the complexity of the trajectory is unknown, FPVC testing offers a generally powerful method for all settings that is insensitive to tuning parameter selection.
5. Discussion. We have proposed functional principal variance component testing, a FPCA-based testing procedure for assessing the association between a set of genetic variants z S and a complexly varying longitudinal outcome y that is feasible on the genome-wide scale, allowing adjustment for other covariates. Unlike the standard mixed-model-based approaches, we do not model the trajectories  {Y i (·)} n i=1 parametrically but use the data to identify the most parsimonious summaries of the trajectory patterns via FPCA. We subsequently test the association between the random coefficients ξ i and the markers of interest using a test statistic motivated by variance component testing. Our procedure could potentially be much more powerful than procedures based on pre-specified bases, which might suffer power loss due to either high degrees of freedom or inability to capture the complexity in the trajectories. Furthermore, our FPVC testing is computationally efficient as we are able to perform thousands or even millions of tests quickly by separating the time-intensive FPCA from the testing. This makes our method feasible on the genome-wide scale where millions of marginal tests may be necessary. As an example, computing test statistics and p-values for FPVC testing typically takes less than 0.1 seconds for a set of 10 SNPs and both lCD4 and lVL combined. On the other hand, fitting a single linear mixed effects model for only lCD4 with a random effect for a small pre-specified B-spline basis takes more than 2 seconds. At the genome-wide scale we would observe a speed-up on the order of hours. Code for FPVC testing is available at https://github.com/denisagniel/fpvc.
It is important to note that while we make mild assumptions on the longitudinal outcome y to obtain the form of our proposed test statistic, the validity of FPVC testing requires no assumption about the relationship between y and z S . FPVC testing remains valid even if the working mixed model (8) fails to hold. Additionally, while one can motivate the quantity ξ ik as the conditional expectation of ξ ik under a normality assumption on ξ ik and ir , even when this normality fails to hold, testing based on Q remains valid since the estimated eigenvalues and eigenfunctions from functional PCA are uniformly convergent to their limits [13]. In fact, one can consider FPVC model-free in that the test statistic Q could be motivated simply as an estimated covariance. Furthermore, we assume that the errors ir are iid with mean 0 and variance σ 2 , but some relaxation of this assumption is possible for some "degree of weak dependence and in cases of non-identical distribution" [13], while still maintaining the validity of our procedure.
FPVC testing can also simultaneously consider multiple sources of outcome information to better characterize complex phenotypes. With multiple longitudinal outcomes, one might wish to ensure that scores for all outcomes are roughly on the same scale, so that each outcome contributes comparably to the test statistic. To this end, one may consider a weighted version of (13) as where ω m are nonnegative outcome-specific weights that can be pre-specified or data adaptive. Alternatively, in the absence of relevant weights, one can simply scale each y (m) so that the magnitude of ξ F . Such a strategy appears to work well in simulation studies.
While we use FPCA to summarize the longitudinal trajectories for the purpose of testing with low degrees of freedom, in principle another suitably parsimonious nonparametric method could be used instead. For example, if observations were measured on a common, fine grid of points, then one could imagine using the methods in [20] to first regress y on t, obtain the random effects estimates (similar to the ξ i employed here), and use these in testing. However, no available approaches are as widely applicable as our FPCA-based approach, which can be used even when data are sparsely observed; other approaches may not have as small effective degrees of freedom as an FPCA-based method, and the resulting testing procedure may be more sensitive to correct tuning.