VIF.subset {AlleleShift} | R Documentation |
Reduce the Climate Data based on Variance Inflation Factor Analysis.
Description
Through Variance Inflation Factor (VIF) analysis, a subset of variables is indentified where all variables have VIF below a predefined threshold.
Usage
VIF.subset(data, VIF.max, keep=NULL, silent=FALSE, cor.plot=TRUE)
Arguments
data |
(Bio)-Climatic or environmental descriptors of the populations |
VIF.max |
Maximum Variance Inflation Factor as in |
keep |
Variables to keep as in as in |
silent |
Limit the verbose output as in |
cor.plot |
Generate a correlation matrix for the final subset via |
Value
The function returns information on a subset of variables where VIF is below a pre-defined threshold.
Author(s)
Roeland Kindt (World Agroforestry, CIFOR-ICRAF)
Examples
data(Poptri.baseline.env)
# error as many variables are highly correlated
# VIF.subset(Poptri.baseline.env)
VIF.subset(Poptri.baseline.env, keep=c("MAT", "CMI"), cor.plot=TRUE)
[Package AlleleShift version 1.1-2 Index]