intervals: Projection base test statistics and intervals

View source: R/intervals.R

intervalsR Documentation

Projection base test statistics and intervals

Description

Constructs projection based test statistics that can be used to control FDR along with intervals for a penalized regression model.

Usage

intervals(
  fit,
  lambda,
  sigma,
  level = 0.95,
  posterior = TRUE,
  relaxed = FALSE,
  adjust_projection = FALSE,
  X = NULL
)

Arguments

fit

An optional fit of class ncvreg or cv.ncvreg. If supplied, X should only be supplied if fit does not contain it.

lambda

The penalty at which the tests and intervals are to be constructed. If left unspecified, will be selected using cross validation.

sigma

Standard deviation estimate used to compute test statistic and intervals. If left unspecified (default) it will be estimated using the recommendation from Reid et al. (2016)

level

the confidence level required.

posterior

whether the intervals returned should be posterior intervals (default) or debiased intervals (if FALSE). Posterior intervals are constructed from distributions where the coefficient estimates are the is the posterior mode. Debiased intervals are constructed around the estimates.

relaxed

whether the relaxed lasso based statistic / intervals should be used. Default is FALSE in which case PIPE based intervals are constructed (recommended). This affects the estimate.

adjust_projection

whether a Local Quadratic Approximation should be used in the projection for determining variance of the PIPE based test statistic. Default is FALSE as more research has been done without this adjustment, however without this adjustment, statistics and intervals may be over conservative in the presence of correlation. This affects the SE.

X

The original design matrix supplied to fit. Required if fit does not contain X.

Details

The function constructs test statistics and intervals based off an approximate projection onto the column space of the active features. The test statistic can be used to control FDR and the intervals generally have good coverage. However, both tend to be conservative with the introduction of correlation.

The intervals produced can either be biased (like the point estimates) or debiased by setting the parameter posterior accordingly. The resulting behavior is quite different. See references for more details.

Value

An data.frame containing the following columns:

variable

colnames(X)

coef

The original estimates at the specified parameters (lambda, gamma, alpha)

estimate

The debiased estimates.

SE

The standard errors.

t

The PIPE / Relaxed Lasso / LQA test statistics

lower

Interval lower bounds

upper

Intervals upper bounds

p.value

The unadjusted p-value

p.adjust

The Benhamini and Hochberg corrected p-value

penalty

The penalty used.

lambda

The lambda value the test statistics and intervals were constructed at.

gamma

The gamma value the test statistics and intervals were constructed at (for MCP/SCAD).

alpha

The alpha value the test statistics and intervals were constructed at.

level

The confidence level set for interval construction.

sigma

The standard deviation used for constructing the test statistis and intervals.

Author(s)

Logan Harris, Patrick Breheny, and Biyue Dai

References

Harris L and Breheny P. (2025) A new perspective on high dimensional confidence intervals. arXiv preprint, arXiv:2508.03504. https://arxiv.org/abs/2508.03504

Harris L and Breheny P. (2025) Alternative Likelihood Approximations for High-Dimensional Intervals for Lasso. arXiv preprint, arXiv:2509.14971. https://arxiv.org/abs/2509.14971

Dai B. (2019) Projection-based inference and model selection for penalized regression. PhD dissertation, University of Iowa, Iowa City, IA. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.17077/etd.005250")}

Examples

# Linear regression (SCAD-Net penalty, PIPE intervals, pass ncvreg object)
fit <- ncvreg(Prostate$X, Prostate$y, penalty = "SCAD", alpha = 0.9)
intervals(fit) |> head()

# Logistic regression (lasso penalty, LQA intervals, pass cv.ncvreg object) 
data(Heart)
cv_fit <- cv.ncvreg(Heart$X, Heart$y, family="binomial", penalty = "lasso")
intervals(cv_fit, adjust_projection = TRUE) |> head()


ncvreg documentation built on Nov. 6, 2025, 9:06 a.m.