driftVectors | R Documentation |
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.
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), ...)
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 |
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.
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 |
Patrick Mair
Borg, I., & Groenen, P. J. F. (2005). Modern Multidimensional Scaling (2nd ed.). Springer.
smacofSym
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.