Learn R Programming

regnet (version 0.2.0)

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

Description

This function does 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, verbo = FALSE)

Arguments

X

a matrix of predictors.

Y

a vector of the binary response.

lamb.1

a user-supplied sequence of lambda1 values, which serves as a tuning parameter to impose sparsity. If it is left as NULL, a default sequence will be used.

lamb.2

a user-supplied sequence of lambda2 values, which serves as a tuning parameter to control the smoothness among coefficient profiles. If it is left as NULL, a default sequence, (0.1, 1, 10), will be used.

r

the regularization parameter in MCP; default is 5.

alpha.i

by default, the program uses 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 alpha.i is assigned to be -1, the program will use zeroes as initial coefficients.

folds

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

verbo

output progress to the console.

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-control study of Type 2 diabetes. BMC Genetics, 18(1):44.

See Also

NetLogistic