rho_max {holiglm} | R Documentation |
Constraint on the Pairwise Correlation of Covariates
Description
Constraint which ensures that only one covariate out of a pair of covariates with a correlation of at least rho
will be included in the final model.
Usage
rho_max(
rho = 0.8,
exclude = "(Intercept)",
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 |
variables to be excluded form the pairwise
correlation constraints (default is |
use |
an optional character string giving a method for computing
co-variances in the presence of missing values.
The parameter is passed to |
method |
a character string indicating which correlation coefficient
is to be computed. See |
Value
A holistic generalized model constraint, object inheriting from class "hglmc"
.
See Also
Other Constraint-Constructors:
group_equal()
,
group_inout()
,
group_sparsity()
,
include()
,
k_max()
,
linear()
,
lower()
,
pairwise_sign_coherence()
,
sign_coherence()
,
upper()
Examples
beta <- 1:3
Sigma <- cov_matrix(k = length(beta) - 1L, 1, 2, 0.9)
dat <- rhglm(100, beta, sigma = Sigma)
hglm(y ~ ., constraints = rho_max(0.8), data = dat)