MDS {MVar}R Documentation

Multidimensional Scaling (MDS).

Description

Performs Multidimensional Scaling (MDS) on a data set.

Usage

MDS(data, distance = "euclidean", title = NA, xlabel = NA,  
    ylabel = NA, posleg = 2, boxleg = TRUE, axes = TRUE, 
    size = 1.1, grid = TRUE, color = TRUE, linlab = NA, class = NA)

Arguments

data

Data to be analyzed.

distance

Metric of the distance: "euclidean" (default), "maximum", "manhattan", "canberra", "binary" or "minkowski".

title

Titles of the graphics, if not set, assumes the default text.

xlabel

Names the X axis, if not set, assumes the default text.

ylabel

Names the Y axis, if not set, assumes the default text.

posleg

0 with no caption,
1 for caption in the left upper corner,
2 for caption in the right upper corner (default),
3 for caption in the right lower corner,
4 for caption in the left lower corner.

boxleg

Puts the frame in the caption (default = TRUE).

axes

Plot the X and Y axes (default = TRUE).

size

Size of the points in the graphs.

grid

Put grid on graphs (default = TRUE).

color

Colored graphics (default = TRUE).

linlab

Vector with the labels for the observations.

class

Vector with names of data classes.

Value

Multidimensional Scaling.

mtxD

Matrix of the distances.

Author(s)

Paulo Cesar Ossani

Marcelo Angelo Cirillo

References

MINGOTI, S. A. Analise de dados atraves de metodos de estatistica multivariada: uma abordagem aplicada. Belo Horizonte: UFMG, 2005. 297 p.

RENCHER, A. C. Methods of multivariate analysis. 2th. ed. New York: J.Wiley, 2002. 708 p.

Examples

data(iris) # data set

data <- iris[,1:4]

cls <- iris[,5] # data class

MD <- MDS(data = data, distance = "euclidean", title = NA, xlabel = NA,  
          ylabel = NA, posleg = 2, boxleg = TRUE, axes = TRUE, 
          color = TRUE, linlab = NA, class = cls)
          
print("Matrix of the distances:"); MD$mtxD

[Package MVar version 2.0.9 Index]