pairwise_sign_coherence {holiglm}R Documentation

Pairwise Sign Coherence

Description

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

Usage

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 A x \geq b is typically transformed to |A x - b| \geq 0. By providing an eps > 0 and changing the constraint to |A x - b| \geq eps we can ensure |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.

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(), rho_max(), sign_coherence(), upper()

Examples

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

[Package holiglm version 1.0.0 Index]