Learn R Programming

smacof (version 2.1-7)

driftVectors: Asymmetric MDS: Drift Vectors

Description

Takes an asymmetric dissimilarity matrix and decomposes it into a symmetric and a skew-symmetric part. Fits an MDS on the symmetric part and computes drift vectors for the skew-symmetric portion. This model makes it possible to see how these two components are related to each other. It is limited to two dimensions only.

Usage

driftVectors(data, type = c("ratio", "interval", "ordinal","mspline"), 
             weightmat = NULL, init = "torgerson", ties = "primary",  verbose = FALSE, 
             relax = FALSE, modulus = 1, itmax = 1000, eps = 1e-6, 
             spline.degree = 2, spline.intKnots = 2)
             
# S3 method for driftvec
plot(x, adjust = 1, main, xlim, ylim, 
                        xlab = "Dimension 1", ylab = "Dimension 2", pch = 20, asp = 1, 
                        col.conf = "black", col.drift = "lightgray", 
                        label.conf = list(label = TRUE, pos = 3, col = "black", 
                        cex = 0.8), ...)

Value

fitsym

MDS output for symmetric portion

sym

Symmetric matrix

skewsym

Skew-symmetric matrix

driftcoor

Drift vector coordinates

stress

Stress-1 value

niter

Number of iterations

nobj

Number of objects

Arguments

data

Asymmetric dissimilarity matrix

weightmat

Optional matrix with dissimilarity weights

init

Either "torgerson" (classical scaling starting solution), "random" (random configuration), or a user-defined matrix

type

MDS type: "interval", "ratio", "ordinal" (nonmetric MDS), or "mspline"

ties

Tie specification for ordinal MDS only: "primary", "secondary", or "tertiary"

verbose

If TRUE, intermediate stress is printed out

relax

If TRUE, block relaxation is used for majorization

modulus

Number of smacof iterations per monotone regression call

itmax

Maximum number of iterations

eps

Convergence criterion

spline.degree

Degree of the spline for "mspline" MDS type

spline.intKnots

Number of interior knots of the spline for "mspline" MDS type

x

Object of class "driftvec"

adjust

Scaling factor for drift vectors (value larger than 1 increases the length)

main

Plot title

xlab

Label of x-axis

ylab

Label of y-axis

xlim

Scale x-axis

ylim

Scale y-axis

pch

Plot symbol

asp

Aspect ratio

col.conf

Point color (MDS configurations)

col.drift

Color for drift vectors (arrows)

label.conf

Settings for plotting labels

...

Additional plotting arguments

Author

Patrick Mair

Details

The skew-symmetric values are embedded into the MDS representation of the symmetrized data by drawing errors (drift vectors) from each point \(i\) to each point \(j\) in the configuration so that these vectors correspond in length and direction to the values of row \(i\) of the skew-symmetric matrix.

References

Borg, I., & Groenen, P. J. F. (2005). Modern Multidimensional Scaling (2nd ed.). Springer.

See Also

smacofSym

Examples

Run this code
## simple example
P <- matrix(c(0,  4,  6, 13, 
              5,  0, 37, 21, 
              4, 38,  0, 16, 
              8, 31, 18,  0), nrow = 4, ncol = 4, byrow = TRUE) 
D <- sim2diss(P, method = 40) 
res <- driftVectors(D, type = "interval")
plot(res)
plot(res, adjust = 0.1)    ## shorten drift vectors 

## Morse code data
fit.drift <- driftVectors(morse2, type = "ordinal")
fit.drift
plot(fit.drift)

Run the code above in your browser using DataLab