CBPLogisticE {CBPE} | R Documentation |
Correlation-based Estimator for Logistic Regression Models
Description
This function computes the correlation-based estimator for logistic regression models.
Usage
CBPLogisticE(X, y, lambda, max_iter = 100, tol = 1e-06)
Arguments
X |
A numeric matrix of predictors where rows represent observations and columns represent variables. |
y |
A numeric vector of binary outcomes (0 or 1). |
lambda |
A regularization parameter. |
max_iter |
An integer specifying the maximum number of iterations for the logistic regression algorithm. Default is 100. |
tol |
A numeric value specifying the convergence tolerance for the logistic regression algorithm. Default is 1e-10. |
Details
The correlation-based penalized logistic estimator is calculated as:
where and
denotes the (empirical) correlation between the
th and the
th predictor.
Value
A numeric vector of the estimated coefficients for the specified model.
References
Algamal, Z. Y., & Lee, M. H. (2015). Penalized logistic regression with the adaptive LASSO for gene selection in high-dimensional cancer classification. Expert Systems with Applications, 42(23), 9326-9332.
Examples
set.seed(42)
n <- 100
p <- 4
X <- matrix(rnorm(n * p), n, p)
beta_true <- c(0.5, -1, 2, 5)
y <- rbinom(n, 1, 1 / (1 + exp(-X %*% beta_true)))
lambda <- 0.1
result <- CBPLogisticE(X, y, lambda)
print(result)