SILM: Simultaneous Inference for High-Dimensional Linear Models

SILM provides simultaneous inference for high-dimensional linear models $Y = X\beta + \epsilon$ (p possibly much larger than n), based on the de-biased (de-sparsified) lasso and the bootstrap. It implements

Why a new version?

SILM 1.0.0 was on CRAN from 2019 until July 2026, when it was archived because its dependency 'scalreg' was archived. The package 'hdi', which provided the nodewise lasso used by SILM and the only implementation of Dezeure, Bühlmann and Zhang (2017), was archived on the same day. SILM 2.0.0 is self-contained (it depends only on 'glmnet', 'lars' and 'MASS') and takes over lasso.proj() and boot.lasso.proj() from hdi, with the same arguments and (up to the differences listed under "Coming from hdi") the same results.

Installation

# From R-universe (binaries, no compiler needed):
install.packages("SILM", repos = c("https://zhangxiany-tamu.r-universe.dev",
                                   "https://cloud.r-project.org"))

# Or from GitHub:
# install.packages("pak")
pak::pak("zhangxiany-tamu/SILM")
# or: remotes::install_github("zhangxiany-tamu/SILM")

Example

library(SILM)
set.seed(1)
n <- 100; p <- 200
X <- matrix(rnorm(n * p), n, p) %*% chol(0.9^abs(outer(1:p, 1:p, "-")))
Y <- as.vector(X[, 1:3] %*% c(1.5, -1, 2) + rt(n, 4) / sqrt(2))

# Zhang and Cheng (2017)
Theta <- Theta.hat(X, parallel = TRUE)       # nodewise lasso; reusable
Sim.CI(X, Y, set = 1:10, alpha = 0.95, Theta = Theta)   # simultaneous CIs
Step(X, Y, alpha = 0.05, Theta = Theta)                  # FWER control
SR(X, Y, Theta = Theta)                                  # support recovery
ST(X, Y, sub.size = 0.3, test.set = 4:p)                 # H0: beta_j = 0, j in 4:p

# Dezeure, Buehlmann and Zhang (2017)
fit <- boot.lasso.proj(X, Y, B = 1000, robust = TRUE, wild = TRUE,
                       return.bootdist = TRUE, parallel = TRUE)
fit                                                      # WY-adjusted p-values
confint(fit, parm = 1:5)                                 # individual CIs
confint(fit, type = "simultaneous")                      # all p jointly
groupTest(fit, list(signal = 1:3, noise = 4:p))          # group tests

See vignette("SILM") for a guided tour.

Coming from hdi

lasso.proj() and boot.lasso.proj() accept the same arguments as in hdi 0.1-10 and, for the Gaussian family with the default robust = FALSE, return the same numbers under the same random seed, so replacing hdi:: by SILM:: is enough. With robust = TRUE, the robust standard errors use the n - s divisor of equation (5) of Dezeure, Bühlmann and Zhang (2017) by default, chosen by a pre-registered study under its fixed decision rule (calibration first, then power): over 7 designs (100 replications each), "n-s" reduced the mean calibration shortfall from 0.055 to 0.031 (95% bootstrap interval of the difference [-0.028, -0.018]), mainly by bringing the familywise error rate closer to 5% (for example Westfall-Young 0.12 to 0.05 and Holm 0.11 to 0.05 in the paper's Toeplitz design), at a mean power loss of 0.027 (validation/calibration/defaults-results/REPORT.md); add robust.divisor = "n" to get hdi's numbers. The differences:

hdi 0.1-10 SILM 2.0.0
result class "hdi" "silm_lasso_proj" / "silm_boot_lasso_proj" (with print, confint)
robust standard error (robust = TRUE) divisor n (Section 3.3.2) divisor n - s, equation (5) (robust.divisor = "n-s", default); robust.divisor = "n" gives hdi's result
lasso.proj() group tests (groupTest, clusterGroupTest closures) yes not provided (NULL); use boot.lasso.proj() + groupTest()
boot.lasso.proj(parallel = TRUE) not reproducible reproducible, identical to the sequential result
lasso.proj(family = "binomial") biased intercept removal corrected; legacy = TRUE gives hdi's result (with robust = TRUE, also set robust.divisor = "n")
simultaneous CIs, group tests, Mammen multipliers, xyz-paired bootstrap no yes (see ?boot.lasso.proj)

Reproducibility and correctness

The development version fixes response-unit sensitivity in the scaled lasso. It uses response normalization and relative convergence by default; ordinary results may also change slightly. Use scaled.lasso = "legacy" when reproducing archived results with SR(), ST(), Sim.CI() or Step(), or with betainit = "scaled lasso" in the projection functions. This explicitly retains the historical numerical defect. The calibration and replication figures below were computed with the historical solver and have not been rerun for this fix.

Citation

citation("SILM")

Zhang, X. and Cheng, G. (2017). Simultaneous inference for high-dimensional linear models. Journal of the American Statistical Association, 112(518), 757–768. doi:10.1080/01621459.2016.1166114

Dezeure, R., Bühlmann, P. and Zhang, C.-H. (2017). High-dimensional simultaneous inference with the bootstrap. TEST, 26(4), 685–719. doi:10.1007/s11749-017-0554-2

Acknowledgements

The nodewise lasso, lasso.proj() and boot.lasso.proj() are adapted from the 'hdi' package by Lukas Meier, Ruben Dezeure, Nicolai Meinshausen, Martin Mächler and Peter Bühlmann (GPL). The scaled lasso follows Sun and Zhang (2012, 2013); its legacy setting reproduces the archived 'scalreg' package by Tingni Sun.

License

GPL-3. See inst/COPYRIGHTS for the code derived from other packages.