pairwise_sign_coherence | R Documentation |
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")
)
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 |
use |
an optional character string giving a method for computing
covariances in the presence of missing values.
The parameter is passed to |
method |
a character string indicating which correlation coefficient
is to be computed.
The parameter is passed to |
A holistic generalized model constraint, object inheriting from class "hglmc"
.
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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.2436/20.8080.02.95")}.
Other Constraint-Constructors:
group_equal()
,
group_inout()
,
group_sparsity()
,
include()
,
k_max()
,
linear()
,
lower()
,
rho_max()
,
sign_coherence()
,
upper()
constraints <- c(k_max(7), pairwise_sign_coherence())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.