High-Dimensional Regression with Measurement Error

Penalized regression for generalized linear models for measurement error problems (aka. errors-in-variables). The package contains a version of the lasso (L1-penalization) which corrects for measurement error (Sorensen et al. (2015) ). It also contains an implementation of the Generalized Matrix Uncertainty Selector, which is a version the (Generalized) Dantzig Selector for the case of measurement error (Sorensen et al. (2018) ).

CRAN_Status_Badge BuildStatus Codecov testcoverage

The goal of hdme is to provide penalized regression methods for High-Dimensional Measurement Error problems (errors-in-variables).


Install hdme from CRAN using.


You can install the latest development version from github with:

# install.packages("devtools")
devtools::install_github("osorensen/hdme", build_vignettes = TRUE)


hdme provides implementations of the following algorithms:

The methods implemented in the package include

  • Corrected Lasso for Linear Models (Loh and Wainwright (2012))
  • Corrected Lasso for Generalized Linear Models (Sorensen, Frigessi, and Thoresen (2015))
  • Matrix Uncertainty Selector for Linear Models (Rosenbaum and Tsybakov (2010))
  • Matrix Uncertainty Selector for Generalized Linear Models (Sorensen et al. (2018))
  • Matrix Uncertainty Lasso for Generalized Linear Models (Sorensen et al. (2018))
  • Generalized Dantzig Selector (James and Radchenko (2009))


James, Gareth M., and Peter Radchenko. 2009. “A Generalized Dantzig Selector with Shrinkage Tuning.” Biometrika 96 (2): 323–37.

Loh, Po-Ling, and Martin J. Wainwright. 2012. “High-Dimensional Regression with Noisy and Missing Data: Provable Guarantees with Nonconvexity.” Ann. Statist. 40 (3): 1637–64.

Rosenbaum, Mathieu, and Alexandre B. Tsybakov. 2010. “Sparse Recovery Under Matrix Uncertainty.” Ann. Statist. 38 (5): 2620–51.

Sorensen, Oystein, Arnoldo Frigessi, and Magne Thoresen. 2015. “Measurement Error in Lasso: Impact and Likelihood Bias Correction.” Statistica Sinica 25 (2): 809–29.

Sorensen, Oystein, Kristoffer Herland Hellton, Arnoldo Frigessi, and Magne Thoresen. 2018. “Covariate Selection in High-Dimensional Generalized Linear Models with Measurement Error.” Journal of Computational and Graphical Statistics 27 (4): 739–49. https://doi.org/10.1080/10618600.2018.1425626.


hdme 0.2.3

  • Added Rglpk back to Imports and removed lpSolveAPI, as the latest version of Rglpk passes all tests on CRAN, including osX.
  • Updated vignette.
  • Cleaned up documentation, hiding internal functions from the index.
  • Created unit tests.

hdme 0.2.2

Fixed random number seed issue which caused test to fail in R-devel.

hdme 0.2.1

Internal fix to fit_corrected_lasso and cv_corrected_lasso. Got rid of duplicated code by calling the function set_radius.

hdme 0.2.0

Since Rglpk does not install automatically on macOS, this package was moved from Imports to Suggests. In addition, lpSolveAPI was added to Suggests. This means that the package should build also on systems that do not have Rglpk, in particular the versions of macOS on CRAN.

The changes involved adding an optional linear solver from lpSolveAPI in the function musalgorithm().


Added a plot.gds function, which plots the coefficients estimated by fit_gds.


Internal adjustment, which removed importing of external packages into the namespace, and instead specified the functions explicitly using ::.

hdme 0.1.1

tidyverse has been removed from Suggests field DESCRIPTION. dplyr and tidyr have been added instead. Similarly, library(tidyverse) in the vignette has been replaced by library(dplyr), library(tidyr), and library(ggplot2).

hdme 0.1.0

hdme is now on CRAN.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.3.3 by Oystein Sorensen, a year ago


Browse source code at https://github.com/cran/hdme

Authors: Oystein Sorensen

Documentation:   PDF Manual  

GPL-3 license

Imports glmnet, ggplot2, Rdpack, Rcpp, Rglpk, stats

Suggests knitr, rmarkdown, testthat, dplyr, tidyr, covr

Linking to Rcpp, RcppArmadillo

See at CRAN