View source: R/1.2b.f.sel.env.R
correlated | R Documentation |
This function creates a correlation matrix for the layers of a raster brick/stack and returns a brick containing the least correlated variables below the cutoff value.
correlated(corr.mat, cutoff = 0.9, names = F)
corr.mat |
A correlation matrix |
cutoff |
A numeric value for the pair-wise absolute correlation cutoff. |
names |
Logical. Should variable names or indexes be returned? |
The function finds variables with correlation above the cutoff and sucessively picks up the variable with the largest number of pair-wise correlations above the cutoff. At each step, the variable is assigned to a group containing all variables with at least one correlated variable in common. The variable with the largest within group mean correlation is discarded.
A vector of variable names (when names = TRUE) or variable/column indexes (when names = F). If there are no correlations above the cutoff, all variable names (or indexes) is returned
select_vars_b
, select_vars
, findCorrelation
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.