Learn R Programming

regnet (version 0.1.1)

McpLogistic: MCP logistic regression for a given lambda.

Description

This function makes predictions for MCP logistic for a given value of lambda1. Typical usage is to have the CV.MCPLogistic function compute the optimal lambda, then provide it to the McpLogistic function.

Usage

McpLogistic(X, Y, lambda, r = 5, alpha.i = 1, folds = 5)

Arguments

X

a matrix of predictors.

Y

a vector of the binary response.

lambda

the tuning parameter lambda imposes sparsity.

r

the regularization parameter in MCP.

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.

Value

the estimated coefficients vector.

See Also

CV.McpLogistic

Examples

Run this code
# NOT RUN {
b = McpLogistic(regnet$X, regnet$Y, 0.075)
regnet$beta # the true coefficient
# }

Run the code above in your browser using DataLab