Solution (source code)

= Solution

One standard construction uses the <Debiased Lasso>. Starting from the <Square-root Lasso> estimate $\widehat\beta$, estimate a vector $\widehat\Theta_j$ that approximately inverts the $j$th column of the empirical Gram matrix $\widehat\Sigma=X^TX/n$, for example by a <Nodewise Lasso>. Define
$$
\widetilde\beta_j
=\widehat\beta_j+\widehat\Theta_j^T\frac{X^T(Y-X\widehat\beta)}n,
\qquad
\widehat V_j=\widehat\Theta_j^T\widehat\Sigma\widehat\Theta_j,
$$
and estimate $\sigma$ by $\widehat\sigma=\lVert Y-X\widehat\beta\rVert_2/\sqrt n$. The approximate two-sided level-$\alpha$ test rejects $H_j^\beta$ when
$$
\left|\frac{\sqrt n\,\widetilde\beta_j}{\widehat\sigma\sqrt{\widehat V_j}}\right|>z_{1-\alpha/2},
$$
where $z_{1-\alpha/2}$ is a <standard normal quantile>.

Sufficient high-dimensional conditions include a <Compatibility condition for the Lasso> bounded away from zero, $\gamma\asymp\sqrt{\log p/n}$, $\log p=o(n)$, and
$$
\frac{s\log p}{\sqrt n}\longrightarrow0,
$$
together with the corresponding sparsity and consistency conditions for the nodewise inverse-Gram estimate. Under these assumptions the <Debiased-Lasso asymptotic normality> makes the rejection probability under $H_j^\beta$ tend to $\alpha$.