An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-ecology/attachments/20120202/aaee589f/attachment.pl>
question concerning nmds.min
8 messages · Ivailo, Sarah Goslee, Gian Maria Niccolò Benucci
2012/2/2 Gian Maria Niccol? Benucci <gian.benucci at gmail.com>:
Hi all, I am trying to run a nmds with function nmds() Once I run the following code I wonder how to look to the R2 and stress value of the chosen configuration. iris.nmds <- nmds(iris.md, mindim=2, maxdim=2, nits=50) iris.nmin <- nmds.min(iris.nmds) Which among the 50 configuration the functions chose? How to look to its stress and R2 values? If I type iris.nmin I only got the X1 and X2 coordinates... Thanks in advance, Gian
Dear GIan, try the following: library(vegan) data(dune) sol <- metaMDS(dune) sol Call: metaMDS(comm = dune) global Multidimensional Scaling using monoMDS Data: dune Distance: bray Dimensions: 2 Stress: 0.1183195 Stress type 1, weak ties Two convergent solutions found after 5 tries Scaling: centring, PC rotation, halfchange scaling Species: expanded scores based on 'dune' Cheers, Ivailo
UBUNTU: a person is a person through other persons.
2012/2/2 Gian Maria Niccol? Benucci <gian.benucci at gmail.com>: ...
Which among the 50 configuration the functions chose? How to look to its stress and R2 values?
Forgot about the R-squared - according to the vegan FAQ "1 - stress^2 transforms nonlinear stress into quantity analogous to squared correlation coefficient. Function stressplot displays the nonlinear fit and gives this statistic." HTH, Ivailo
UBUNTU: a person is a person through other persons.
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-ecology/attachments/20120202/f7ad8284/attachment.pl>
Are you using ecodist? If so, you need to look at iris.nmds to get the stress and the r2. min(iris.nmds$stress) iris.nmds$r2[which.min(iris.nmds$stress)] The advantage of nmds.min() is that it lets you choose a particular dimension solution rather than the lowest available. For your example, the same thing can be achieved with iris.nmds$conf[[which.min(iris.nmds$stress)]] Sarah 2012/2/2 Gian Maria Niccol? Benucci <gian.benucci at gmail.com>:
Hi all, I am trying to run a nmds with function nmds() Once I run the following code I wonder how to look to the R2 and stress value of the chosen configuration. iris.nmds <- nmds(iris.md, mindim=2, maxdim=2, nits=50) iris.nmin <- nmds.min(iris.nmds) Which among the 50 configuration the functions chose? How to look to its stress and R2 values? If I type iris.nmin I only got the X1 and X2 coordinates... Thanks in advance, Gian
Sarah Goslee http://www.functionaldiversity.org
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-ecology/attachments/20120202/f12b6bea/attachment.pl>
In the next update of ecodist, nmds.min() will return the stress and r2 for the selected configuration. Thanks for the suggestion. Sarah 2012/2/2 Gian Maria Niccol? Benucci <gian.benucci at gmail.com>:
Thank you, you were of great help. Cheers, G. 2012/2/2 Sarah Goslee <sarah.goslee at gmail.com>
Are you using ecodist? If so, you need to look at iris.nmds to get the stress and the r2. min(iris.nmds$stress) iris.nmds$r2[which.min(iris.nmds$stress)] The advantage of nmds.min() is that it lets you choose a particular dimension solution rather than the lowest available. For your example, the same thing can be achieved with iris.nmds$conf[[which.min(iris.nmds$stress)]] Sarah
Sarah Goslee http://www.functionaldiversity.org
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-ecology/attachments/20120202/59ee2ed8/attachment.pl>