Learn R Programming

regnet (version 0.2.0)

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

Description

This function makes predictions for network-based logistic regression for a given pair of lambda1 and lambda2 values. Typical usage is to have the CV.NetLogistic function compute the optimal lambdas, then provide them to the NetLogistic function.

Usage

NetLogistic(X, Y, lamb.1, lamb.2, alpha.i = 1, r = 5, folds = 5)

Arguments

X

a matrix of predictors.

Y

a vector of the binary response.

lamb.1

the tuning parameter (lambda1) that imposes sparsity.

lamb.2

the tuning parameter (lambda2) that controls the smoothness among coefficient profiles.

alpha.i

by default, the program uses Elastic-Net for choosing initial values of the coefficient vector. alpha.i is the Elastic-Net mixing parameter, with \(0 \le alpha.i \le 1\). alpha.i=1 is the lasso penalty, and alpha.i=0 is the ridge penalty. If alpha.i is assigned to be -1, the program will use zeroes as initial coefficients.

r

the regularization parameter in MCP.

folds

the number of folds for cross-validation.

Value

the estimated coefficients vector.

References

Ren, J., He, T., Li, Y., Liu, S., Du, Y., Jiang, Y., Wu, C. (2017). Network-based regularization for high dimensional SNP data in the case-control study of Type 2 diabetes. BMC Genetics, 18(1):44.

See Also

CV.NetLogistic

Examples

Run this code
# NOT RUN {
b = NetLogistic(regnet$X, regnet$Y, 0.05, 1)
inds = which(regnet$beta != 0)
sel = which(b != 0)
tp = length(intersect(inds, sel))
fp = length(sel) - tp
list(tp=tp, fp=fp)
# }

Run the code above in your browser using DataLab