Ridge Regression with Automatic Selection of the Penalty Parameter

Linear and logistic ridge regression functions. Additionally includes special functions for genome-wide single-nucleotide polymorphism (SNP) data.

Project Status: Active The project has reached a stable, usable state and is being actively developed. Build Status CRAN Version CRAN Downloads


The ridge package offers linear and logistic ridge regression, especially for small data sets and genome-wide SNP data.


If you found a bug or have suggestions, feel free to get in contact via steffen.moritz10 at gmail.com

Since I only have taken over this package (it was orphaned) - it might be that I can't help with all details.

Be aware, that therefore I also can not guarantee to 100% that everything works as expected.

Further information

Erika Cule published also a scientific paper about the method, which you can find here: https://onlinelibrary.wiley.com/doi/abs/10.1002/gepi.21750

Cule, Erika, and Maria De Iorio. "Ridge regression in prediction problems: automatic choice of the ridge parameter." Genetic epidemiology 37.7 (2013): 704-714.






Changes Version 2.4 - Steffen Moritz

Changes Version 2.3 - Steffen Moritz

  • Some fixed to remain on CRAN and comly with CRAN policy

  • Improved Description file

  • Changed NEWS file to markup document

Changes Version 2.2 - Steffen Moritz

  • Made package CRAN ready again

  • Created github repository for the package

  • Fixed warning using Wpendantic gcc

  • Adapted the DESCRIPTION file to latest CRAN requirements

  • Renamed CHANGELOG to NEWS

  • NEWS template update

  • Changes to .C Method registration

  • NAMESPACE fixes

Changes 2014-3-02 - Erika Cule

* Fixed layout of .Rd files

* Added deletion of Makevars to cleanup script

Changes 2012-9-27 - Erika Cule

* Flat text (.txt) data files were moved from ridge/data to ridge/inst/extdata 
(in the source, which becomes ridge/extdata in the installed package). The .txt files 
should be in inst/extdata because they files are used by the package examples 
  (albeit in not run sections), as described in Writing R Extensions 1.1.5 Data in packages.

* Some users were reporting problems installing the package on some Linux OS. configure 
  has been modified to fix this 

Changes 2012-8-21 - Erika Cule

* Bug fix in src/commonFunctions.c

Changes 2012-8-21 - Erika Cule

* Added configure.ac so that package will install if GSL >= 1.14 is not available 
  (with linearRidgeGenotypes, logisticRidgeGenotypes, linearRidgeGenotypesPredict and 
  logisticRidgeGenotypesPredict disabled). 
* configure.ac detects whether openblas is available and if it is found, links to that. 
This speeds up computation. (http://xianyi.github.com/OpenBLAS/)

Changes 2012-7-19 Erika Cule

  • fixed a bug in linearRidge when scaling = "none"

  • added functions linearRidgeGenotypes and logisticRidgeGenotypes and their predicting counterparts linearRidgeGenotypesPredict and logisticRidgeGenotypespredict. These functions fit linear and logistic ridge regression models for genome-wide SNP data, optionally automatically choosing the ridge parameter

    • minor bug fix: "Intercept" now prints as "(Intercept)" (as is the case for lm and glm models)

Reference manual

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


2.7 by Steffen Moritz, 2 months ago


Report a bug at https://github.com/SteffenMoritz/ridge/issues

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

Authors: Steffen Moritz [aut, cre] , Erika Cule [aut] , Dan Frankowski [aut]

Documentation:   PDF Manual  

GPL-2 license

Imports stats, graphics, grDevices, utils

Suggests testthat, datasets

System requirements: Gnu Scientific Library version >= 1.14

Suggested by COBRA, imputeR.

See at CRAN