[R-sig-eco] NMDS in vegan

Jari Oksanen jari.oksanen at oulu.fi
Thu Jun 12 06:16:46 CEST 2008


Quoting Manuel Spínola <mspinola10 at gmail.com>:

> Dear list,
>
> I am trying to run a NMDS in vegan.  I am using standardized variables,
> so I have negative values.  This is my output:
>
>> metricas =read.table("metricas_std.txt", header=TRUE)
>> attach(metricas)
>
>        The following object(s) are masked from metricas ( position 3 ) :
>
>         LPI MNN MSI NUMP
>
>> metricas
>      NUMP   LPI   MSI   MNN
> 1945 -1.72  0.10 -1.20 -1.03
> 1960  0.83  0.62 -0.90 -1.13
> 1980  0.55  1.27  0.12  0.45
> 1997  0.09 -1.00  0.90  0.97
> 2005  0.24 -1.00  0.72  0.72
>> metricas.dis <- vegdist(metricas, "euclidean")
>> metricas.dis
>          1945      1960      1980      1997
> 1960 2.6216216                             1980 3.2333574 2.0094029
>               1997 3.5911140 3.2896808 2.4986596         2005 3.4351856
> 3.0032316 2.3836736 0.3426368
>> metamds = metaMDS(metricas, distance="euclidean")
> Using step-across dissimilarities:
> Too long or NA distances: 9 out of 10 (90.0%)
> Stepping across 10 dissimilarities...
> Error in isoMDS(dist, k = k, trace = isotrace) :
>  an initial configuration must be supplied with NA/Infs in 'd'
> In addition: Warning message:
> In stepacross(dis, trace = trace, ...) :
>  Disconnected data: Result will contain NAs
>
> Do you know what is going on?

Only what metaMDS says above: you use the default of regarding  
dissimilarities >1 as NA (missing), and try to use 'stepacross' to  
replace those. However, only one dissimilarity is left ("Too long or  
NA distances: 9 out of 10 (90.0%)") which leaves you one observed  
value. With this you cannot reconstitute a complete dissimilarity  
matrix, and you get "Disconnected data: Result will contain NAs" and  
in this case "an initial configuration must be supplied with NA/Infs  
in 'd'". That wouldn't help with only one observed dissimilarity,  
though.

metaMDS is intended for ordinary community data which you don't have.  
You have to turn off those default options that are used for community  
data. In this case that means:

metaMDS(x, "euc", too=0, wa=FALSE, auto=FALSE)

Here auto=F is not strictly necessary, but it is safe for you kind of data.

This gives you zero stress which indicates that in this case (and with  
five points!) metaMDS/isoMDS is a dubious choice.

cheers, jari oksanen



More information about the R-sig-ecology mailing list