| bridge | R Documentation |
Fit a bridge-penalized least-squares path using local quadratic approximation.
bridge(
X,
y,
q = 1,
lambda.min = ifelse(n > p, 0.001, 0.05),
nlambda = 100,
lambda,
eta = 1e-07,
converge = 10^10
)
X |
Numeric design matrix with |
y |
Numeric response vector of length |
q |
Bridge-penalty exponent, a finite number in |
lambda.min |
Positive absolute endpoint of the automatically generated
penalty grid. The default is |
nlambda |
Number of automatically generated penalty values, an integer
of at least 2. The default is |
lambda |
Optional nonempty numeric vector of finite, nonnegative penalty
values. Its order is retained. When supplied, it determines the fitted path
and overrides |
eta |
Positive numerical tolerance, with default |
converge |
Nonnegative initial convergence-distance value, retained for
compatibility. The default is |
Predictors are centered and divided by their centered root-mean-square
(RMS) deviations, using the observation count n as the divisor.
The response is centered. The intercept is reconstructed after fitting,
and returned coefficients are expressed on the original predictor scale.
The generated penalties are logarithmically spaced between an internally
computed starting value and the absolute endpoint lambda.min.
Let Z be the n by p centered, RMS-standardized
design, y_c the centered response vector of length n, and
b the p-dimensional standardized slope vector.
For exponent q \in (0,2] and penalty weight \lambda \ge 0,
Equation (1) defines the penalized least-squares target:
\min_{b}
\left\{\|y_c-Zb\|_2^2+\lambda\sum_{j=1}^{p}|b_j|^q\right\}. \qquad (1)
In Equation (1), \|\cdot\|_2^2 is the squared Euclidean norm,
so its first term is the unnormalized residual sum of squares.
The index j runs over the predictors; the second term is the bridge
penalty, with \lambda controlling its weight relative to residual error.
The fitting routine applies the article's LQA updates, coefficient elimination
and stopping rules. The criterion is nonconvex when q < 1, so the
iterative result is not a guarantee of a global minimum. The getting-started
vignette explains the penalty geometry and the fixed-LQA restriction correction.
A list of class bridge with components:
betas |
Numeric coefficient matrix with |
lambda |
Numeric vector of penalties, in fitted column order. |
Bahadir Yuzbasi
Maintainer: Bahadir Yuzbasi b.yzb@hotmail.com
Yuzbasi, B., Arashi, M. and Akdeniz, F. (2021). Penalized regression via the restricted bridge estimator. Soft Computing, 25, 8401–8416. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s00500-021-05763-9")}.
cv.bridge, coef.bridge, predict.bridge
# Reproducible synthetic demonstration: 100 observations, eight predictors.
set.seed(2019)
beta <- c(3, 1.5, 0, 0, 2, 0, 0, 0)
p <- length(beta)
beta <- matrix(beta, nrow = p, ncol = 1)
n <- 100
X <- matrix(rnorm(n * p), nrow = n, ncol = p)
y <- as.numeric(X %*% beta + rnorm(n))
# Five penalties keep this help example fast; the default is 100.
# L1 and L2 penalty forms on the same observations.
model1 <- bridge(X, y, q = 1, nlambda = 5)
model2 <- bridge(X, y, q = 2, nlambda = 5)
dim(model1$betas)
# Extract one fitted column and predict five observations.
selected <- model1$lambda[2]
coef(model1, s = selected)
predict(model1, newx = X[1:5, , drop = FALSE], s = selected)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.