pairwise_sign_coherence function

Pairwise Sign Coherence

Pairwise Sign Coherence

Ensures that coefficients of covariates which exhibit strong pairwise correlation have a coherent sign.

pairwise_sign_coherence( rho = 0.8, exclude = "(Intercept)", big_m = 100, eps = 1e-06, use = c("everything", "all.obs", "complete.obs", "na.or.complete", "pairwise.complete.obs"), method = c("pearson", "kendall", "spearman") )

Arguments

  • rho: a value in the range [0,1] specifying the maximum allowed collinearity between pairs of covariates.
  • exclude: a character vector giving the names of the covariates to be excluded from the constraint (default is "(Intercept)").
  • big_m: a double giving the big-M parameter.
  • eps: a double giving the epsilon for the equal sign constraint. Since most numerical solvers can only handle constraints up to some epsilon, e.g., the constraint AxbA x \geq b is typically transformed to Axb0|A x - b| \geq 0. By providing an eps>0 > 0 and changing the constraint to Axb|A x - b| \geq eps we can ensure Axb>0|A x - b| > 0.
  • use: an optional character string giving a method for computing covariances in the presence of missing values. The parameter is passed to cor, therefore see cor for more information.
  • method: a character string indicating which correlation coefficient is to be computed. The parameter is passed to cor, therefore see cor for more information.

Returns

A holistic generalized model constraint, object inheriting from class "hglmc".

Examples

constraints <- c(k_max(7), pairwise_sign_coherence())

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. tools:::Rd_expr_doi("10.2436/20.8080.02.95") .

See Also

Other Constraint-Constructors: group_equal(), group_inout(), group_sparsity(), include(), k_max(), linear(), lower(), rho_max(), sign_coherence(), upper()

  • Maintainer: Benjamin Schwendinger
  • License: GPL-3
  • Last published: 2024-12-20

Useful links