Thanks Jari- however, when I try this code, it gives me some results for
runs with stresses, says I have a solution reached, and then I get an error:

Error in cov.wt(x, x.w) : weights must be non-negative and not all zero

I'm assuming this is saying I have either zeros or negative values in my
distance matrix? Which I shouldn't- when I specify the distance matrix
outside of metaMDS, it's all values between 0 and root 2, and I don't see
any zero values.

Needless to say, the update() doesn't work because the object I'm assinging
metaMDS to doesn't exist after the error gets thrown.

All that said, I do have negative values in my original data matrix (it's
z-score transformed before I hit the analysis). BUt I don't think that
should matter, should it? Since I can get a proper distance matrix outside
the metaMDS code?

Thoughts?

Mike

On Wed, Sep 22, 2010 at 1:50 PM, Jari Oksanen <jari.oksanen@oulu.fi> wrote:

> On 22/09/10 21:42 PM, "Mike Rennie" <mikerennie.r@gmail.com> wrote:
>
> > Hi all,
> >
> > I have been running principal coordinates analysis on a "chord" distance
> > matrix (stand normalized for some) using cmdscale. I am trying now to do
> > this with metaMDS but running into some issues.
> >
> > I can execute the code by specifying the distance matrix, and it works
> > fine...
> >
> > obj.nmds<-metaMDS(dist.mat, k=4)
> >
> > FYI, I got the chord distance matrix as follows:
> >
> > dist.mat<-vegdist(decostand(as.matrix(orig.dat), "norm"),"euclidean")
> >
> > I get a solution, and can get at all the site scores in the object
> dist.mat.
> > However, I also want species scores, which means I need to specify the
> > starting dataset in the command.
> >
> > My question is: how do I specify the chord distance as a command in
> metaMDS?
> > I've tried a bunch of things that don't work. I know my code should
> > eventually look something like:
> >
> Mike,
>
> obj.nmds <- metaMDS(decostand(orig.data, "norm"), "euclid", k=4,
> zerodist="add", autotrans=FALSE)
>
> > obj2.nmds<-metaMDS(orig.dat, distance = "something that specifies chord
> > distance", k=4, zerodist="add", autotransform = FALSE, wascores=TRUE)
> >
> > It's the "something that specifies chord distance" that I'm having
> trouble
> > with. R seems to want a string descriptor there, and I want to give it
> the
> > call to vegdist but it doesn't look like it wants to let me. If I try and
> > submit the call to vegdist, e.g.,
> >
> > obj2.nmds<-metaMDS(orig.dat, distance =
> > vegdist(decostand(as.matrix(orig.dat), "norm"),"euclidean"), k=4,
> > zerodist="add", autotransform = FALSE, wascores=TRUE)
> >
> >
> > I get an error saying "invalid distance method".
> >
> > Surely there's a way around this, but it seems like a coding issue which
> is
> > why I'm not including example data.
> >
> > Any thoughts?
> >
> > Mike
> >
> > PS- I also gather from reading other posts that I should loop this 50
> times
> > or so to make sure I don't end up on some local solution?
>
> If it doesn't converge, continue with
>
> obj.nmds <- update(obj.nmds, previous = obj.nmds)
>
> cheers, Jari Oksanen
>
>

	[[alternative HTML version deleted]]

