Learn R Programming

regnet (version 0.1.1)

CV.NetLogistic: k-folds cross-validation for network-based logistic regression.

Description

This function dose k-fold cross-validation for the Network-based logistic regression and returns a pair of lambda1 and lambda2.

Usage

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

Arguments

X

a matrix of predictors.

Y

a vector of the binary response.

lamb.1

a user-supplied sequence of lambda1. Tuning parameter lambda1 imposes sparsity. If it is left as NULL, a default sequence will be used.

lamb.2

a user-supplied sequence of lambda2. Tuning parameter lambda2 controls the smoothness among coefficient profiles. If it is left as NULL, a default sequence, c(0.1, 1, 10), will be used.

r

the regularization parameter in MCP, default is 5.

alpha.i

by default, the program use the lasso 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 the ridge penalty. If assign alpha.i to be -1, program will use zero as initial coefficients.

folds

the number of folds for cross-validation, default is 5.

Value

a list with components:

lambda

the optimal pair of lambda1 and lambda2.

mcr

the misclassification rate of the optimal pair of lambda1 and lambda2.

MCR

a matrix of the misclassification rates for all pairs of lambdas tested.

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 <U+2013> control study of Type 2 diabetes. BMC Genetics.

See Also

NetLogistic