How to get the total variance explained from an envfit object?
Hi, Unfortunately, I cannot give a direct answer to your question since I am not familiar with envfit. However, I wonder whether you have a specific reason to use unconstrained ordination. If you use a constrained method, varpart will produce exactly what you want. (See e.g. https://www.davidzeleny.net/anadat-r/doku.php/en:varpart_examples). Best Juan A. Balbuena El 07/11/2019 a las 21:02, Couch, Claire Elizabeth escribi?:
I am analyzing some microbiome data by using unconstrained ordination (PCA or NMDS) followed by environmental vector fitting with the envfit function in the vegan package. The output of envfit includes an r2 value for each vector or factor included in the envfit model, but I am interested in the total amount of variation explained by all the vectors/factors, rather than just stand-alone variables. I presume I cannot simply add up the R2 values assigned to each environmental variable, because there may be overlap in the microbiome variation that is "explained" by each environmental variable. However, there does not seem to be any way of accessing the total r2 value for the model. Using an example dataset, this is what I have tried so far: library(vegan) library(MASS) data(varespec, varechem) library(MASS) ord <- metaMDS(varespec) fit <- envfit(ord, varechem, perm = 999) fit This shows r2 for each environmental variable, but how do I extract the r2 value for the entire model? I have tried running fit$r, attributes(fit)$r, and Rsquare.Adj(fit), but these all return NULL. I would greatly appreciate any suggestions! [[alternative HTML version deleted]]
_______________________________________________ R-sig-ecology mailing list R-sig-ecology at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
Dr. Juan A. Balbuena Cavanilles Institute of Biodiversity and Evolutionary Biology Symbiont Ecology and Evolution Lab University of Valencia http://www.uv.es/~balbuena <http://www.uv.es/%7Ebalbuena> P.O. Box 22085 http://www.uv.es/cophylpaco 46071 Valencia, Spain e-mail: j.a.balbuena at uv.es <mailto:j.a.balbuena at uv.es>tel. +34 963 543 658??? fax +34 963 543 733 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ *NOTE!*For shipments by EXPRESS COURIER use the following street address: C/ Catedr?tico Jos? Beltr?n 2, 46980 Paterna (Valencia), Spain. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++