[R-sig-eco] how to calculate "axis variance" in metaMDS, pakage vegan?

Jari Oksanen jari.oksanen at oulu.fi
Wed Dec 2 19:13:53 CET 2009


On 2/12/09 19:55 PM, "Gian Maria Niccolò Benucci" <gian.benucci at gmail.com>
wrote:

> Okey, I understood...
> I have a matrix of 40 rows (samples) and 29 columns (species). In the
> ordination graph the data divide in two clades ( as i supposed they must
> to)... and that's my best solution for reduce the Stress...
> 
>> metaMDS(sqrtABCD, distance = "bray", k = 23, trymax = 50, autotransform
> =F) -> NMS.trial

Gian,

This looks very much like badly degenerate solution. You shouldn't use 23
axes in NMDS, in particular with 40 x 20 source data. In Euclidean space
that data would give you rank of 20 or you could find at maximum 20 axes in
metric scaling. In the Bray-Curtis space the situation is more complicated,
but one random data set (Poisson random variates with lambda = 3.14) gave 25
positive and 14 negative eigenvalues. Probably the 23 dimensions you specify
exhaust the real part of your space even in metric scaling, and probably
(and obviously) fail miserably in nonmetric scaling. You shouldn't get
stress of that magnitude with a decent model with data like that.

It has never occurred to me that anybody would like to have NMDS with that
high number of dimensions. Usually we want to use two, sometimes one or two
more, but that's about the limit. Do the same and set k=2 to k=4 at maximum.
If you want to have mapping of all of your real space (i.e., ignore the
complex space), you can use metric scaling. The standard R choice is
cmdscale(). The vegan alternatives are capscale() which also can do
unconstrained metric scaling, returns information both on the real and
imaginary components of your space, and has plot and other support
functions. The low level alternative in vegan is wcmdscale() which also is
used by capscale(), but does not have any support functions (lacks even
print.wcmdscale!)

NMDS is really intended for nonlinear mapping onto *low* number of
dimensions.

Cheers, Jari Oksanen

>> NMS.trial
> 
> Call:
> metaMDS(comm = sqrtABCD, distance = "bray", k = 23, trymax = 100,
> autotransform = F)
> 
> Nonmetric Multidimensional Scaling using isoMDS (MASS package)
> 
> Data:     sqrtABCD
> Distance: bray shortest
> 
> Dimensions: 23
> Stress:     0.2548688
> Two convergent solutions found after 8 tries
> Scaling: centring, PC rotation, halfchange scaling
> Species: expanded scores based on ŒsqrtABCD‚
> 
> With more than 23 dimensions R gave me that result:
> 
>> metaMDS(sqrtABCD, distance = "bray", k = 30, trymax = 50,
> Using step-across dissimilarities:
> Too long or NA distances: 230 out of 780 (29.5%)
> Stepping across 780 dissimilarities...
> Errore in isoMDS(dist, k = k, trace = isotrace) :
>   initial configuration must be complete
> Inoltre: Warning messages:
> 1: In cmdscale(d, k) : some of the first 30 eigenvalues are < 0
> 2: In sqrt(ev) : Si è prodotto un NaN
>> 
> 
> ...Is normal I got better ordination (sepatation of different samples, that
> I know they're different) with few dimension also if the Stress is high?
> 
> ... I supposed, that If we use as many dimensions as there are variables,
> then we can perfectly reproduce the observed distance matrix. Isn't it? But,
> of course, our goal is to reduce the observed complexity of nature, that is,
> to explain the distance matrix in terms of fewer underlying dimensions...
> So what is best at the end??
> And also wich is the function for plotting the stress values versus the
> number of dimnsions and how to read the plot?
> I hope I was clear, thank you so much!
> Yours,
> 
> G.
> 
> [[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



More information about the R-sig-ecology mailing list