Formula: l_p(beta; y) = l(beta; y) - lambda sum_c sum_j |beta_cj|
(eq. 7.10): the same block updating as eq. (7.9) but with the quadratic
penalty replaced by an L1 one.
Usage
Msm115(X, y, beta0, beta, lam = 1, baseline_last = TRUE)
Arguments
- X
Design matrix.
- y
Class labels, zero-based.
- beta0
Intercepts, one per non-baseline category.
- beta
Slope matrix, one row per non-baseline category.
- lam
Penalty weight.
- baseline_last
Fix the last category at zero for identifiability.
Value
List with estimate, loglik, penalty, method.
References
Montesinos Lopez, Montesinos Lopez & Crossa (2022),
Multivariate Statistical Machine Learning Methods for Genomic Prediction,
Springer, eq. (7.10) p.227. DOI 10.1007/978-3-030-89010-0.
Examples
set.seed(18)
X <- matrix(rnorm(40), 20, 2)
y <- sample(0:2, 20, TRUE)
Msm115(X, y, beta0 = c(0, 0), beta = matrix(0.3, 2, 2), lam = 1)$estimate
#> [1] -24.27971