Group Sparsity Constraint
Constraint which restricts the number of covariates selected from a specific group.
group_sparsity(vars, k = 1L)
vars
: a vector specifying the indices or names of the covariates to which the group constraint shall be applied.k
: an integer giving the maximum number of covariates to be included in the model from the specified group.A holistic generalized model constraint, object inheriting from class "hglmc"
.
dat <- rhglm(100, c(1, 2, 0, 4, 5, 0)) constraints <- group_sparsity(c("x1", "x2", "x5"), 1L) hglm(y ~ ., constraints = constraints, data = dat)
Other Constraint-Constructors: group_equal()
, group_inout()
, include()
, k_max()
, linear()
, lower()
, pairwise_sign_coherence()
, rho_max()
, sign_coherence()
, upper()
Useful links