Open lemetrec opened 7 years ago
So I was just able to acces the NMDS points coordinates with:
prev.ordNMDS_data1$points
Still need to solve how to get to the variance.
So unlike PCA (and PCoA, and CA, etc) the axes in NMDS aren't meaningful, they are arbitrary, therefore there is no way to calcualte the variation explained by an NMDS axis as you would in those other methods. The goodness of an NMDS ordination is instead explained by the Stress.
The NMDS ordination in phylsoeq is performed using vegan's metaMDS
function. If you call the result of the ordination result you can see the stress value, and if you use the stressplot()
function on the ordination result you can see the associated non-metric and linear fits of your original dissimilarity/distance vs the final ordination points.
Hope that helps.
Cheers Richard
Hi @lemetrec ,
Could please advise me what normalize method should I use before these step? prev.ordNMDS_data1 <- ordinate(data1_prev_norm, "NMDS", "bray") plot_ordination(data1_prev_norm, ordination = prev.ordNMDS_data1, color="Region") + theme_minimal() + geom_point(size=5)
Thanks
Hi!
I have a couple of issues/questions, for which I can't seem to be able to find an answer browsing through everything.
1) I am using plot_ordination to generate an NMDS plot on my data, I would like to know what variance is explained by each NMDS (NMDS1 and NMDS2 axis). The PCA plots do give this on the axis of each Principal Component, but I can't seem to be able to get it for the NMDS one...
2) Also from the plot_ordination object, I would like to export the coordinates of the NMDS scatterplot generated into a dataframe or table in order to get some regression analysis on the data. Is there a method to access these coordinates directly?
Many thanks!
Here is an example of how I generate the plots:
prev.ordNMDS_data1 <- ordinate(data1_prev_norm, "NMDS", "bray") plot_ordination(data1_prev_norm, ordination = prev.ordNMDS_data1, color="Region") + theme_minimal() + geom_point(size=5)