powered by
Forces all covariates in the specified group to have the same coefficient.
group_equal(vars)
A holistic generalized model constraint, object inheriting from class "hglmc".
"hglmc"
a vector specifying the indices or names of the covariates to which the constraint shall be applied.
Other Constraint-Constructors: group_inout(), group_sparsity(), include(), k_max(), linear(), lower(), pairwise_sign_coherence(), rho_max(), sign_coherence(), upper()
group_inout()
group_sparsity()
include()
k_max()
linear()
lower()
pairwise_sign_coherence()
rho_max()
sign_coherence()
upper()
dat <- rhglm(100, c(1, 2, 3, 4, 5, 6)) constraints <- group_equal(vars = c("x1", "x3")) hglm(y ~ ., constraints = constraints, data = dat)
Run the code above in your browser using DataLab