smacofSym: Symmetric smacof

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/smacofSym.R

Description

Multidimensional scaling on a symmetric dissimilarity matrix using SMACOF.

Usage

1
2
3
4
5
6
7
8
9
smacofSym(delta, ndim = 2, type = c("ratio", "interval", "ordinal", "mspline"), 
          weightmat = NULL, init = "torgerson", ties = "primary", 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", verbose = FALSE, 
    relax = FALSE, modulus = 1, itmax = 1000, eps = 1e-06, 
    spline.degree = 2, spline.intKnots = 2)

Arguments

delta

Either a symmetric dissimilarity matrix or an object of class "dist"

ndim

Number of dimensions

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 (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

Details

This is the simplest MDS-SMACOF version of the package. It solves the stress target function for symmetric dissimiliarities by means of the majorization approach (SMACOF) and reports the Stress-1 value (normalized). The main output are the coordinates in the low-dimensional space (configurations; conf).

The function mds() is a wrapper function and can be used instead of smacofSym()

This function allows for fitting three basic types of MDS: ratio MDS (default), interval MDS (polynomial transformation), and ordinal MDS (aka nonmetric MDS). It also returns the point stress, i.e. the larger the contribution of a point to the total stress, the worse the fit (see also plot.smacof.

Value

delta

Observed dissimilarities, not normalized

dhat

Disparities (transformed proximities, approximated distances, d-hats)

confdist

Configuration distances

conf

Matrix of fitted configurations

stress

Stress-1 value

spp

Stress per point (stress contribution in percentages)

resmat

Matrix with squared residuals

rss

Residual sum-of-squares

weightmat

Weight matrix

ndim

Number of dimensions

init

Starting configuration

model

Name of smacof model

niter

Number of iterations

nobj

Number of objects

type

Type of MDS model

Author(s)

Jan de Leeuw and Patrick Mair

References

De Leeuw, J. & Mair, P. (2009). Multidimensional scaling using majorization: The R package smacof. Journal of Statistical Software, 31(3), 1-30, https://www.jstatsoft.org/v31/i03/

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

Borg, I., Groenen, P. J. F., & Mair, P. (2013). Applied Multidimensional Scaling. Springer.

See Also

smacofConstraint, smacofRect, smacofIndDiff, smacofSphere, plot.smacof

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## 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")

smacof documentation built on Feb. 11, 2021, 3 a.m.