Skip to content
Prev 1950 / 7420 Next

Change in rotated NMDS scores as a response variable

On 9/03/11 23:58 PM, "Erik Frenzel" <erikfrenzel at gmail.com> wrote:

            
Erik,

It is not documented to work, and it won't work: argument 'vec' must be a
single vector. I don't know how to do this exactly. However, you can achieve
something resembling your goal with Procrustes analysis. One problem is that
you must scale your target matrix variables adequately with respect to each
other. Another problem is that you minimize the distances between your
target scores (two variables) and ordination, and this is not orthogonal to
these target variables. You may also get weird results if your target
variables are correlated. Your responsibility is to take care of all these
aspects (and perhaps some more that I haven't listed). Technically, you can
proceed like this:

xy <- with(varechem, cbind(pH, Humdepth))
xy <- scale(xy)
# check: cor(xy)
# consider: xy <- scores(prcomp(~ pH + Humdepth, data=varechem, scale=TRUE))
ord3 <- metaMDS(varespec, k=3)
pro <- procrustes(xy, ord3) # will re-scale scores of ord3!
rot3 <- fitted(pro)

Cheers, Jari Oksanen