Submitted to Biometrika

Selective inference with unknown variance via the
square-root LASSO

arXiv:1504.08031v2 [math.ST] 9 Feb 2017

Xiaoying Tian, and Joshua R. Loftus, and Jonathan E. Taylor
Department of Statistics
Stanford University
Stanford, California
e-mail: xtian@stanford.edu,
joftius@stanford.edu
Abstract: There has been much recent work on inference after model selection when the
noise level is known, however, σ is rarely known in practice and its estimation is difficult in
high-dimensional settings. In this work we propose using the square-root LASSO (also known
as the scaled LASSO) to perform selective inference for the coefficients and the noise level
simultaneously. The square-root LASSO has the property that choosing a reasonable tuning
parameter is scale-free, namely it does not depend on the noise level in the data. We provide
valid p-values and confidence intervals for the coefficients after selection, and estimates for
model specific variance. Our estimates perform better than other estimates of σ 2 in simulation.
AMS 2000 subject classifications: Primary 62F03, 62J07; secondary 62E15.
Keywords and phrases: lasso, square root lasso, confidence interval, hypothesis test, model
selection.

1. Introduction
Selective inference differs from classical inference in regression. Given y ∈ Rn , X ∈ Rn×p we first
choose a model by selecting some subset E of the columns of X. Denoting this model submatrix
XE , we proceed with the related regression model
2
y = XE βE + ,  ∼ N (0, σE
I),

(1.1)

and conduct the usual types of inference considered in regression such as hypothesis tests and
confidence intervals.
2
Most previous literature (Taylor et al. 2013, Lee et al. 2013, Taylor et al. 2014) assumes that σE
is known. This is problematic for two reasons: first, it is almost never known in practice; second,
the noise level σE as posited above is specific to the model we choose. As we choose the variables
E with data, it is not generally easy to get an independent estimate of σE . In this work we propose
a method that will treat σE as one of the parameters for inference and adjust for selection.
Our method is both valid in theory and practice. We illustrate the latter through comparisons
2
of estimates of σE
with Sun & Zhang (2011), Reid et al. (2013), and FDR control and power with
Barber & Candes (2016).

1
imsart-generic ver. 2014/10/16 file: paper.tex date: February 13, 2017

Tian et al./Selective inference with unknown variance

2

1.1. The Square-root LASSO and its tuning parameters
The selection procedure we use is based on the square-root LASSO Belloni et al. (2010), which in
turn is known to be equivalent to the scaled LASSO Sun & Zhang (2011).
β̂λ = arg min ky − Xβk2 + λ · kβk1 .

(1.2)

β∈Rp

The square-root LASSO is a modification of the LASSO Tibshirani (1996):
1
β̃γ = arg min ky − Xβk22 + γ · kβk1 .
β∈Rp 2

(1.3)

The first advantage of using square-root LASSO is the convenience in choosing λ. For the LASSO,
a good choice of γ depends on the noise variance σE , Negahban et al. (2012)
γ = 2 · E(kX T k∞ ),

2
 ∼ N (0, σE
I)

(1.4)

In practice, we might consider some multiple other than 2. As λ1 = λ1 (X, y), the first knot on the
solution path of (1.3), is equal to kX T yk∞ , the choice of tuning parameter can be viewed as some
2
multiple of the expected threshold at which noise with variance σE
would enter the LASSO path.
Unlike the LASSO, an analogous choice of tuning parameter λ for square-root LASSO does not
depend on σE ,


kX T k∞
,
 ∼ N (0, I)
(1.5)
λ=κ·E
kk2
for some unitless κ. Below, we typically use κ ≤ 1.
Any spherically symmetric distribution yields the same choice of λ which makes the above choice
of tuning parameter independent of the noise level σE . That λ is independent of σE also follows from
the convex program (1.2) since the first term and the second term in the optimization objective are
of the same order in σE .
1.2. Model selection by square-root LASSO
Both the LASSO and square-root LASSO can be viewed as model selection procedures. In what
follows we make the assumption that the columns of X are in general position to ensure uniqueness
of solutions Tibshirani (2013). We define the selected model of the square-root LASSO as
n
o
Êλ (y) = j : β̂j,λ (y) 6= 0
(1.6)
and the selected signs
n
o
ẑE,λ (y) = sign β̂j,λ (y) : β̂j,λ (y) 6= 0 .

(1.7)

To ease notation, we use the shorthands
β̂(y) = β̂λ (y),

Ê = Êλ (y),

ẑÊ = ẑE,λ (y).

(1.8)

In Section 2 we investigate the KKT (Karush-Kuhn-Tucker) conditions for the program (1.2).
As in the LASSO case, the KKT conditions provide the basic description for the selection event on
which selective inference is based.
imsart-generic ver. 2014/10/16 file: paper.tex date: February 13, 2017

Tian et al./Selective inference with unknown variance

3

1.3. Selective inference
The selective inference framework described in Fithian et al. (2014) attempts to control the selective
type I error rate (1.9). This is defined in terms of a pair of a model and an associated hypothesis
(M, H0 ), and a critical function φ(M,H0 ) to test H0 ⊂ M vs. Ha = M \ H0 . The selective type I
error is


