Last chance! 50% off unlimited learning
Sale ends in
Multidimensional scaling on a symmetric dissimilarity matrix using SMACOF.
smacofSym(delta, ndim = 2, type = c("ratio", "interval", "ordinal", "mspline"),
weightmat = NULL, init = "torgerson", ties = "primary", principal = FALSE,
verbose = FALSE, relax = FALSE, modulus = 1, itmax = 1000, eps = 1e-06,
spline.degree = 2, spline.intKnots = 2)mds(delta, ndim = 2, type = c("ratio", "interval", "ordinal", "mspline"),
weightmat = NULL, init = "torgerson", ties = "primary", principal = FALSE,
verbose = FALSE, relax = FALSE, modulus = 1, itmax = 1000, eps = 1e-06,
spline.degree = 2, spline.intKnots = 2)
Observed dissimilarities, not normalized
Disparities (transformed proximities, approximated distances, d-hats)
Configuration distances
Matrix of fitted configurations
Stress-1 value
Stress per point (stress contribution of each point on a percentage scale)
Matrix with squared residuals
Residual sum-of-squares
Weight matrix
Number of dimensions
Starting configuration
Name of smacof model
Number of iterations
Number of objects
Type of MDS model
Either a symmetric dissimilarity matrix or an object of class "dist"
Number of dimensions
Optional matrix with dissimilarity weights
Either "torgerson"
(classical scaling starting solution), "random"
(random configuration), or a user-defined matrix
MDS type: "interval"
, "ratio"
, "ordinal"
(nonmetric MDS), or "mspline"
Tie specification (ordinal MDS only): "primary"
, "secondary"
, or "tertiary"
If TRUE
, principal axis transformation is applied to the final configuration
If TRUE
, intermediate stress is printed out
If TRUE
, block relaxation is used for majorization
Number of smacof iterations per monotone regression call
Maximum number of iterations
Convergence criterion
Degree of the spline for "mspline"
MDS type
Number of interior knots of the spline for "mspline"
MDS type
Jan de Leeuw, Patrick Mair, and Patrick Groenen
The function mds()
is a wrapper function and can be used instead of smacofSym()
. It reports the Stress-1 value (normalized). The main output are the coordinates in the low-dimensional space (configuration; conf
; see also plot.smacof
).
Four types of MDS can be fitted: ratio MDS (no dissimilarity transformation), interval MDS (linear transformation), ordinal MDS (ordinal transformation with various options for handling ties), and spline MDS (monotone spline transformation). Shepard plots in plot.smacof
give insight into this transformation.
Setting principal = TRUE
is useful for interpretatbility of the dimensions, or to check hypotheses about the dimensions.
In case of missing input dissimilarities, the weightmat
is computed internally so that missings are blanked out during optimization.
De Leeuw, J. & Mair, P. (2009). Multidimensional scaling using majorization: The R package smacof. Journal of Statistical Software, 31(3), 1-30, tools:::Rd_expr_doi("10.18637/jss.v031.i03")
Mair, P, Groenen, P. J. F., De Leeuw, J. (2022). More on multidimensional scaling in R: smacof version 2. Journal of Statistical Software, 102(10), 1-47. tools:::Rd_expr_doi("10.18637/jss.v102.i10")
Borg, I., & Groenen, P. J. F. (2005). Modern Multidimensional Scaling (2nd ed.). Springer.
Borg, I., Groenen, P. J. F., & Mair, P. (2018). Applied Multidimensional Scaling and Unfolding (2nd ed.). Springer.
smacofConstraint
, smacofRect
, smacofIndDiff
, smacofSphere
, plot.smacof
## simple SMACOF solution (interval MDS) for kinship data
res <- mds(kinshipdelta, type = "interval")
res
summary(res)
plot(res)
plot(res, type = "p", label.conf = list(label = TRUE, col = "darkgray"), pch = 25, col = "red")
## ratio MDS, random starts
set.seed(123)
res <- mds(kinshipdelta, init = "random")
res
## 3D ordinal SMACOF solution for trading data (secondary approach to ties)
data(trading)
res <- mds(trading, ndim = 3, type = "ordinal", ties = "secondary")
res
## spline MDS
delta <- sim2diss(cor(PVQ40agg))
res <- mds(delta, type = "mspline", spline.degree = 3, spline.intKnots = 4)
res
plot(res, "Shepard")
Run the code above in your browser using DataLab