A significance test for the lasso
Richard Lockhart, Jonathan Taylor, Ryan J. Tibshirani, Robert Tibshirani
Introduction.
where is a tuning parameter, controlling the level of sparsity in . Here, we assume that the columns of are in general position in order to ensure uniqueness of the lasso solution [this is quite a weak condition, to be discussed again shortly; see also Tibshirani 2013].
There has been a considerable amount of recent work dedicated to the lasso problem, both in terms of computation and theory. A comprehensive summary of the literature in either category would be too long for our purposes here, so we instead give a short summary: for computational work, some relevant contributions are Friedman et al. 2007, Beck and Teboulle 2009, Friedman, Hastie and Tibshirani 2010, Becker, Bobin and Candès 2011, Boyd et al. 2011, Becker, Candès and Grant 2011; and for theoretical work see, for example, Greenshtein and Ritov 2004, Fuchs 2005, Donoho 2006, Candes and Tao 2006, Zhao and Yu 2006, Wainwright 2009, Candès and Plan 2009. Generally speaking, theory for the lasso
is focused on bounding the estimation error or , or ensuring exact recovery of the underlying model, [with denoting the support function]; favorable results in both respects can be shown under the right assumptions on the generative model (1) and the predictor matrix . Strong theoretical backing, as well as fast algorithms, have made the lasso a highly popular tool.
Yet, there are still major gaps in our understanding of the lasso as an estimation procedure. In many real applications of the lasso, a practitioner will undoubtedly seek some sort of inferential guarantees for his or her computed lasso model—but, generically, the usual constructs like -values, confidence intervals, etc., do not exist for lasso estimates. There is a small but growing literature dedicated to inference for the lasso, and important progress has certainly been made, with many methods being based on resampling or data splitting; we review this work in Section 2.5. The current paper focuses on a significance test for lasso models that does not employ resampling or data splitting, but instead uses the full data set as given, and proposes a test statistic that has a simple and exact asymptotic null distribution.
Section 2 defines the problem that we are trying to solve, and gives the details of our proposal—the covariance test statistic. Section 3 considers an orthogonal predictor matrix , in which case the statistic greatly simplifies. Here, we derive its asymptotic distribution using relatively simple arguments from extreme value theory. Section 4 treats a general (nonorthogonal) , and under some regularity conditions, derives an limiting distribution for the covariance test statistic, but through a different method of proof that relies on discrete-time Gaussian processes. Section 5 empirically verifies convergence of the null distribution to over a variety of problem setups. Up until this point, we have assumed that the error variance is known; in Section 6, we discuss the case of unknown . Section 7 gives some real data examples. Section 8 covers extensions to the elastic net, generalized linear models, and the Cox model for survival data. We conclude with a discussion in Section 9.
Significance testing in linear modeling.
Classic theory for significance testing in linear regression operates on two fixed nested models. For example, if and are fixed subsets of , then to test the significance of the th predictor in the model (with variables in) , one naturally uses the chi-squared test, which computes the drop in residual sum of squares (RSS) from regression on and ,
and compares this to a distribution. (Here, is assumed to be known; when is unknown, we use the sample variance in its place, which results in the -test, equivalent to the -test, for testing the significance of variable .)
Often, however, one would like to run the same test for and that are not fixed, but the outputs of an adaptive or greedy procedure. Unfortunately, adaptivity invalidates the use of a null distribution for the statistic (3). As a simple example, consider forward stepwise regression: starting with an empty model , we enter predictors one at a time, at each step choosing the predictor that gives the largest drop in residual sum of squares. In other words, forward stepwise regression chooses at each step in order to maximize in (3), over all . Since follows a distribution under the null hypothesis for each fixed , the maximum possible will clearly be stochastically larger than under the null. Therefore, using a chi-squared test to evaluate the significance of a predictor entered by forward stepwise regression would be far too liberal (having type I error much larger than the nominal level). Figure 1(a) demonstrates this point by displaying the quantiles of in forward stepwise regression (the chi-squared statistic for the first predictor to enter) versus those of a variate, in the fully null case (when ). A test at the level, for example, using the cutoff of , would have an actual type I error of about .
The failure of standard testing methodology when applied to forward stepwise regression is not an anomaly—in general, there seems to be no direct way
to carry out the significance tests designed for fixed linear models in an adaptive setting. It is important to mention that a simple application of sample splitting can yield proper -values for an adaptive procedure like forward stepwise: for example, run forward stepwise regression on one-half of the observations to construct a sequence of models, and use the other half to evaluate significance via the usual chi-squared test. Some of the related work mentioned in Section 2.5 does essentially this, but with more sophisticated splitting schemes. Our proposal uses the entire data set as given, and we do not consider sample splitting or resampling techniques. Aside from adding a layer of complexity, the use of sample splitting can result in a loss of power in significance testing. Our aim is hence to provide a (new) significance test for the predictor variables chosen adaptively by the lasso, which we describe next.
Before defining our statistic, we briefly review some properties of the lasso path.
The path is a continuous and piecewise linear function of , with knots (changes in slope) at values (these knots depend on ).
At , the solution has no active variables (i.e., all variables have zero coefficients); for decreasing , each knot marks the entry or removal of some variable from the current active set (i.e., its coefficient becomes nonzero or zero, resp.). Therefore, the active set, and also the signs of active coefficients, remain constant in between knots.
At any point in the path, the corresponding active set of the lasso solution indexes a linearly independent set of predictor variables, that is, , where we use to denote the columns of in .
For a matrix satisfying the positive cone condition (a restrictive condition that covers, e.g., orthogonal matrices), there are no variables removed from the active set as decreases and, therefore, the number of knots is .
We can now precisely define the problem that we are trying to solve: at a given step in the lasso path (i.e., at a given knot), we consider testing the significance of the variable that enters the active set. To this end, we propose a test statistic defined at the th step of the path.
We propose the covariance test statistic defined by
Indeed, the natural choice for the tuning parameter in (5) is : this allows the th coefficient to have its fullest effect on the fit before the entry of the next variable at (or possibly, the deletion of a variable from at ).
that is, is asymptotically distributed as a standard exponential random variable, given reasonable assumptions on and the magnitudes of the nonzero true coefficients. [In some cases, e.g., when we have a strict inclusion , the use of an null distribution is actually conservative, because the limiting distribution of is stochastically smaller than .] In the above limit, we are considering both ; in Section 4, we allow for the possibility , the high-dimensional case.
See Figure 1(b) for a quantile–quantile plot of versus an variate for the same fully null example () used in Figure 1(a); this shows that the weak convergence to can be quite fast, as the quantiles are decently matched even for . Before proving this limiting distribution in Sections 3 (for an orthogonal ) and 4 (for a general ), we give an example of its application to real data, and discuss issues related to practical usage. We also derive useful alternative expressions for the statistic, present a connection to degrees of freedom, review related work, and finally, discuss the null hypothesis in more detail.
2 Prostate cancer data example and practical issues.
We consider a training set of 67 observations and 8 predictors, the goal being to predict log of the PSA level of men who had surgery for prostate cancer. For more details, see Hastie, Tibshirani and Friedman 2008 and the references therein. Table 1 shows the results of forward stepwise regression and the lasso. Both methods entered the same predictors in the same order. The forward stepwise -values are smaller than the lasso -values, and would enter four predictors at level . The latter would enter only one or maybe two predictors. However, we know that the forward stepwise -values are inaccurate, as they are based on a null distribution that does not account for the adaptive choice of predictors. We now make several remarks.
The above example implicitly assumed that one might stop entering variables into the model when the computed -value rose above some threshold. More generally, our proposed test statistic and associated -values could be used as the basis for multiple testing and false discovery rate control methods for this problem; we leave this to future work.
In the example, the lasso entered a predictor into the active set at each step. For a general , however, a given predictor variable may enter the active set more than once along the lasso path, since it may leave the active set at some point. In this case, we treat each entry as a separate problem. Our test is specific to a step in the path, and not to a predictor variable at large.
One might imagine that such correlation would cause problems for our theory in Sections 3 and 4, which assumes i.i.d. normal errors in the model (1). However, a careful look at the arguments in these sections reveals that the only dependence on is through , the inner products of with the columns of . Furthermore,
which is the same as it would have been without centering (here is the matrix of all s, and we used that the columns of are centered). Therefore, our arguments in Sections 3 and 4 apply equally well to centered data, and centering has no effect on the asymptotic distribution of .
By design, the covariance test is applied in a sequential manner, estimating -values for each predictor variable as it enters the model along the lasso path. A more difficult problem is to test the significance of any of the active predictors in a model fit by the lasso, at some arbitrary value of the tuning parameter . We discuss this problem briefly in Section 9.
3 Alternate expressions for the covariance statistic.
Here, we derive two alternate forms for the covariance statistic in (5). The first lends some insight into the role of shrinkage, and the second is helpful for the convergence results that we establish in Sections 3 and 4. We rely on some basic properties of lasso solutions; see, for example, Tibshirani and Taylor 2012, Tibshirani 2013. To remind the reader, we are assuming that has columns in general position.
For any fixed , if the lasso solution has active set and signs , then it can be written explicitly (over active variables) as
In the above expression, the first term simply gives the regression coefficients of on the active variables , and the second term can be thought of as a shrinkage term, shrinking the values of these coefficients toward zero. Further, the lasso fitted value at is
where denotes the projection onto the column space of , and is the (Moore–Penrose) pseudoinverse of .
Using the representation (6) for the fitted values, we can derive our first alternate expression for the covariance statistic in (5). If and are the active set and signs just before the knot , and is the variable added to the active set at , with sign upon entry, then by (6),
and plugging the above two expressions into (5),
Note that the first term above is , which is exactly the chi-squared statistic for testing the significance of variable , as in (3). Hence, if were fixed, then without the second term, would have a distribution under the null. But of course are not fixed, and so much like we saw previously with forward stepwise regression, the first term in (2.3) will be generically larger than , because is chosen adaptively based on its inner product with the current lasso residual vector. Interestingly, the second term in (2.3) adjusts for this adaptivity: with this term, which is composed of the shrinkage factors in the solutions of the two relevant lasso problems (on and ), we prove in the coming sections that has an asymptotic null distribution. Therefore, the presence of the second term restores the (asymptotic) mean of to , which is what it would have been if were fixed and the second term were missing. In short, adaptivity and shrinkage balance each other out.
This insight aside, the form (2.3) of the covariance statistic leads to a second representation that will be useful for the theoretical work in Sections 3 and 4. We call this the knot form of the covariance statistic, described in the next lemma.
Let be the active set just before the th step in the lasso path, that is, , with being the th knot. Also, let denote
the signs of the active coefficients, , be the predictor that enters the active set at , and be its sign upon entry. Then, assuming that
or in other words, all coefficients are active in the reduced lasso problem (4) at and have signs , we have
and is the concatenation of and .
The proof starts with expression (2.3), and arrives at (9) through simple algebraic manipulations. We defer it until Appendix .1.
When satisfies the positive cone condition (which includes orthogonal), because no variables ever leave the active set in this case. In fact, for orthogonal, it is straightforward to check that , so .
When (we are testing the first variable to enter), as a variable cannot leave the active set right after it has entered. If and has unit normed columns, for , then we again have (note that ), so .
When , that is, contains the signs of the least squares coefficients on , because the same active set and signs cannot appear at two different knots in the lasso path (applied here to the reduced lasso problem on ).
The first and second scenarios are considered in Sections 3 and 4.1, respectively. The third scenario is actually somewhat general and occurs, for example, when ; in this case, both the lasso and least squares on recover the signs of the true coefficients. Section 4.2 studies the general and case, wherein this third scenario is important.
4 Connection to degrees of freedom.
There is an interesting connection between the covariance statistic in (5) and the degrees of freedom of a fitting procedure. In the regression setting (1), for an estimate [which we think of as a fitting procedure ], its degrees of freedom is typically defined [Efron 1986] as
In words, sums the covariances of each observation with its fitted value . Hence, the more adaptive a fitting procedure, the higher this covariance, and the greater its degrees of freedom. The covariance test evaluates the significance of adding the th predictor via something loosely like a sample version of degrees of freedom, across two models: that fit on , and that on . This was more or less the inspiration for the current work.
Using the definition (10), one can reason [and confirm by simulation, just as in Figure 1(a)] that with predictors entered into the model, forward stepwise regression had used substantially more than degrees of freedom. But something quite remarkable happens when we consider the lasso: for a model containing nonzero coefficients, the degrees of freedom of the lasso fit is equal to (either exactly or in expectation, depending on the assumptions) [Efron et al. 2004, Zou, Hastie and Tibshirani 2007, Tibshirani and Taylor 2012]. Why does this happen? Roughly speaking, it is the same adaptivity versus shrinkage phenomenon at play. [Recall our discussion in the last section following the expression (2.3) for the covariance statistic.] The lasso adaptively chooses the active predictors, which costs extra degrees of freedom; but it also shrinks the nonzero coefficients (relative to the usual least squares estimates), which decreases the degrees of freedom just the right amount, so that the total is simply .
5 Related work.
There is quite a lot of recent work related to the proposal of this paper. Wasserman and Roeder 2009 propose a procedure for variable selection and -value estimation in high-dimensional linear models based on sample splitting, and this idea was extended by Meinshausen, Meier and Bühlmann 2009. Meinshausen and Bühlmann 2010 propose a generic method using resampling called “stability selection,” which controls the expected number of false positive variable selections. Minnier, Tian and Cai 2011 use perturbation resampling-based procedures to approximate the distribution of a general class of penalized parameter estimates. One big difference with the work here: we propose a statistic that utilizes the data as given and does not employ any resampling or sample splitting.
Zhang and Zhang 2014 derive confidence intervals for contrasts of high-dimensional regression coefficients, by replacing the usual score vector with the residual from a relaxed projection (i.e., the residual from sparse linear regression). Bühlmann 2013 constructs -values for coefficients in high-dimensional regression models, starting with ridge estimation and then employing a bias correction term that uses the lasso. Even more recently, van de Geer and Bühlmann 2013, Javanmard and Montanari 2013a (Javanmard and Montanari 2013a; Javanmard and Montanari 2013b) all present approaches for debiasing the lasso estimate based on estimates of the inverse covariance matrix of the predictors. (The latter work focuses on the special case of a predictor matrix with i.i.d. Gaussian rows; the first two consider a general matrix .) These debiased lasso estimates are asymptotically normal, which allows one to compute -values both marginally for an individual coefficient, and simultaneously for a group of coefficients. All of the work mentioned in the present paragraph provides a way to make inferential statements about preconceived predictor variables of interest (or preconceived groups of interest); this is in contrast to our work, which instead deals directly with variables that have been adaptively selected by the lasso procedure. We discuss this next.
6 What precisely is the null hypothesis?
The referees of a preliminary version of this manuscript expressed some confusion with regard to the null distribution considered by the covariance test. Given a fixed number of steps along the lasso path, the covariance test examines the set of variables selected by the lasso before the th step (i.e., is the current active set not including the variable to be added at the th step). In particular, the null distribution being tested is
where is the true underlying coefficient vector in the model (1). For , we have (no variables are selected before the first step), so this reduces to a test of the global null hypothesis: . For , the set is random (it depends on ), and hence the null hypothesis in (11) is itself a random event. This makes the covariance test a conditional hypothesis test beyond the first step in the path, as the null hypothesis that it considers is indeed a function of the observed data. Statements about its null distribution must therefore be made conditional on the event that , which is precisely what is done in Sections 3.2 and 4.2.
Compare the null hypothesis in (11) to a null hypothesis of the form
where is a fixed subset. The latter hypothesis, in (12), describes the setup considered by Zhang and Zhang 2014, Bühlmann 2013, van de Geer and Bühlmann 2013, Javanmard and Montanari 2013a (Javanmard and Montanari 2013a; Javanmard and Montanari 2013b). At face value, the hypotheses (11) and (12) may appear similar [the test in (11) looks just like that in (12) with ], but they are fundamentally very different. The difference is that the null hypothesis in (11) is random, whereas that in (12) is fixed; this makes the covariance test a conditional hypothesis test, while the tests constructed in all of the aforementioned work are traditional (unconditional) hypothesis tests. It should be made clear that the goal of our work and these works also differ. Our test examines an adaptive subset of variables deemed interesting by the lasso procedure; for such a goal, it seems necessary to consider a random null hypothesis, as theory designed for tests of fixed hypotheses would not be valid here. In principle, fixed hypothesis tests can be used along with the appropriate correction for multiple comparisons in order to test a random null hypotheses. Aside from being conservative, it is unclear how to efficiently carry out such a procedure when the random null hypothesis consists of a group of coefficients (as opposed to a single one). The main goal of Zhang and Zhang 2014, Bühlmann 2013, van de Geer and Bühlmann 2013, Javanmard and Montanari 2013a (Javanmard and Montanari 2013a; Javanmard and Montanari 2013b), it appears, is to construct a new set of variables, say , based on testing the hypotheses in (12) with for . Though the construction of this new set may have started from a lasso estimate, it need not be true that matches the lasso active set , and ultimately it is this new set (and inferential statements concerning ) that these authors consider the point of interest.
An orthogonal predictor matrix XX.
We examine the special case of an orthogonal predictor matrix , that is, one that satisfies . Even though the results here can be seen as special cases of those for a general in Section 4, the arguments in the current orthogonal case rely on relatively straightforward extreme value theory and are hence much simpler than their general counterparts (which analyze the knots in the lasso path via Gaussian process theory). Furthermore, the limiting distribution for the covariance statistic translates in the orthogonal case to a few interesting and previously unknown (as far as we can tell) results on the order statistics of independent standard variates. For these reasons, we discuss the orthogonal case in detail.
As noted in the discussion following Lemma 1 (see the first point), for an orthogonal , we know that the covariance statistic for testing the entry of the variable at step in the lasso path is
Again using orthogonality, we rewrite for a constant (not depending on ) in the criterion in (2), and then we can see that the lasso solution at any given value of has the closed-form:
Letting , , the knots in the lasso path are simply the values of at which the coefficients become nonzero (i.e., cease to be thresholded),
where are the order statistics of (somewhat of an abuse of notation). Therefore,
Next, we study the special case , the test for the first predictor to enter the active set along the lasso path. We then examine the case , the test at a general step in the lasso path.
Consider the covariance test statistic for the first predictor to enter the active set, that is, for ,
We are interested in the distribution of under the null hypothesis; since we are testing the first predictor to enter, this is
Under the null, are i.i.d., , and so follow a distribution (absolute value of a standard Gaussian). That has an asymptotic null distribution is now given by the next result.
Let be the order statistics of an independent sample of variates (i.e., they are the sorted absolute values of an independent sample of standard Gaussian variates). Then
This lemma reveals a remarkably simple limiting distribution for the largest of independent random variables times the gap between the largest two; we skip its proof, as it is a special case of the following generalization.
If are the order statistics of an independent sample of variates, then for any fixed ,
where is the standard normal CDF. We first compute
the last equality using Mills’ ratio. Theorem 2.2.1 in de Haan and Ferreira 2006 then implies that, for constants and ,
where is a standard exponential variate, so has the standard (or type I) extreme value distribution. Hence, according to Theorem 3 in Weissman 1978, for any fixed , the random variables and , , converge jointly:
where are independent, is Gamma distributed with scale parameter 1 and shape parameter , and are standard exponentials. Now note that
We claim that ; this would give the desired result as the second term converges to zero, using . Writing more explicitly, we see that , that is, , and . Using Mills’ inequalities,
Since , this means that , completing the proof.
Practically, Lemma 3 tells us that under the global null hypothesis , comparing the covariance statistic at the th step of the lasso path to an distribution is increasingly conservative [at the first step, is asymptotically , at the second step, is asymptotically , at the third step, is asymptotically , and so forth]. This progressive conservatism is favorable, if we place importance on parsimony in the fitted model: we are less and less likely to incur a false rejection of the null hypothesis as the size of the model grows. Moreover, we know that the test statistics at successive steps are independent, and hence so are the corresponding -values; from the point of view of multiple testing corrections, this is nearly an ideal scenario.
Of real interest is the distribution of , , not under the global null hypothesis, but rather, under the weaker null hypothesis that all variables excluded from the current lasso model are truly inactive (i.e., they have zero coefficients in the true model). We study this in next section.
2 A general step, k≥1k\geq 1.
We suppose that exactly components of the true coefficient vector are nonzero, and consider testing the entry of the predictor at step . Let denote the true active set (so ), and let denote the event that all truly active variables are added at steps ,
We show that under the null hypothesis (i.e., conditional on ), the test statistic is asymptotically , and further, the test statistic at a future step is asymptotically .
The basic idea behind our argument is as follows: if we assume that the nonzero components of are large enough in magnitude, then it is not hard to show (relying on orthogonality, here) that the truly active predictors are added to the model along the first steps of the lasso path, with probability tending to one. The test statistic at the st step and beyond would therefore depend on the order statistics of for truly inactive variables , subject to the constraint that the largest of these values is smaller than the smallest for truly active variables . But with our strong signal assumption, that is, that the nonzero entries of are large in absolute value, this constraint has essentially no effect, and we are back to studying the order statistics from a distribution, as in the last section. This is made precise below.
The same convergence in distribution holds conditionally on .
Note that , independently for . For ,
Hence, we are essentially back in the setting of the last section, and the desired convergence result follows from the same arguments as those for Lemma 3.
A general predictor matrix XX.
In this section, we consider a general predictor matrix , with columns in general position. Recall that our proposed covariance test statistic (5) is closely intertwined with the knots in the lasso path, as it was defined in terms of difference between fitted values at successive knots. Moreover, Lemma 1 showed that (provided there are no sign changes in the reduced lasso problem over ) this test statistic can be expressed even more explicitly in terms of the values of these knots. As was the case in the last section, this knot form is quite important for our analysis here. Therefore, it is helpful to recall [Efron et al. 2004; Tibshirani 2013] the precise formulae for the knots in the lasso path. If denotes the active set and denotes the signs of active coefficients at a knot ,
then the next knot is given by
where recall , and ; and
As we did in Section 3 with the orthogonal case, we begin by studying the asymptotic distribution of the covariance statistic in the special case (i.e., the first model along the path), wherein the expressions for the next knot (14), (15), (16) greatly simplify. Following this, we study the more difficult case . For the sake of readability, we defer the proofs and most technical details until the Appendix.
We assume here that has unit normed columns: , for ; we do this mostly for simplicity of presentation, and the generalization to a matrix whose columns are not unit normed is given in the next section (though the exponential limit is now a conservative upper bound). As per our discussion following Lemma 1 (see the second point), we know that the first predictor to enter the active set along the lasso path cannot leave at the next step, so the constant sign condition (8) holds, and by Lemma 1 the covariance statistic for testing the entry of the first variable can be written as
(the leading factor being equal to one since we assumed that has unit normed columns). Now let , , and . With , we have , and trivially, no variables can leave the active set. The first knot is hence given by (15), which can be expressed as
Letting be the first variable to enter and its sign (i.e., they achieve the maximum in the above expression), and recalling that cannot leave the active set immediately after it has entered, the second knot is again given by (15), written as
The general position assumption on implies that , and so , all , . It is easy to show then that the indicator inside the maximum above can be dropped, and hence
Our goal now is to calculate the asymptotic distribution of , with and as above, under the null hypothesis; to be clear, since we are testing the significance of the first variable to enter along the lasso path, the null hypothesis is
The strategy that we use here for the general case—which differs from our extreme value theory approach for the orthogonal case—is to treat the quantities inside the maxima in expressions (17), (18) for as discrete-time Gaussian processes. First, we consider the zero mean Gaussian process
We can easily compute the covariance function of this process:
where the expectation is taken over the null distribution in (19). From (17), we know that the first knot is simply
In addition to (20), we consider the process
An important property: for fixed , the entire process is independent of . This can be seen by verifying that
and noting that and , all , , are jointly normal. Now define
and from the above we know that for fixed , is independent of . If are instead treated as random variables that maximize (the argument maximizers being almost surely unique), then from (18) we see that the second knot is . Therefore, to study the distribution of , we are interested in the random variable
It turns out that this event, which concerns the argument maximizers of , can be rewritten as an event concerning only the relative values of and [see Taylor, Takemura and Adler 2005 for the analogous result for continuous-time processes].
With as defined in (20), (21), (22), we have
This is an important realization because the dual representation is more tractable, once we partition the space over the possible argument minimizers , and use the fact that is independent of for fixed . In this vein, we express the distribution of in terms of the sum
The terms in the above sum can be simplified: dropping for notational convenience the dependence on , we have
where , which follows by simply solving for in the quadratic equation . Therefore,
We now examine the term inside the braces in (4.1), the difference between a ratio of normal survival functions and ; our next lemma shows that this term vanishes as .
Hence, loosely speaking, if each fast enough as , then the right-hand side in (4.1) converges to zero, and converges weakly to . This is made precise below.
Consider defined in (21), (22) over and . If for any fixed
The assumption in (25) is written in terms of random variables whose distributions are induced by the steps along the lasso path; to make our assumptions more transparent, we show that (25) is implied by a conditional variance bound involving the predictor matrix alone, and arrive at the main result of this section.
and the size of growing faster than ,
An example of a matrix that does not satisfy (26) and (27) is one with fixed rank as grows. (This, of course, would also not satisfy the general position assumption.) In this case, we would not be able to find a subset of the variables , , that is both linearly independent and has size larger than , which violates the conditions. We note that in general, since , and , conditions (26) and (27) require that .
2 A general step, k≥1k\geq 1.
In this section, we no longer assume that has unit normed columns (in any case, this provides no simplification in deriving the null distribution of the test statistic at a general step in the lasso path). Our arguments here have more or less the same form as they did in the last section, but overall the calculations are more complicated.
Fix an integer , subset containing the true active set , and sign vector . Consider the event
First note that on , we have , and as discussed in the third point following Lemma 1, this implies that the solution of the reduced problem (4) on cannot incur any sign changes over the interval . Hence, we can apply Lemma 1 to write the covariance statistic on as
, and are the active set and signs at step , and is the variable added to the active set at step , with sign . Now, analogous to our definition in the last section, we define the discrete-time Gaussian process
For any fixed , the above process has mean zero provided that . Additionally, for any such fixed , we can compute its covariance function
Note that on the event , the th knot in the lasso path is
For fixed , we also consider the process
(above, is the concatenation of and ) and its achieved maximum value, subject to being less than the maximum of ,
If indeed maximize , that is, they correspond to the variable added to the active set at and its sign (note that these are almost surely unique), then on , we have . To study the distribution of on , we are therefore interested in the random variable
where we have replaced all instances of and on the right-hand side above with the fixed subset and sign vector . This is a helpful simplification, because in what follows we may now take and as fixed, and consider the distribution of the random processes and . With and fixed, we drop the notational dependence on them and write these processes as and . We also write the scaling factor as .
The setup in (4.2) looks very much like the one in the last section [and to draw an even sharper parallel, the scaling factor is actually equal to one over the variance of , meaning that is standard normal for fixed , a fact that we will use later in the proof of Lemma 8]. However, a major complication is that and are no longer independent for fixed . Next, we derive a dual representation for the event (34) (analogous to Lemma 4 in the last section), introducing a triplet of random variables —it turns out that is independent of this triplet, for fixed .
Let be as defined in (29) (with fixed at ). Let denote the covariance function of [short form for the expression in (30)]. To be perfectly clear, here actually depends on , but our notation suppresses this dependence for brevity. Define
the event in (34), that maximize , can be written as an intersection of events involving :
As a result of Lemma 7, continuing from (4.2), we can decompose the tail probability of as
A key point here is that, for fixed , the triplet , , is independent of , which is true because
and , along with , for all , form a jointly Gaussian collection of random variables. If we were to now replace by in the first line of (4.2), and define a modified statistic via its tail probability,
Consider as defined in (29) (with fixed at ), and as defined in (), (), (). Assume that for any fixed ,
Consider as defined in (29), (4.2), (4.2) (with fixed at ), and consider as defined in (). Then for any fixed , on the event in (34), we have
Though Lemma 9 establishes a (conservative) exponential limit for the covariance statistic , it does so by enforcing assumption (42), which is phrased in terms of the tail distribution of a random process defined at the th step in the lasso path. We translate this into an explicit condition on the covariance structure in (30), to make the stated assumptions for exponential convergence more concrete.
Assume that the diagonal elements in are all of the same order, that is, for all and some constant . Finally assume that, for each fixed , there is a set such that for all ,
where is a constant (not depending on ), and the size of grows faster than ,
Some readers will likely recognize condition (43) as that of mutual incoherence or strong irrepresentability, commonly used in the lasso literature on exact support recovery [see, e.g., Wainwright 2009, Zhao and Yu 2006]. This condition, in addition to a lower bound on the magnitudes of the true coefficients, is sufficient for the lasso solution to recover the true active set with probability tending to one, at a carefully chosen value of . It is important to point out that we do not place any requirements on the magnitudes of the true nonzero coefficients; instead, we assume directly that the lasso converges (with probability approaching one) to some fixed model defined by at the th step in the path. Here, is large enough that it contains the true support, , and the signs are arbitrary—they may or may not match the signs of the true coefficients over . In a setting in which the nonzero coefficients in are well separated from zero, a condition quite similar to the irrepresentable condition can be used to show that the lasso converges to the model with support and
signs , at step of the path. Our result extends beyond this case, and allows for situations in which the lasso model converges to a possibly larger set of “screened” variables , and fixed signs .
In fact, one can modify the above arguments to account for the case that does not contain the entire set of truly nonzero coefficients, but rather, only the “strong” coefficients. While “strong” is rather vague, a more precise way of stating this is to assume that has nonzero coefficients both large and small in magnitude, and with corresponding to the set of large coefficients, we assume that the (left-out) small coefficients must be small enough that the mean of the process in (29) (with and ) grows much faster than . The details, though not the main ideas, of the arguments would change, and the result would still be a conservative exponential limit for the covariance statistic at step . We may pursue this extension in future work.
Simulation of the null distribution.
We investigate the null distribution of the covariance statistic through simulations, starting with an orthogonal predictor matrix , and then considering more general forms of .
Figure 3 shows the results for testing the 5th, 6th and 7th predictors to enter the lasso model. An -based test will now be conservative: at a nominal level, the actual type I errors are about , and , respectively. The solid line has slope 1, and the broken lines have slopes , as predicted by Theorem 1.
2 General predictor matrix.
In Table 2, we simulated null data (i.e., ), and examined the distribution of the covariance test statistic for the first predictor to enter. We varied the numbers of predictors , correlation parameter , and structure of the predictor correlation matrix. In the first two correlation setups, the correlation between each pair of predictors was , in the data and population, respectively. In the setup, the correlation between predictors and is . Finally, in the block diagonal setup, the correlation matrix has two equal-sized blocks, with population correlation in each block. We computed the mean, variance and tail probability of the covariance statistic over simulated data sets for each setup. We see that the distribution is a reasonably good approximation throughout.
In Table 3, the setup was the same as in Table 2, except that we set the first coefficients of the true coefficient vector equal to 4, and the rest zero, for . The dimensions were also fixed at and . We computed the mean, variance, and tail probability of the covariance statistic for entering the next (truly inactive) st predictor, discarding those simulations in which a truly inactive predictor was selected in the first steps. (This occurred , and of the time, resp.) Again, we see that the approximation is reasonably accurate throughout.
In Figure 4, we estimate the power curves for significance testing via the drop in RSS test for forward stepwise regression, and the covariance test for the lasso. In the former, we use simulation-derived cutpoints, and in the latter we use the theoretically-based cutpoints, to control the type I error at the 5% level. We find that the tests have similar power, though the cutpoints for forward stepwise would not be typically available in practice. For more details, see the figure caption.
The case of unknown σ2\sigma^{2}.
Up until now, we have assumed that the error variance is known; in practice it will typically be unknown. In this case, provided that , we can easily estimate it and proceed by analogy to standard linear model theory. In particular,
This follows because , the numerator being asymptotically , the denominator being asymptotically , and we claim that the two are independent. Why? Note that the lasso solution path is unchanged if we replace by , so the lasso fitted values in are functions of ; meanwhile, is a function of . The quantities and are uncorrelated, and hence independent (recalling normality of ), so and are functions of independent quantities and, therefore, independent.
As an example, consider one of the setups from Table 2, with , and predictor correlation of the form . The true model is null, and we test the first predictor to enter along the lasso path. (We choose of roughly equal sizes here to expose the differences between the known and unknown cases.) Table 4 shows the results of 1000 simulations from each of the and scenarios. We see that with estimated, the distribution provides a more accurate finite-sample approximation than does .
When , estimation of is not nearly as straightforward; one idea is to estimate from the least squares fit on the support of the model selected by cross-validation. One would then hope that the resulting statistic, with this plug-in estimate of , is close in distribution to under the null, where is the size of the model chosen by cross-validation. This is by analogy to the low-dimensional case in (48), but is not supported by rigorous theory. Simulations (withheld for brevity) show that this approximation is not too far off, but that the variance of the observed statistic is sometimes inflated compared that of an distribution (this unaccounted variability is likely due to the model selection process via cross-validation). Other authors have argued that using cross-validation to estimate when is not necessarily a good approach, as it can be anti-conservative; see, for example, Fan, Guo and Hao 2012, Sun and Zhang 2012 for alternative techniques. In future work, we will address the important issue of estimating in the context of the covariance statistic, when .
Real data examples.
We demonstrate the use of covariance test with some real data examples. As mentioned previously, in any serious application of significance testing over many variables (many steps of the lasso path), we would need to consider the issue of multiple comparisons, which we do not here. This is a topic for future work.
Table 5 shows the results for the wine quality data taken from the UCI database. There are predictors, and observations, which we split randomly into approximately equal-sized training and test sets. The outcome is a wine quality rating, on a scale between 0 and 10. The table shows the training set -values from forward stepwise regression (with the chi-squared test) and the lasso (with the covariance test). Forward stepwise enters 6 predictors at the 0.05 level, while the lasso enters only 3.
In the left panel of Figure 5, we repeated this -value computation over 500 random splits into training test sets. The right panel shows the corresponding test set prediction error for the models of each size. The lasso test error decreases sharply once the 3rd predictor is added, but then somewhat flattens out from the 4th predictor onward; this is in general qualitative agreement with the lasso -values in the left panel, the first 3 being very small, and the 4th -value being about 0.2. This also echoes the well-known difference between hypothesis testing and minimizing prediction error. For example, the statistic stops entering variables when the -value is larger than about 0.16.
2 HIV data.
Rhee et al. (Rhee et al. 2003) study six nucleotide reverse transcriptase inhibitors (NRTIs) that are used to treat HIV-1. The target of these drugs can become resistant through mutation, and they compare a collection of models for predicting the (log) susceptibility of the drugs, a measure of drug resistance, based on the location of mutations. We focused on the first drug (3TC), for which there are sites and samples. To examine the behavior of the covariance test in the setting, we divided the data at random into training and test sets of size 150 and 907, respectively, a total of 50 times. Figure 6 shows the results, in the same format as Figure 5. We used the model chosen by cross-validation to estimate . The covariance test for the lasso suggests that there are only one or two important predictors (in marked contrast to the chi-squared test for forward stepwise), and this is confirmed by the test error plot in the right panel.
Extensions.
We discuss some extensions of the covariance statistic, beyond significance testing for the lasso. The proposals here are supported by simulations [in terms of having an null distribution], but we do not offer any theory. This may be a direction for future work.
The elastic net estimate [Zou and Hastie 2005] is defined as
with , . This means that for an orthogonal , under the null,
and one is tempted to use this approximation beyond the orthogonal setting as well. In Figure 7, we evaluated the distribution of (for the first predictor to enter), for orthogonal and correlated scenarios, and for three different values of . Here, , and the true model was null. It seems to be reasonably close to in all cases.
2 Generalized linear models and the Cox model.
This is the implicit concept used by Efron 1986 in his definition of the “optimism” of the training error. The same idea could be used to define degrees of freedom for the penalized estimate in (50) for any , and this motivates the definition of the covariance statistic, as follows. If the tuning parameter value marks the entry of a new predictor into the active set , then we define the covariance statistic
we can analogously define the covariance test statistic at a knot , marking the entry of a predictor into the active set , as
Discussion.
We proposed a simple covariance statistic for testing the significance of predictor variables as they enter the active set, along the lasso solution path. We showed that the distribution of this statistic is asymptotically , under the null hypothesis that all truly active predictors are contained in the current active set. [See Theorems 1, 2 and 3; the conditions required for this convergence result vary depending on the step along the path that we are considering, and the covariance structure of the predictor matrix ; the limiting distribution is in some cases a conservative upper bound under the null.] Such a result accounts for the adaptive nature of the lasso procedure, which is not true for the usual chi-squared test (or -test) applied to, for example, forward stepwise regression.
We feel that our work has shed light not only on the lasso path (as given by LARS), but also, at a high level, on forward stepwise regression. Both the lasso and forward stepwise start by entering the predictor variable most correlated with the outcome (thinking of standardized predictors), but the two differ in what they do next. Forward stepwise is greedy, and once it enters this first variable, it proceeds to fit the first coefficient fully, ignoring the effects of other predictors. The lasso, on the other hand, increases (or decreases) the coefficient of the first variable only as long as its correlation with the residual is larger than that of the inactive predictors. Subsequent steps follow similarly. Intuitively, it seems that forward stepwise regression inflates coefficients unfairly, while the lasso takes more appropriately sized steps. This intuition is confirmed in one sense by looking at degrees of freedom (recall Section 2.4). The covariance test and its simple asymptotic null distribution reveal another way in which the step sizes used by the lasso are “just right.”
The problem of assessing significance in an adaptive linear model fit by the lasso is a difficult one, and what we have presented in this paper by no means a complete solution. We describe some current work and ideas for future projects below.
Significance test for generic lasso models. A natural direction to consider is the generic lasso testing problem: given a lasso model computed at some fixed value of , how do we carry out a significance test for each predictor in the active set? Work on this is in progress.
Nonasymptotic null distributions. A geometric characterization of the first knot in the lasso path provides an alternative test for the global null hypothesis, . When all predictors have unit norm, , for , this test has the form
Remarkably, this above result is exact (nonasymptotic), valid for any and , requiring (essentially) only Gaussianity of the errors, and no real assumptions about the matrix . For most reasonably behaved predictor matrices , the approximation agrees closely with this test. Details are in Taylor, Loftus and Tibshirani 2013. Work to extend this formula to subsequent steps along the solution path, that is, to test a hypothesis beyond the global null, is underway.
Generalizations to other penalties and models. The manuscript of Taylor, Loftus and Tibshirani 2013 applies to a regularized regression setting with a general seminorm penalty, and derives explicit results for the group lasso and nuclear norm penalties (in addition to the lasso penalty). The nuclear norm result yields a test for principal components and matrix completion. The recent work of Grazier G’Sell, Taylor and Tibshirani 2013 studies the covariance test for graphical models, based on a sparse estimate of the inverse covariance matrix.
Sequential procedures with false discovery rate control. It is also interesting to consider how the sequence of covariance test -values can be used to construct a sequential test with good power properties, and a guaranteed bound on its false discovery rate. A number of such approaches are proposed in Grazier G’Sell et al. 2013.
Proper -values for forward stepwise. Perhaps surprisingly, a test analogous to the covariance test can be used in forward stepwise regression, to construct valid -values for this greedy procedure. This work is in progress.
Other related problems include: estimation of when , in the context of the covariance test; power calculations and confidence interval estimation; theory for linear models having strong and weak signals (large and small true coefficients); theory for the elastic net, generalized linear models, and the Cox model.
As is clear from the above discussion, the covariance test work has created much excitement and activity among our close collaborators and students. It is our hope that the current paper will also broadly stimulate other researchers’ interest in this area, and that at some point, the joint efforts of the community will yield a full set of inferential tools for the lasso and other commonly used adaptive procedures.
Appendix
By continuity of the lasso solution path at ,
From this, we can obtain two identities: the first is
obtained by squaring both sides in (56) (more precisely, taking the inner product of the left-hand side with itself and the right-hand side with itself), and noting that ; the second is
obtained by taking the inner product of both sides in (56) with , and then using (57). Plugging (57) and (.1) in for the first and second terms in (2.3), respectively, then gives the result in (9).
.2 Proof of Lemma 4.
the first step following since , and the second step following from the definition of . The intersection of the right-hand side above, over all , is equivalent to
But the former inequality is the same as , because and have opposite signs. Further, the inequality is redundant, as . This gives the result.
.3 Proof of Lemma 5.
where is the standard normal density. First, note that
Also, a straightforward calculation shows
where in the last step we used the fact that , again by l’Hôpital’s rule. Therefore, , which completes the proof.
.4 Proof of Lemma 6.
Fix , and choose large enough that
Above, the term multiplying is equal to 1, and the second term can be made arbitrarily small (say, less than ) by taking sufficiently large.
.5 Proof of Theorem 2.
We will show that for any fixed and ,
where is as in the theorem for , with size , and is a constant (not depending on ). This would imply that
where we used the fact that by (27). The above sum tending to zero now implies the desired convergence result by Lemma 6, and hence it suffices to show (59). To this end, consider
where in both inequalities above we used the fact that . We can therefore use the bound
where we define for . Let , and without a loss of generality, let . We will show that
for , by induction; this would complete the proof, as it would imply (59). Before presenting this argument, we note a few important facts. First, the condition in (26) is really a statement about conditional variances:
where recall that , . Second, since are jointly normal, we have
Now we give the inductive argument for (60). For the base case, note that , where its variance is
the second equality is due to the independence of and , and the last inequality comes from the fact that conditioning can only decrease the variance, as stated above in (.5). Hence,
We have, using the independence of and ,
and here we again used the fact that conditioning further can only reduce the variance, as in (.5). Therefore,
.6 Proof of Lemma 7.
We now handle division by in three cases:
if , then
if , then
if , then
Using this breakdown, we see that the statement for all is then equivalent to
Noting that and must have opposite signs, the above is equivalent to
.7 Proof of Lemma 8.
Define and . Exactly as before (dropping for simplicity the notational dependence of on ),
Note that we have dropped the inequality from each term, as it is implied by the first inequality . We can upper bound the right-hand side above by replacing with
because for all and . Furthermore, Lemma 10 (Appendix .10) shows that indeed for fixed , and hence is standard normal for fixed . Therefore,
with the joint distribution of ,, , and we used the fact that is independent of for fixed . From (.7),
the last equality following by Lemma 7 (i.e., each term in the last sum is exactly the probability of maximizing ). We show in Lemma 11 (Appendix .11) that
provided that . Hence, fix , and choose sufficiently large, so that for each ,
Note that the first term on the right-hand side above is , and the second term is
.8 Proof of Lemma 9.
For now, we reintroduce the notational dependence of the process on , as this will be important. We show in Lemma 12 (Appendix .12) that for any fixed ,
and hence on the event , since we have ,
This means that (now we return to writing as , for brevity)
.9 Proof of Theorem 3.
where is as in the statement of the theorem for , with size , and is a constant (not depending on ). Also, as in the proof of Lemma 8, we abbreviated . This bound would imply that
since . The above sum converging to zero is precisely the condition required by Lemma 9, which then gives the desired (conservative) exponential limit for . Hence, it is suffices to show (67). For this, we start by recalling the definition of in ():
The first implication uses the assumption (43), as and , and
the second simply follows from the definition of and . Therefore,
and for . By the arguments given in the proof of Lemma 12, we can rewrite the right-hand side above, yielding
where the last two inequalities above follow as for all , which itself follows from the assumption that for all , in (46). Hence,
where . Writing without a loss of generality and , it now remains to show that
Similar to the arguments in the proof of Theorem 2, we will show (69) by induction, for the constant . Before this, it is helpful to discuss three important facts. First, we note that (44) is actually a lower bound on the ratio of conditional to unconditional variances:
Second, conditioning on a smaller set of variables can only increase the conditional variance:
give the inductive argument for (69). For the base case, we have , where
Above, in the second equality, we used that and are independent, and in the last inequality, that conditioning on fewer variables (here, none) only increases the variance. This means that
where is standard normal; note that in the last inequality above, we applied the upper bound
Using the independence of and ,
where we again used the fact that conditioning on a smaller set of variables only makes the variance larger. Finally,
where we used as above, and so
.10 Statement and proof of Lemma 10.
For any fixed , and any , , we have
where denotes the concatenation of and .
The right-hand side above, after a straightforward calculation, is shown to be equal to
Now let . In block form,
Solving for in the first row yields
Solving for in the second row of (73) gives
Plugging this value into (74) produces the left-hand side in (71), completing the proof.
.11 Statement and proof of Lemma 11.
If satisfies , then for any ,
First note, using a Taylor series expansion of , that for sufficiently large ,
Also, a simple calculation shows that for all , so that
where the first inequality follows from (76), and the second from (75) (assuming is large enough). Continuing from the last upper bound,
It is clear that as . Fixing , choose large enough so that for all , we have . Then the term multiplying on the right-hand side in (.11), for , is
which shows that the right-hand side in (.11) is , and completes the proof.
.12 Statement and proof of Lemma 12.
For any fixed (and fixed , we have
where denotes the covariance between and ,
Simple manipulations of the left-hand side in (78) yield the expression
where . Now it remains to show that (79) is equal to
We show individually that the numerators and denominators in (79) and (80) are equal. First the denominators: starting with (79), notice that
By the well-known formula for partial regression coefficients,
that is, is the th coefficient in the regression of on . Hence, to show that (.12) is equal to the denominator in (80), we need to show that gives the coefficients in in the regression of on . This follows by simply noting that the coefficients satisfy the equation
Now for the numerators: again beginning with (79), its numerator is
and by essentially the same argument as above, we have
therefore, (82) matches the numerator in (80).
Acknowledgements.
We thank Jacob Bien, Trevor Hastie, Fred Huffer and Larry Wasserman for helpful comments.