The Knockoff Filter for Controlled Variable Selection

The knockoff filter is a general procedure for controlling the false discovery rate (FDR) when performing variable selection. For more information, see the website below and the accompanying paper: Candes et al., "Panning for gold: model-X knockoffs for high-dimensional controlled variable selection", J. R. Statist. Soc. B (2018) 80, 3, pp. 551-577.


knockoff 0.3.2 (08/03/2018)


  • Fixed bug that caused incorrect knockoff statistics in the presence of knockoff copies identical to their own original variable.

Minor changes:

  • Changed scaling of variables for computation of importance measures.

knockoff (06/28/2018)

Minor changes:

  • Improved algorithm for solving SDP
  • Improved algorithm for solving ASDP
  • Returning X instead of throwing error in Gaussian knockoffs, if covariance matrix is not positive-definite


  • Minor improvements to package description file

knockoff 0.3.0 (10/17/2017)


  • Added support for Model-X knockoffs
  • Added importance statistics
  • Native support for SDP knockoffs (no need to call Python)

Major changes:

  • Model-X knockoffs are used by default
  • Cross-validated lasso statistics are used by default
  • SDP knockoffs are used by default
  • Offset 1 is used by default


  • Updated and expanded vignettes

knockoff 0.2.1


  • Add vignette showing how to analyze a real data set (on HIV drug resistance), including all the preprocessing steps.

knockoff 0.2 (02/04/2015)


  • The knockoff procedure is now fully deterministic by default. Randomization can be enabled if desired.


  • Fix numerical precision bug in equicorrelated knockoff creation

knockoff 0.1.1 (12/19/2014)


  • Expose the optional 'nlambda' parameter for lasso statistics


  • Better documentation for SDP knockoffs
  • Minor bug fixes

knockoff 0.1 (12/05/2014)

Initial release!

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 Matteo Sesia, 2 years ago

Browse source code at

Authors: Rina Foygel Barber [ctb] (Development of the original Fixed-X Knockoffs) , Emmanuel Candes [ctb] (Development of Model-X Knockoffs and original Fixed-X Knockoffs) , Lucas Janson [ctb] (Development of Model-X Knockoffs) , Evan Patterson [aut] (Earlier R package for the original Fixed-X Knockoffs) , Matteo Sesia [aut, cre] (R package for Model-X Knockoffs)

Documentation:   PDF Manual  

GPL-3 license

Imports Rdsdp, Matrix, corpcor, glmnet, RSpectra, gtools, utils

Depends on methods, stats

Suggests knitr, testthat, rmarkdown, lars, ranger, stabs, RPtests, doMC, parallel

Imported by KOBT.

Suggested by CBDA.

See at CRAN