VIF.subset | R Documentation |
Through Variance Inflation Factor (VIF) analysis, a subset of variables is indentified where all variables have VIF below a predefined threshold.
VIF.subset(data, VIF.max, keep=NULL, silent=FALSE, cor.plot=TRUE)
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 |
The function returns information on a subset of variables where VIF is below a pre-defined threshold.
Roeland Kindt (World Agroforestry, CIFOR-ICRAF)
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.