sign_coherence {holiglm} | R Documentation |
Sign Coherence Constraint
Description
Constraint which ensures that the coefficients of the specified covariates have a coherent sign.
Usage
sign_coherence(vars, big_m = 100, eps = 1e-06)
Arguments
vars |
a character vector giving the names of the covariates the constraint should be applied to. |
big_m |
a double giving the big-M parameter. |
eps |
a double giving the epsilon used to ensure that the constraint holds. |
Value
A holistic generalized model constraint, object inheriting from class "hglmc"
.
References
Carrizosa, E., Olivares-Nadal, A. V., & RamÃrez-Cobo, P. (2020). Integer Constraints for Enhancing Interpretability in Linear Regression. SORT. Statistics and Operations Research Transactions, 44: 67-98. doi:10.2436/20.8080.02.95.
See Also
Other Constraint-Constructors:
group_equal()
,
group_inout()
,
group_sparsity()
,
include()
,
k_max()
,
linear()
,
lower()
,
pairwise_sign_coherence()
,
rho_max()
,
upper()
Examples
dat <- rhglm(100, c(1, -2, 3, 4, 5, 6))
constraints <- sign_coherence(c("x1", "x3"))
hglm(y ~ ., constraints = constraints, data = dat)