cmdscale {mva}R Documentation

Classical (Metric) Multidimensional Scaling

Description

Classical multidimensional scaling of a data matrix.

Usage

cmdscale(d, k = 2, eig = FALSE)

Arguments

d a distance structure such as that returned by dist or a full symmetric matrix containing the dissimilarities.
k the dimension of the space which the data are to be represented in.
eig indicates whether eigenvalues should be returned.

Details

Multidimensional scaling takes a set of dissimilarities and returns a set of points such that the distances between the points are approximately equal to the dissimilarities.

The functions isoMDS and sammon in package `MASS' provide alternative ordination techniques.

Value

If eig = FALSE, a matrix with k columns whose rows give the coordinates of the points chosen to represent the dissimilarities.
Otherwise, a list containing the following components.

points a matrix with k columns whose rows give the coordinates of the points chosen to represent the dissimilarities.
eig the eigenvalues computed during the scaling process.

Note

The S version of this function provides for computing an additional ``fiddle'' factor suggested by Torgerson. R does not provide this option.

References

Seber, G. A. F. (1984). Multivariate Analysis. New York: Wiley.

Torgerson, W. S. (1958). Theory and Methods of Scaling. New York: Wiley.

See Also

dist. Also isoMDS and sammon in package `MASS'.

Examples

data(eurodist)
loc <- cmdscale(eurodist)
x <- loc[,1]
y <- -loc[,2]
plot(x, y, type="n", xlab="", ylab="")
text(x, y, names(eurodist), cex=0.5)