driftVectors {smacof} | R Documentation |
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 class '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), ...)
Arguments
data |
Asymmetric dissimilarity matrix |
weightmat |
Optional matrix with dissimilarity weights |
init |
Either |
type |
MDS type: |
ties |
Tie specification for ordinal MDS only: |
verbose |
If |
relax |
If |
modulus |
Number of smacof iterations per monotone regression call |
itmax |
Maximum number of iterations |
eps |
Convergence criterion |
spline.degree |
Degree of the spline for |
spline.intKnots |
Number of interior knots of the spline for |
x |
Object of class |
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 |
Details
The skew-symmetric values are embedded into the MDS representation of the symmetrized data by drawing errors (drift vectors)
from each point to each point
in the configuration so that these vectors correspond in length and
direction to the values of row
of the skew-symmetric matrix.
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 |
Author(s)
Patrick Mair
References
Borg, I., & Groenen, P. J. F. (2005). Modern Multidimensional Scaling (2nd ed.). Springer.
See Also
Examples
## 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)