[R] Ordination Plotting: Warning: Species scores not available
Jari Oksanen
jari.oksanen at oulu.fi
Fri Apr 12 09:50:28 CEST 2013
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 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]]
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
More information about the R-help
mailing list