Description Usage Arguments Value Author(s) Examples
View source: R/autoSelectVariables.R
Applies biserialCorrelation
, correlationDendrogram
(with correlation threshold set to 0.5), and autoVIF
to automatically select a set of non-correlated variables with the higher biserial correlation as possible.
1 2 3 4 5 6 7 8 | autoSelectVariables(
x,
presence.column = "presence",
variables = NULL,
exclude.variables = NULL,
plot = TRUE,
label.size = 6
)
|
x |
A data frame with a presence column with 1 indicating presence and 0 indicating background, and columns with predictor values. |
presence.column |
Character, name of the presence column. |
variables |
Character vector, names of the columns representing predictors. If |
exclude.variables |
Character vector, variables to exclude from the analysis. |
plot |
Boolean, if |
label.size |
Numeric, size of the dendrogram labels. |
A character vector with the names of the selected variables.
Blas Benito <blasbenito@gmail.com>.
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
data(virtualSpeciesPB)
selected.vars <- autoSelectVariables(
x = virtualSpeciesPB,
presence.column = "presence",
exclude.variables = c("x", "y")
)
selected.vars
HH::vif(virtualSpeciesPB[, selected.vars])
cor(virtualSpeciesPB[, selected.vars])
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.