0
votes

I'm working with a microbiome dataset with 3246 variables and 107 observations. I'm using metaMDS to do an NMDS plot with the default parameters.

Even though I reached a solution there are no site scores.

> ord <- metaMDS(data_dist)

Run 0 stress 0.1888251 
Run 1 stress 0.1911371 
Run 2 stress 0.188518 
... New best solution
... Procrustes: rmse 0.03850648  max resid 0.2697121 
Run 3 stress 0.196947 
Run 4 stress 0.2013088 
Run 5 stress 0.2017199 
Run 6 stress 0.1911485 
Run 7 stress 0.1888848 
... Procrustes: rmse 0.03362846  max resid 0.2705997 
Run 8 stress 0.2034295 
Run 9 stress 0.1890825 
Run 10 stress 0.1928713 
Run 11 stress 0.1907301 
Run 12 stress 0.1904192 
Run 13 stress 0.1898112 
Run 14 stress 0.1962496 
Run 15 stress 0.1898825 
Run 16 stress 0.1927416 
Run 17 stress 0.1885187 
... Procrustes: rmse 0.0001846372  max resid 0.001710078 
... Similar to previous best
Run 18 stress 0.1947141 
Run 19 stress 0.1995386 
Run 20 stress 0.1904549 
*** Solution reached

> score <- scores(ord, display = "sites")
Error in class(S) <- "scores" : attempt to set an attribute on NULL

I tried removing variables for which there are only one positive observation.

checkNumZerosCol <- apply(data_dist,2,function(x) sum(x==0))
cases <- which(checkNumZerosCol == (nrow(data_dist) - 1))
length(cases)
data_dist <- data_dist[,-cases]

I tried scaling the data to have a range between 0 and 10 (which I think metaMDS already does by itself...)

data_dist[] <- data_dist^0.25

I tried calculating the dissimilarity matrix before the ordination

dist <- vegdist(data_dist, method = "bray")

I used metaMDS so many times and it always worked before, I really don't know what to do to get those site scores... Does anyone know what's wrong with this community matrix?

Here is my community matrix : https://drive.google.com/file/d/1awS9xew241JsPABUc4NH9sY-YW2-_a23/view?usp=sharing

1

1 Answers

0
votes

No idea, but it very much looks that you have some other package loaded than vegan, and you're using scores function of that package: vegan::scores does not set class "scores" to its output.