smacofIndDiff: SMACOF for Individual Differences

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

View source: R/smacofIndDiff.R

Description

Performs smacof for individual differences also known as Three-Way smacof on a list of dissimilarity matrices. Various restrictions decompositions and restrictions on the weight matrix are provided. The most prominent models are INDSCAL and IDIOSCAL.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
smacofIndDiff(delta, ndim = 2, type = c("ratio", "interval", "ordinal", "mspline"), 
              constraint = c("indscal", "idioscal", "identity"),
              weightmat = NULL, init = "torgerson", ties = "primary",  
              verbose = FALSE, modulus = 1, itmax = 1000, eps = 1e-6,
              spline.degree = 2, spline.intKnots = 2)
              
indscal(delta, ndim = 2, type = c("ratio", "interval", "ordinal", "mspline"), 
        weightmat = NULL, init = "torgerson", ties = "primary", 
        verbose = FALSE, modulus = 1, itmax = 1000, eps = 1e-6,
        spline.degree = 2, spline.intKnots = 2)

idioscal(delta, ndim = 2, type = c("ratio", "interval", "ordinal", "mspline"), 
         weightmat = NULL, init = "torgerson", ties = "primary", 
         verbose = FALSE, modulus = 1, itmax = 1000, eps = 1e-6,
         spline.degree = 2, spline.intKnots = 2)

Arguments

delta

A list of dissimilarity matrices or a list objects of class dist

ndim

Number of dimensions

type

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

weightmat

Optional matrix with dissimilarity weights

init

Matrix with starting values for configurations (optional)

ties

Tie specification for non-metric MDS

constraint

Either "indscal", "idioscal", or "identity" (see details)

verbose

If TRUE, intermediate stress is printed out

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

If the constraint is "indscal", INDSCAL is performed with configuration weight matrices restricted to be diagonal. indscal() is a corresponding wrapper function that can be used instead of smacofIndDiff() with "indscal" constraints.

IDIOSCAL can be computed using the "idioscal" argument. The weight matrices are then unconstrained. idioscal() is a corresponding wrapper function that can be used instead of smacofIndDiff() with "idioscal" constraints.

Addtional weight restrictions can be imposed with "identity" which restricts the configurations across individuals/replications/ways to be equal.

Value

delta

Observed dissimilarities

obsdiss

List of observed dissimilarities, normalized

confdist

List of configuration dissimilarities

conf

List of matrices of final configurations

gspace

Joint configuration aka group stimulus space

cweights

Individual weights

stress

Stress-1 value

resmat

Matrix with squared residuals

rss

Residual sum-of-squares

spp

Stress per point (in percent)

spps

Stress per point per subject (in percent, conditional on subject)

sps

Stress per subject (in percent)

ndim

Number of dimensions

model

Type of smacof model

niter

Number of iterations

nobj

Number of objects

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/

See Also

smacofConstraint, smacofSym, smacofRect, smacofSphere

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
## Example 1: rectangle perception data
res.diag <- indscal(perception, type = "ordinal")        ## INDSCAL
res.diag$cweights
plot(res.diag)
plot(res.diag, type = "p", pch = 25, col = 4, label.conf = list(label = TRUE, pos = 3, col = 4))

res.idio <- idioscal(perception, type = "ordinal")  ## IDIOSCAL
Wk <- res.idio$cweights
G <- res.idio$gspace
G
G

## identity restricted weights
res.id <- smacofIndDiff(perception, type = "ordinal", constraint = "identity")     
summary(res.id)
res.id$cweights
plot(res.id)
plot(res.id, type = "p", pch = 25, col = 4, label.conf = list(label = TRUE, pos = 3, col = 4))


## Example 2: Helm's color data 
res.helm <- indscal(helm, type = "interval")
plot(res.helm, plot.type = "confplot")
barplot(sort(res.helm$sps, decreasing = TRUE), main = "Stress per Subject", cex.names = 0.8) 
plot(res.helm, plot.type = "bubbleplot")
plot(res.helm, plot.type = "stressplot")
plot(res.helm, plot.type = "Shepard")

## idioscal and indscal with random starting configuration:
set.seed(123)
startconf <- matrix(rnorm(20), 10, 2)
idioscal(helm, init = startconf, type = "interval")
indscal(helm, init = startconf, type = "interval")

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