correl_filter | R Documentation |
Filter using correlation (Pearson or Spearman) for ranking variables.
correl_filter(
y,
x,
method = "pearson",
force_vars = NULL,
nfilter = NULL,
p_cutoff = 0.05,
rsq_cutoff = NULL,
type = c("index", "names", "full"),
keep_factors = TRUE,
...
)
y |
Response vector |
x |
Matrix or dataframe of predictors |
method |
Type of correlation, either "pearson" or "spearman". |
force_vars |
Vector of column names within |
nfilter |
Number of predictors to return. If |
p_cutoff |
p value cut-off |
rsq_cutoff |
r^2 cutoff for removing predictors due to collinearity.
Default |
type |
Type of vector returned. Default "index" returns indices, "names" returns predictor names, "full" returns a matrix of p-values. |
keep_factors |
Logical affecting factors with 3 or more levels.
Dataframes are coerced to a matrix using data.matrix. Binary
factors are converted to numeric values 0/1 and analysed as such. If
|
... |
Further arguments passed to correls |
Integer vector of indices of filtered parameters (type = "index") or
character vector of names (type = "names") of filtered parameters. If
type
is "full"
full output from correls is returned.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.