powered by
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)
The function returns information on a subset of variables where VIF is below a pre-defined threshold.
(Bio)-Climatic or environmental descriptors of the populations
Maximum Variance Inflation Factor as in ensemble.VIF.dataframe that is used internally.
ensemble.VIF.dataframe
Variables to keep as in as in ensemble.VIF.dataframe.
Limit the verbose output as in ensemble.VIF.dataframe.
Generate a correlation matrix for the final subset via ggcorr.
ggcorr
Roeland Kindt (World Agroforestry, CIFOR-ICRAF)
# \donttest{ 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) # }
Run the code above in your browser using DataLab