Learn R Programming

⚠️There's a newer version (1.0.2) of this package.Take me there.

regnet

Network-based regularization has achieved success in variable selections for high-dimensional biological data, due to its ability to incorporate the correlations among genomic features.This package provides procedures for fitting network-based regularization, minimax concave penalty (MCP) and lasso penalty for generalized linear models. This current version, regnet0.2.0, focuses on binary outcomes. Functions for continuous, survival outcomes and other regularization methods will be included in the forthcoming upgraded version.

How to install

  • Run these two lines of code in R

    install.packages("devtools")
    devtools::install_github("jrhub/regnet")
  • Binaries are also available on R CRAN (link)

Examples

Example.1 (CV.NetLogistic)

result = CV.NetLogistic(regnet$X, regnet$Y, r = 4.5)  
result$lambda  
b = NetLogistic(regnet$X, regnet$Y, result$lambda[1,1], result$lambda[1,2])  
index = which(regnet$beta != 0)  
pos = which(b != 0)  
tp = length(intersect(index, pos))  
fp = length(pos) - tp  
list(tp=tp, fp=fp)  

Example.2 (CV.McpLogistic)

result = CV.McpLogistic(regnet$X, regnet$Y, r = 4.5)  
result$lambda  
b = McpLogistic(regnet$X, regnet$Y, result$lambda[1])  
index = which(regnet$beta != 0)  
pos = which(b != 0)  
tp = length(intersect(index, pos))  
fp = length(pos) - tp  
list(tp=tp, fp=fp)  

Copy Link

Version

Install

install.packages('regnet')

Monthly Downloads

243

Version

0.2.0

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Jie Ren

Last Published

October 15th, 2017

Functions in regnet (0.2.0)

CV.NetLogistic

k-folds cross-validation for network-based logistic regression.
ElasLogistic

Elastic-Net logistic regression for a given lambda.
regnet

A simulated dataset for testing logistic regression.
CV.ElasLogistic

k-folds cross-validation for Elastic-Net logistic regression.
CV.McpLogistic

k-folds cross-validation for MCP logistic regression.
McpLogistic

MCP logistic regression for a given lambda.
NetLogistic

Network-based logistic regression for given lambda1 and lambda2 pair.