vif_predictors {caretSDM} | R Documentation |
Calculate VIF
Description
Apply Variance Inflation Factor (VIF) calculation.
Usage
vif_predictors(pred, area = "all", th = 0.5, maxobservations = 5000, variables_selected =
NULL)
vif_summary(i)
selected_variables(i)
Arguments
pred |
A |
area |
Character. Which area should be used in vif selection? Standard is |
th |
Threshold to be applied in VIF routine. See ?usdm::vifcor. |
maxobservations |
Max observations to use to calculate the VIF. |
variables_selected |
If there is a subset of predictors that should be used in this
function, it can be informed using this parameter. If set to |
i |
A |
Details
vif_predictors is a wrapper function to run usdm::vifcor in caretSDM.
Value
A input_sdm
or predictors
object with VIF data.
Author(s)
Luíz Fernando Esser (luizesser@gmail.com) https://luizfesser.wordpress.com
See Also
Examples
# Create sdm_area object:
sa <- sdm_area(parana, cell_size = 25000, crs = 6933)
# Include predictors:
sa <- add_predictors(sa, bioc) |> select_predictors(c("bio1", "bio4", "bio12"))
# Include scenarios:
sa <- add_scenarios(sa, scen)
# Create occurrences:
oc <- occurrences_sdm(occ, crs = 6933) |> join_area(sa)
# Create input_sdm:
i <- input_sdm(oc, sa)
# VIF calculation:
i <- vif_predictors(i)
i
# Retrieve information about vif:
vif_summary(i)
selected_variables(i)
[Package caretSDM version 1.1.0.1 Index]