PM,H0 (reject H0 | (M, H0 ) selected) = EM,H0 φ(M,H0 ) (y) |(M, H0 ) ∈ Q̂(y) ,
(1.9)
where we use the notation Q̂ to denote the model selection procedure that depends on the data.
The process Q̂ determines a map taking a distribution P ∈ M to


P · (M, H0 ) ∈ Q̂ .
(1.10)
We call such distributions selective distributions. Inference is carried out under these distributions.
In this paper, we consider the models and hypotheses

2
2
M = Mu,E = N (XE βE , σE
I) : βE ∈ RE , σE
≥0 ,
H0 = {βE : βj,E = 0} , j ∈ E. (1.11)
The setup of selective inference is such that we select the model Mu,E based on a set of variables
Ê selected by the data as in (1.6). More specifically,
o
n
Q̂(y) = Q̂u,λ (y) = (Mu,Ê , {βÊ : βj,Ê = 0}) : j ∈ Ê .
(1.12)
One of the take-away messages from Fithian et al. (2014) is that there is a concrete procedure to
form valid tests that controls (1.9) when M is an exponential family, and the null hypotheses can be
expressed in terms of a one-parameter subfamily of the natural parameter space of the exponential
family. More specifically, we have the following lemma.
T
2
y, ky 2 k) are the sufficient statis, (XE
Lemma 1. For the regression model (1.11) with unknown σE

β
βE
1
tics for the natural parameters σ2 , σ2 . Furthermore, to test hypothesis H0 : σj,E
= θ, for any
2
E
E
E
j ∈ E, we only need to consider the law


T
L(Mu,E ,H0 ) XjT y | kyk2 , XE\j
y, (Mu,E , H0 ) ∈ Q̂(y) .
(1.13)
2
Similarly, the following law can be used for inference of σE
,


T
2
L(Mu,E ,σE2 ) kyk2 | XE
y, (Mu,E , σE
) ∈ Q̂(y) .

(1.14)

Proof. The proof is a direct application of Theorem 5 in Fithian et al. (2014). We have (U (y), V (y)) =
T
(XjT y, (kyk2 , XE\j
y)) for inference of

2
βj,E
2 ,
σE

T
2
and (U (y), V (y)) = (kyk2 , XE
y) for inference of σE
.

Thus, by studying the distributions (1.13) and (1.14), we will be able to perform inference after
selection via the square-root LASSO. To gain insight for the law in (1.13), we first look at the
simple case where there is no selection. If there were no selection, the above law is simply the law
of the T -statistic with degrees of freedom n − |E|,
†
eTj XE
y
†
σ̂E · keTj XE
k2

,

imsart-generic ver. 2014/10/16 file: paper.tex date: February 13, 2017

Tian et al./Selective inference with unknown variance

where
2
σ̂E
=

k(I − PE )yk2
,
n − |E|

†
T
T
XE
= (XE
XE )−1 XE
,

4

†
PE = XE XE
.

The selection event is equivalent to {Ê(y) = E} in the context of this paper, where Ê is defined
in (1.6). We can explicitly describe the selection procedure if we further condition on the signs zE ,
that is instead of conditioning on the event {Ê(y) = E}, we condition on the event {(Ê(y), ẑÊ (y)) =
(E, zE )} in the laws (1.13) and (1.14). Procedures valid under such laws are also valid under those
conditioned on {Ê(y) = E} since we can always marginalize over ẑÊ . Therefore, for computational
reasons we always condition on {(Ê(y), ẑÊ (y)) = (E, zE )}.
We describe the distributions in (1.13) in detail in Section 3. We will see that they are truncated
T distributions with the degrees of freedom n − |E|. Based on these laws, we construct exact tests
for the coefficients βE . Given that the appropriate laws in the case of σ known are truncated
Gaussian distributions, it is not surprising that the appropriate distributions here are truncated
T distributions. To construct selective intervals, we suggest a natural Gaussian approximation
to the truncated T distribution and investigate its performance in a regression problem. Such
approximation brought much convenience in computation.
1.4. Organization
2
unknown is possible in the
The take-away message of this paper is that selective inference with σE
n < p scenario using the square-root LASSO. In Section 2 we describe the square-root LASSO in
more detail. In particular, we describe the selection events
n
o
y : (Ê(y), ẑÊ (y)) = (E, zE ) ,
E ⊂ {1, . . . , p}, zE ∈ {−1, 1}E .
(1.15)

Following this, in Section 3 we turn our attention to the main inferential tools, the laws (1.13) and
2
in the selected
(1.14), which allow us to perform inference for the coefficients βE and variance σE
model. As an application of the p-values obtained in Section 3, we applied the BHq procedure
Benjamini & Hochberg (1995) to these p-values and compare the FDR control and power to another
method designed to control FDR. In Section 4, we also compare the performance of our variance
estimators σ̂ 2 with other estimates of the variance.
2. The Square Root LASSO
We now use the Karush-Kuhn-Tucker (KKT) conditions to describe the selection event. Recall the
convex program (1.2)
β̂(y) = β̂λ (y) = arg min ky − Xβk2 + λ · kβk1
(2.1)
β∈Rp

as well as our shorthand for the selected variables and signs (1.6), (1.7).
The KKT conditions characterize the solution as follows: (β̂(y), ẑ) is the solution and corresponding subgradient of (2.1) if and only if
X T (y − X β̂(y))

= λ · ẑ
ky − X β̂(y)k2
(
sign(β̂j (y)) if j ∈ Ê(y)
ẑj ∈
[−1, 1]
if j 6∈ Ê(y).

(2.2)
(2.3)

imsart-generic ver. 2014/10/16 file: paper.tex date: February 13, 2017

Tian et al./Selective inference with unknown variance

5

We see that our choice of shorthand for ẑÊ corresponds to the Ê(y) coordinates of the subgradient
of the `1 norm.
Our first observation, which we had not found in the literature on square-root LASSO, is that
square-root LASSO and LASSO have equivalent solution paths. In other words, the square-root
LASSO solution path is a reparametrization of the LASSO solution path. Specifically,
Lemma 2. For every (E, zE ), on the event {(Ê(y), ẑÊ (y)) = (E, zE )} the solutions of the LASSO
and square-root LASSO are related as
β̂(y) = β̂λ (y) = β̃γ̂(y) (y)
where

γ̂(y) = λσ̂E (y) ·
and
2
σ̂E
(y) =

n − |E|
T )† z k2
1 − λ2 k(XE
E 2

(2.4)
1/2

†
k(I − XE XE
)yk22
k(I − PE )yk22
=
n − |E|
n − |E|

(2.5)

(2.6)

2
is the usual ordinary least squares estimate of σE
in the model Mu,E .

Proof. On the event in question, we can rewrite the KKT conditions using the fact X β̂ = XE β̂E as
T
XE
(y − XE β̂E (y)) = cE (y) · λ · zE

(2.7)

T
X−E
(y − XE β̂E (y)) = cE (y) · λ · z−E

(2.8)

sign(β̂E (y)) = zE ,

kẑ−E k∞ < 1

(2.9)

with
cE (y) = ky − XE β̂E (y)k2 .
Comparing (2.7) with the KKT conditions of LASSO in Lee et al. (2013), this indicates γ̂(y) =
λcE (y). We deduce from (2.7) that the active part of the coefficients
T
T
β̂E (y) = (XE
XE )−1 (XE
y − λ · cE (y) · zE ).

(2.10)

Plugging the estimate β̂E (y),
T †
y − XE β̂E (y) = (I − PE )y + λ · cE (y) · (XE
) zE .

(2.11)

Computing the squared Euclidean norm of both sides yields
k(I − PE )yk22
T )† z k2
1 − λ2 k(XE
E 2
n
− |E|
2
= σ̂E
(y) ·
.
T )† z k2
1 − λ2 k(XE
E 2

c2E (y) =

imsart-generic ver. 2014/10/16 file: paper.tex date: February 13, 2017

Tian et al./Selective inference with unknown variance

6

2.1. A first example
Before we move on to the general case, it is helpful to look at the characterization of the selection
event in the case of an orthogonal design matrix. When the design matrix X ∈ Rn×p has orthogonal
columns, β̂E and cE can be simplified as
s
n − |E|
T
.
β̂E = XE
y − λcE zE , cE = σ̂E ·
1 − λ2 |E|
The selection event

n
o
y : sign(β̂E (y)) = zE ,

is decoupled into |E| constraints. For each i ∈ E,
s
zi xTi y
n − |E|
≥λ
.
σ
bE (y)
1 − λ2 |E|

(2.12)

The left-hand side of (2.12) is closely related to the inference on βi , and follows a T -distribution
with n − |E| degrees of freedom. The constraint (2.12) is a constraint on the usual T -statistic on
the selection event which implies one should use the truncated T distribution to tests whether or
not βi = 0.
2.2. Characterization of the selection event
We now describe the selection event for general design matrices, which will be used for deriving the
laws (1.13) and (1.14). Using Equation (2.10) in Lemma 2, we see that the event
n
o
y : sign(β̂E (y)) = zE
(2.13)
is equal to the event
{y : σ̂E (y) · αi,E − zi,E · UE,i (y) ≤ 0, i ∈ E}
where
UE,i (y) =

(2.14)

†
eTi XE
y
†
keTi XE
k2

and
†
T †
T
αi,E = λ · zi,E · keTi XE
k2 · (1 − λ2 k(XE
) zE k22 )−1/2 eTi (XE
XE )−1 zE .
T
While the expression is a little involved, it is explicit and easily computable given (XE
XE )−1 .
Let us now consider the inactive inequalities. The event

{y : kẑ−E k∞ < 1}

(2.15)

is equal to the event


XiT (I − PE )y
T †
y:
+ XiT (XE
) zE < 1,
λ · cE (y)


i ∈ −E .

(2.16)

imsart-generic ver. 2014/10/16 file: paper.tex date: February 13, 2017

Tian et al./Selective inference with unknown variance

7

For each i ∈ −E these are equivalent the intersection of the inequalities


T †
1 − λ2 k(XE
) zE k22
2
λ

1/2



T †
1 − λ2 k(XE
) zE k22
2
λ

1/2

T †
XiT U−E (y) < 1 − XiT (XE
) zE

(2.17)
XiT U−E (y)

where
U−E (y) =
To summarize, the selection event

> −1 −

T †
XiT (XE
) zE .

(I − PE )y
.
k(I − PE )yk2

(2.18)

n
o
y : (Ê(y), ẑÊ (y)) = (E, zE ) is equivalent to (2.14) and

(2.17).
3. The conditional law
From the characterization of the selection event in the above section we can now derive the laws
(1.13) and (1.14). First, the following lemma provides some simplification.

Lemma 3. Conditioning on (Ê(y), ẑÊ (y)) = (E, zE ), the law for inference of σβE2 , σ12 is equivalent
E
E
to


QE,zE = L UE (y), k(I − PE )yk2 | σ̂E · αi,E − zi,E · UE,i ≤ 0, i ∈ E .
(3.1)
Moreover, the statistic U−E is ancillary for both PE ∈ Mu,E and QE,zE .
Therefore, the laws (1.13) and (1.14) can be simplified to


L UE,j (y) | kyk2 , UE,E\j (y), σ̂E · αi,E − zi,E · UE,i ≤ 0, i ∈ E ,
and
 2

L σ̂E
(y) | UE (y), σ̂E · αi,E − zi,E · UE,i ≤ 0, i ∈ E .
respectively.
T
y, kyk2 ) are sufficient statistics for
Proof. Per Lemma 1, (XE

linear transformation of

T
XE
y

βE
1
2 , σ2
σE
E



. Moreover, note UE (y) is

and

kyk2 = kPE yk2 + k(I − PE )yk2 ,

T
T
PE = XE (XE
XE )−1 XE
,

thus it suffices to consider the law of (UE (y), k(I − PE )yk2 ) conditioning on {(Ê(y), ẑÊ (y)) =
(E, zE )}.
Moreover, the selection event can be described in two sets of constraints, the ones involving
UE (y) in (2.14) and the ones involving U−E (y) in (2.17). Notice that U−E (y) is independent of
2
(UE (y), σ̂E
(y)), thus we can drop it in the conditional distribution and get (3.1).
We note that U−E (y) is ancillary for PE . From the above, the density of QE,zE is that of PE
times an indicator function that does not involve U−E (y). Thus U−E (y) is ancillary for QE,zE as
well.
The simplification of the joint laws leads to that of the marginal laws and the second statement
holds.
imsart-generic ver. 2014/10/16 file: paper.tex date: February 13, 2017

Tian et al./Selective inference with unknown variance

8

3.1. Inference under quasi-affine constraints
The general form of the law QE,zE in (3.1) is that of a multivariate Gaussian and an independent
χ2 of degrees of freedom n − |E| and satisfying some constraints. These constraints are affine in the
Gaussian fixing the χ2 , but not affine in the data. To study the distributions under such constraints,
we propose the following framework for these quasi-affine constraints.
Specifically, we want to study the distribution of y ∼ N (µ, σ 2 I) subject to quasi-affine constraints
Cy ≤ σ̂P (y) · b
with
σ̂P2 (y) =

(3.2)

k(I − P )yk22
Tr(I − P )

where P is a projection matrix, C ∈ Rd×p , b ∈ Rd and
CP = P,

P µ = µ.

(3.3)

Assumptions (3.3) are made to simplify notation. Inference for quasi-affine constraints without
these assumptions can be deduced similarly. In the example of inference after square-root Lasso,
assumptions (3.3) are satisfied when we select the correct model E. We denote the above laws as
MC,b,P , that is
∆

y ∼ N (µ, σ 2 I).

P(y ∈ A|Cy ≤ σ̂P (y) · b) = M(C,b,P ) (A),

Our goal is exact inference for η T µ, for the directional vector η satisfying P η = η. Without loss
of generality we assume kηk22 = 1. To test the null hypothesis H0 : η T µ = θ, we parametrize the
data into η T y, the projection onto the direction η, and the orthogonal direction (P − ηη T )y. From
the assumptions (3.3), with some algebra, we can see that η T y is a sufficient statistic for η T µ, with
((P − ηη T )y, kyk2 ) being a sufficient statistic for the nuisance parameters. In the following, we will
prove the law
η T y − θ (P − ηη T )y, ky − θηk22
y ∼ M(C,b,P ) .
(3.4)
is a truncated T with degrees of freedom Tr(I − P ) and an explicitly computable truncation set.
For some set Ω ⊂ R let Tν|Ω denote the distribution function of the law of Tν |Tν ∈ Ω :
Tν|Ω (t) = P(Tν ≤ t|Tν ∈ Ω).

(3.5)

Theorem 4 (Truncated t). Suppose that y ∼ M(C,b,P ) . The law
ηT y − θ

D

(P − ηη T )(y − θη), ky − θηk22 = TTr(I−P )|Ω

(3.6)

where
Ω = Ω(C, b, P, k(I − P )yk22 + (η T y − θ)2 , (P − ηη T )y, θ).

(3.7)

The precise form of Ω is given in (3.8) below.
Proof. We use the short hand for the sufficient statistics
(Uθ , V, Wθ )(y) = (η T y − θ, (P − ηη T )y, k(I − (P − η T η))(y − θη)k22 ).

imsart-generic ver. 2014/10/16 file: paper.tex date: February 13, 2017

Tian et al./Selective inference with unknown variance

9

Since
Wθ (y) = ky − θηk2 − k(P − ηη T )yk2 ,
conditioning on (V, ky − θηk2 ) is equivalent to conditioning on (V, Wθ ).
Our main strategy is to construct a test statistic independent of (V, Wθ ), this can be easily done
through the usual T-statistic,
ηT y − θ
.
τθ (y) =
σ̂P (y)
Let d = Tr(I − P ), so
Wθ (y) = k(I − P )yk22 + (η T y − θ)2 = d · σP (y)2 + (η T y − θ)2 .
Note that τθ is independent of Wθ and V .
We next rewrite the quasi-affine inequalities (3.2) as
Uθ (y)ν + ξ ≤ σP (y)b
with
ν = Cη
ξ = ξ(V (y)) = C(θη + V (y)).
Multiplying both sides by

1/2

Wθ (y)
σP (y)

, we have

τθ (y)Wθ (y)1/2 ν + ξ(V (y)) ·

q

d + τθ2 (y) ≤ Wθ (y)1/2 b.

This is the constraint on the T -distribution.
Because of the independence between τθ (y) and (V (y), Wθ (y)), its distribution is simply a truncated T -distribution, Td|Ω , where
o
n
p
\
√
√
Ω(C, b, P, w, v, θ) =
(3.8)
t ∈ R : t w · νi + ξi (v) · d + t2 ≤ w · b
1≤i≤nrow(A)

and d, ξ(v) are as above. Each individual inequality can be solved explicitly, with each one yielding at
most 2 intervals. In practice, we have observed the intersection of the above is not too complex.
Remark 5. Following Lemma 3, we conduct selective inference with the quasi-affine constraints of
square-root Lasso, where
†
T
C = − diag(zE ) diag((XE
XE )−1 )XE
,

P = PE ,

b = −α.

†
To test hypothesis H0 : βj,E = 0, we take η = ej XE
.

3.2. Inference for σ and debiasing under M(C,b,P )
The law M(C,b,P ) is parametric, and in the context of model selection we have observed y inside
the set
Cy ≤ σ̂P (y) · b.
imsart-generic ver. 2014/10/16 file: paper.tex date: February 13, 2017

Tian et al./Selective inference with unknown variance

10

†
The usual OLS estimates XE
y are biased under M(C,b,P ) = M(C,b,P ) (µ, σ 2 ). In this parametric
setting, there is a natural procedure to attempt to debias these estimators.
If we fix the sufficient statistics to be T (y) = (P y, kyk22 ), then the natural parameters of the laws
in M(C,b,P ) are (µ/σ 2 , −(2σ 2 )−1 ). Solving the score equations
Z
T (z) M(C,b,P );(µ,σ2 ) (dz) − T (y) = 0
(3.9)
Rn

for (µ̂(y), σ̂ 2 (y)) corresponds to selective maximum likelihood estimation under M(C,b,P ) . In the
orthogonal design and known variance setting, this problem was considered by Reid et al. (2013).
In our current setting, this requires sampling from the constraint set, which is generally non-convex.
Instead, we consider estimation of each parameter separately based on a form of pseudo-likelihood.
Unfortunately, in the unknown variance setting, this approach yields estimates either for coordinates
of µ/σ 2 or σ 2 rather than coordinates of µ itself. We propose estimating σ 2 using pseudo-likelihood
and plugging in this value to a quantity analogous to M(C,b,P ) but with known variance, i.e. the
law of y ∼ N (µ, σ 2 I), P µ = µ with σ 2 known subject to an affine constraint. This approximation
is discussed in Section 4.2 below.
The pseudo-likelihood is based on the law of one sufficient statistic conditional on the other
sufficient statistics. Therefore, to estimate σ 2 we consider the likelihood based on the law
k(I − P )yk22 P y,

y ∼ M(C,b,P );(µ,σ2 ) .

(3.10)

This law depends only on σ 2 and can be used for exact inference about σ 2 , though for the parameter
σ 2 an estimate is perhaps more useful than selective tests or selective confidence intervals.
Direct inspection of the inequalities yield that this law is equivalent to σ 2 · χ2Tr(I−P ) truncated
to the interval [L(P y), U (P y)] where
(Cy)i
bi
(Cy)i
U (P y) = min
.
i:bi ≤0
bi
L(P y) = max

i:bi ≥0

(3.11)

For Ω ⊂ R, let Gν,σ2 ,Ω denote the law σ 2 · χ2ν truncated to Ω

Gν,σ2 ,Ω (t) = P χ2ν ≤ t|χ2ν ∈ Ω/σ 2 .
The pseudo-likelihood estimate σ̂P L (y) for σ 2 is the root of
σ 7→ HTr(I−P ) (L(P y), U (P y), σ 2 ) − σ̂P2 (y)
where
Hν (L, U, σ 2 ) =

1
ν

(3.12)

Z
t Gν,σ2 ,[L,U ] (dt).
[0,∞)

This is easily solved by sampling from σ 2 χ2Tr(I−P ) truncated to [L(P y), U (P y)].
This procedure is illustrated in Figure 1a. Note that for observed values of σ̂P2 (y) near the
truncation boundary the estimate varies quickly with σ̂P2 (y) due to the plateau at the upper limit.
We remedy this in two simple steps. First, we use a regularized estimate of σ under this pseudolikelihood. Next, we apply a simple bias correction to this regularized estimate so that when [L, U ] =
imsart-generic ver. 2014/10/16 file: paper.tex date: February 13, 2017

Tian et al./Selective inference with unknown variance

50

50

45

45

σ̂2

P (y)

30
25
20
15
10
4

p

2
2
40 σ̂P (y) +σ̂P (y)/ 100

p

35

H100(0,40,σ2 ) + σ2 / 100

H100(0,40,σ2 )

40

11

35

30
25
20
15

5

6

σ̂PL(y) =6.46
7

σ

8

9

(a) Pseudo-likelihood estimator

10

10
4

5

6

σ̂PL,R(y) =6.33
7

σ

8

9

10

(b) Regularized pseudo-likelihood estimator

Fig 1: Estimation of σ 2 based on the pseudo-likelihood for σ 2 under M(C,b,P ) for an interval with
L = 0. The observed value is σ̂P2 (y) = 36 on 100 degrees of freedom truncated to [0, 40].

[0, ∞) we recover the usual OLS estimator. Specifically, for some θ we obtain a new estimator as
the root of
σ 7→ Hν (L, U, σ 2 ) + θ · σ 2 − (1 + θ)σ̂P2 (y)
We call this regularized pseudo-likelihood estimate σ̂P2 L,R (y). In practice, we have set θ = ν −1/2
so that this regularization becomes negligible as the degrees of freedom grows. The regularized
estimate can be thought of as the MAP from an improper prior on the natural parameter for σ 2 .
In this case, if δ = 1/(2σ 2 ) is the natural parameter the prior has density proportional to δ ν·θ .
As Hν (0, ∞, σ 2 ) = σ 2 , it is clear that in the untruncated case we recover the usual OLS estimator
σ̂P (y).
4. Applications
In this section, we discuss several applications of the inferential tools introduced above. In Section 4.1, we compare the performance of the variance estimator introduced in Section 3.2 with
some existing methods. In Section 4.2, we introduce a Gaussian approximation to the truncated
T -distribution, which is more computation-friendly. The approximation is validated through simulations where the coverages of confidence intervals are close to the nominal levels. Finally, in Section
4.4, we apply a BHq procedure to the p-values acquired through the inference above. Although we
do not seek to establish any theoretical results, simulations show that a simple BHq procedure
applied to the p-values controls the false discovery rate at the desired level and has comparable
power with existing methods, even in the high-dimensional setting.
4.1. Comparison of estimators
As the selection event for the square-root LASSO yields a law of the form M(C,b,P ) , we can study
the accuracy of the estimator by comparing it to other estimators for σ in the LASSO literature.
We compare our estimator, σ̂P,L,R , to the following:

imsart-generic ver. 2014/10/16 file: paper.tex date: February 13, 2017

1.8

1.8

1.6

1.6

1.4

1.4

12

σ̂ 2 /σ̄ 2E

σ̂ 2 /σ 2

Tian et al./Selective inference with unknown variance

1.2

1.2

1.0

1.0

0.8

0.8

0.6

0.6
Selected OLS

σ̂ 2

PL

Scaled LASSO

Minimum CV

Selected OLS

(a) Screening

σ̂ 2PL

Scaled LASSO

Minimum CV

(b) Non-screening

Fig 2: Comparisons of different estimators for σE .
√ E )yk , E is the active set.
• OLS estimator in the selected model, where σ̂ = k(I−P
n−|E|

• Scaled LASSO in Sun & Zhang (2011).
• Minimum cross-validation estimator based upon the residual sum of squares of Lasso solution
with λ selected by cross validation Reid et al. (2013).
To illustrate the advantage of our method, we consider the high-dimensional setting. The design
matrices were 1000 × 2000 generated from an equicorrelated Gaussian with correlation 0.3, columns
normalized to have length 1. The sparsity was set to 40 non-zero coefficients each with a signal-tonoise ratio 7 but with a random sign. The noise level σ = 3 is considered unknown. The parameter
κ in (1.5) was set to 0.8. With these settings, the square-root LASSO “screened”, or discovered a
superset of the 20 non-zero coefficients with a success rate of approximately 30%. Since we do not
screen most of the time, the model may be sometimes misspecified. But the variance estimator σ̂P L
is consistent with the model specific variance σ E .
Specifically, the performance of the estimators was evaluated by considering the ratio σ
b2 (y)/σ 2E
2
2
where σ E is the usual estimate of σ using the selected variables E, evaluated on an independent
copy of data drawn from the same distribution. This is the variance one would expect to see in long
run sampling if fitting an OLS model with variables E under the true data generating distribution.
We see from Figure 2a that our estimator is approximately unbiased when we correctly recovered
all variables, outperforming the OLS estimator and the scaled LASSO estimator. Its performance
is comparable with that of Minimum CV, but with fewer outliers. In the case of partial recovery
(non-screening), we see that the estimator is quite close to the estimator σ 2E , where part of the
“noise” in our selected model comes from the bias in the estimator. Our estimator beats all the
other estimators in this case. Particularly, the Selected OLS estimator consistently underestimates
the variance, which might lead to inflated test scores and more false discoveries. On the other hand,

imsart-generic ver. 2014/10/16 file: paper.tex date: February 13, 2017

Tian et al./Selective inference with unknown variance

13

Minimum CV seeks to estimate σ 2 instead of σ 2E , which results in large downward bias.
In fact, when (yi , Xi ) are independent draws from a fixed Gaussian distribution, then for any
E, the model Mu,E is correctly specified in the sense that the law of y|XE belongs to the family
2
= Var(yi |xi,E ).
Mu,E . In this setting the quantity σ 2E is an asymptotically correct estimator σE
Hence, we see that the pseudo-likelihood estimator may be considered a reasonable estimator when
the square-root LASSO does not actually screen.
4.2. A Gaussian approximation to M(C,b,P )
In this section, we introduce a Gaussian approximation to the truncated T -distribution which we
use in computation.
The selective distribution QE,zE derived from some PE ∈ Mu,E is used for inference about the
parameters βE . Let η be the normalized linear functional for testing H0 : βj,E = θ, then for any
value of θ, this distribution is restricted to the sphere of radius ky − θXj k2 intersect the affine
T
T
T
z = XE\j
y}. Call this set S(kPE\j (y − θη)k2 , XE\j
y) The restriction of QE,zE to
space {z : XE\j
T
T
S(kPE\j (y − θη)k2 , XE\j y) is the law PE restricted to S(kPE\j (y − θη), XE\j
y) intersected with
the selection event. For |E| not large relative to n by the classical Poincaré’s limit Diaconis &
T
Freedman (1987), the law of η T y − θ under PE restricted to S(kPE\j (y − θη)k2 , XE\j
y) that is
2
close to a Gaussian with variance kPE\j (y − θη)k2 /(n − |E| + 1). Thus, we might approximate its
distribution under QE,zE by a truncated Gaussian. Furthermore, we can approximate the variance
by σ̂P (y)2 . We summarize the Gaussian approximation in the following remark.
Remark 6 (Approximate distribution). Suppose we are interested in testing the hypothesis H0 :
η T µ = θ in the family M(C,b,P ) for some η ∈ row(C). We propose using the distribution
L(η T z − θ|(P − ηη T )z, Cz ≤ σ
bP (y)b),

z ∼ N (µ, σ̂ 2 (y)I).

We condition on (P −ηη T )z as we have assumed P µ = µ in defining M(C,b,P ) and this is a sufficient
statistic for the unknown parameter (P − ηη T )µ.
To validate the approximation, we use a similar simulation scenario to the one in Section 7
of Fithian et al. (2014). We generate rows of the design matrix X150×200 from an equicorrelated
multivariate Gaussian distribution with pairwise correlation ρ = 0.3 between the variables. The
columns are normalized to have length 1. The sparsity level is 10, with each non-zero coefficient
having value 6. Results are shown in Table 1.
Level

Coverage

0.850
0.860
0.900
0.905
0.950
0.947
0.970
0.968
Table 1
Coverage of confidence intervals using Gaussian approximation based on forming 10000 intervals.

imsart-generic ver. 2014/10/16 file: paper.tex date: February 13, 2017

Tian et al./Selective inference with unknown variance

14

4.3. Regression diagnostics
Recall the scaled residual vector U−E (y) in (2.18) is ancillary under the laws PE and Q̃E,zE . U−E (y)
follows a uniform distribution on the n-dimensional unit sphere intersecting the subspace determined
by I − PE , truncated by the observed constraints (2.17). As U−E (y) is ancillary, we can sample
from its distribution to carry out any regression diagnostics or goodness of fit tests. For a specific
example, we might consider the observed maximum of the residuals kÛ−E (y)k∞ .
Another natural regression diagnostic might be to test whether individual or groups of variables
not selected improve the fit. Specifically, suppose G is a subset of variables disjoint from E. Then,
the usual F statistic for including these variables in the model is measurable with respect to U−E :
k(PG∪E − PE )yk22 /|G|
k(I − PG∪E )yk22 /(n − |G ∪ E|)
k(PG∪E − PE )U−E (y)k22 /|G|
=
.
k(I − PG∪E )U−E (y)k22 /(n − |G ∪ E|)

FG|G∪E (y) =

Therefore, a selectively valid test of
H0 : βG|G∪E = 0
can be constructed by sampling U−E under its null distribution and comparing the observed F
statistic to this reference distribution. Details of these diagnostics are a potential area of further
work.
4.4. Applications to FDR control
Based on the truncated-t distribution derived in Theorem 4, it is easy to construct tests that
control the selective Type I error (1.9). In this section, we attempt to use our p-values for multiple
hypothesis testing purposes. We apply the BHq procedure (Benjamini & Hochberg 1995) to the
p-values and compare with the procedure proposed by Barber & Candes (2016). To ensure the
fairness of the comparison, we generate the data according to the data generation mechanism in
Section 5 of Barber & Candes (2016), where n = 2000, p = 2500, k = 30, and X is generated as
random Gaussian design with correlation ρ. In the simulations, we vary κ in (1.5) and also include
the choice of λ according to the 1 standard error rule for reference. The comparison is in Figure 3
below. We see that first our procedure is relatively robust to the choice of κ in both FDR control and
power across different correlations ρ. Secondly, for all choices of κ, our procedure controls the FDR
at 0.2 across all the correlation coefficients ρ. Moreover, it enjoys an approximately 20% increase
in power compared with Figure 1 in Barber & Candes (2016).
References
Barber, R. F. & Candes, E. J. (2016), ‘A knockoff filter for high-dimensional selective inference’,
arXiv preprint arXiv:1602.03574 .
Belloni, A., Chernozhukov, V. & Wang, L. (2010), ‘Square-Root Lasso: Pivotal Recovery of Sparse
Signals via Conic Programming’, ArXiv e-prints .
Benjamini, Y. & Hochberg, Y. (1995), ‘Controlling the false discovery rate: a practical and powerful
approach to multiple testing’, Journal of the royal statistical society. Series B (Methodological)
pp. 289–300.
imsart-generic ver. 2014/10/16 file: paper.tex date: February 13, 2017

Tian et al./Selective inference with unknown variance

15

Fig 3: FDR control and power for square-root Lasso across different correlations ρ.
0.25

0.25

0.20

0.20

0.8

0.15

0.10

0.05

0.6

0.15

Power(ρ)

E(Directional FDP)(ρ)

E(Model FDP)(ρ)

0.7

0.10

0.5
0.4
0.3
0.2

0.05

0.1
0.00
0.0

0.1

0.2

0.3

0.4

ρ

0.5

0.6

0.7

0.8

0.00
0.0

0.1

0.2

0.3

0.4

ρ

0.5

0.6

0.7

0.8

0.0
0.0

= 0. 70
= 0. 85
= 1. 00
0.1
0.2

0.3

0.4

ρ

0.5

0.6

0.7

0.8

Diaconis, P. & Freedman, D. (1987), ‘A dozen de finetti-style results in search of a theory’, Annales
de l’Institut Henri Poincaré. Probabilités et Statistique 23(2, suppl.), 397–423.
Fithian, W., Sun, D. & Taylor, J. (2014), ‘Optimal inference after model selection’, arXiv:1410.2597
[math, stat] . arXiv: 1410.2597.
URL: http://arxiv.org/abs/1410.2597
Lee, J. D., Sun, D. L., Sun, Y. & Taylor, J. E. (2013), ‘Exact inference after model selection via
the lasso’, arXiv preprint arXiv:1311.6238 .
Negahban, S. N., Ravikumar, P., Wainwright, M. J. & Yu, B. (2012), ‘A unified framework for
high-dimensional analysis of MM-Estimators with decomposable regularizers’, Statistical Science
27(4), 538–557.
URL: http://projecteuclid.org/euclid.ss/1356098555
Reid, S., Tibshirani, R. & Friedman, J. (2013), ‘A Study of Error Variance Estimation in Lasso
Regression’, ArXiv e-prints .
Sun, T. & Zhang, C.-H. (2011), ‘Scaled Sparse Linear Regression’, ArXiv e-prints .
Taylor, J., Lockhart, R., Tibshirani, R. J. & Tibshirani, R. (2014), ‘Post-selection adaptive inference
for least angle regression and the lasso’, arXiv:1401.3889 [stat] .
URL: http://arxiv.org/abs/1401.3889
Taylor, J., Loftus, J., Tibshirani, R. & Tibshirani, R. (2013), ‘Tests in adaptive regression via the
kac-rice formula’, arXiv preprint arXiv:1308.3020 .
Tibshirani, R. (1996), ‘Regression shrinkage and selection via the lasso’, Journal of the Royal Statistical Society. Series B (Methodological) pp. 267–288.
Tibshirani, R. J. (2013), ‘The lasso problem and uniqueness’, Electronic Journal of Statistics
7, 1456–1490.

imsart-generic ver. 2014/10/16 file: paper.tex date: February 13, 2017

