

   KKrruusskkaall''ss NNoonn--mmeettrriicc MMuullttiiddiimmeennssiioonnaall SSccaalliinngg

        isoMDS(d, y = cmdscale(d, k), k = 2, niter = 50, trace = T)

   AArrgguummeennttss::

          d: distance structure of the form returned by `dist',
             or a full, symmetric matrix.  Data are assumed to
             be dissimilarities or relative distances, but must
             be positive except for self-distance.

          y: An initial configuration. If none is supplied,
             `cmdscale' is used to provide the classical solu-
             tion.

          k: The dimension of the configuration.

      niter: The maximum number of iterations.

      trace: Logical for tracing optimization. Default `true'.

   DDeessccrriippttiioonn::

        One form of non-metric multidimensional scaling

   DDeettaaiillss::

        This chooses a two-dimensional configuration to mini-
        mize the stress, the square root of the ratio of the
        the sum of squared differences between the input dis-
        tances and those of the configuration to the sum of
        configuration distances squared. However, the input
        distances are allowed a monotonic transformation.

        An iterative algorithm is used, which will usually con-
        verge in around 10 iterations. As this is necessarily
        an O(n^2) calculation, it is slow for large datasets.
        Further, since the configuration is only determined up
        to rotations and reflections (by convention the cen-
        troid is at the origin), the result can vary consider-
        ably from machine to machine.

   VVaalluuee::

        Two components:

     points: A two-column vector of the fitted configuration.

     stress: The final stress achieved (in percent).

   SSiiddee EEffffeeccttss::

        If trace is true, the initial stress and the current
        stress are printed out every 5 iterations.

   RReeffeerreenncceess::

        T. F. Cox and M. A. A. Cox (1994) Multidimensional
        Scaling.  Chapman  Hall.

   SSeeee AAllssoo::

        `cmdscale', `sammon'

   EExxaammpplleess::

        data(swiss)
        swiss.x <- as.matrix(swiss[, -1])
        swiss.dist <- dist(swiss.x)
        swiss.mds<-isoMDS(swiss.dist)
        plot(swiss.mds$points, type="n")
        text(swiss.mds$points, labels=as.character(1:nrow(swiss.x)))
        swiss.sh <- Shepard(swiss.dist, swiss.mds$points)
        plot(swiss.sh)
        lines(swiss.sh$x, swiss.sh$yf, type="S")

