Micah Bennett
2013-Apr-11 21:45 UTC
[R] Ordination Plotting: Warning: Species scores not available
Hi, I am working with a species-by-trait .csv file (columns=traits, rows=species) and get the following warning message when trying to plot results of both metaMDS and pcoa: "Warning message: In ordiplot(x, choices = choices, type = type, display = display, : Species scores not available" I am using a Gower's transformation in both procedures within the metaMDS or pcoa functions, and I know I am not using something already made into a distance matrix. There is missing trait data for some species, but there must be a way to plot the trait locations/vectors. There has been at least one posting about this in years past but it did not receive a satisfactory response. Any help would be much appreciated. -Micah [[alternative HTML version deleted]]
Jari Oksanen
2013-Apr-12 07:50 UTC
[R] Ordination Plotting: Warning: Species scores not available
Micah Bennett <micahgbennett <at> yahoo.com> writes:> > Hi, > > I am working with a species-by-trait .csv file (columns=traits,rows=species) and get the following> warning message when trying to plot results of both metaMDS and pcoa:? > > "Warning message: > In ordiplot(x, choices = choices, type = type, display = display,? : > ? Species scores not available" > > I am using a Gower's transformation in both procedures within the metaMDSor pcoa functions, and I know I am> not using something already made into a distance matrix. There is missingtrait data for some species, but> there must be a way to plot the trait locations/vectors. There has been atleast one posting about this in> years past but it did not receive a satisfactory response. > > Any help would be much appreciated. > > -Micah > [[alternative HTML version deleted]]Dear Micah Bennett, I don't know why you say that "there must be a way": there is no obligation to have this feature, but someone can write code to do so. However, as far as I know, this cannot be directly. Both metaMDS() and PCoA (which PCoA? Which function, which package?) work with dissimilarities, and dissimilarities have no information about original column variables. If you calculate dissimilarities within metaMDS, the function knows the original column values, and may be able add scores for those. However, it is not able to add those scores if you have missing values. Actually, I was not able to run metaMDS with missing values unless I suppressed calculating column scores (wascores = FALSE). So there is no direct way of getting those. I don't know how you calcualted PCoA, but the standard R function cmdscale (or its variant wcmdscale in vegan) only accept dissimilarities as input and are unable to add scores for original cover values. Perhaps there is a function called pcoa() somewhere (labdsv?) which can calculate the dissimilarities internally and is able to add column scores, but consult appropriate documentation in that package. You may be able to calculate column scores after the analysis. The default scores in vegan::metaMDS() are wascores() which do not handle missing values. No hope there. However, if you want to have fitted vectors or class centroids, you can use envfit(..., na.rm = TRUE) which will use the complete.cases() subset of the ordination scores for fitting the vectors or class centroids. If you want to have NA-handling in wascores, you better submit new code to vegan and we will incorporate that in the next release. Best wishes, Jari Oksanen
Apparently Analagous Threads
- I cannot get species scores to plot with site scores in MDS when I use a distance matrix as input. Problems with NA's?
- best ordination method for binary variables
- procrustes results affected by order of sites in input file
- Envfit, inconsistant result?
- NMDS in Vegan: problems in stressplot, best solution