smacof (version 1.8-13)

smacofIndDiff: SMACOF for Individual Differences

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

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

Value

delta
Observed dissimilarities
obsdiss
List of observed dissimilarities, normalized
confdiss
List of configuration dissimilarities
conf
List of matrices of final configurations
gspace
Joint configurations aka group stimulus space
cweights
Configuration weights
stress
Stress-1 value
resmat
Matrix with squared residuals
rss
Residual sum-of-squares
spp
Stress per point
sps
Stress per point per subject
ndim
Number of dimensions
model
Type of smacof model
niter
Number of iterations
nobj
Number of objects

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.

References

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

See Also

smacofConstraint, smacofSym, smacofRect, smacofSphere

Examples

Run this code
data(perception)

res.id <- smacofIndDiff(perception, constraint = "identity")     ## identity restricted weights
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))

res.diag <- smacofIndDiff(perception, constraint = "indscal")  ## diagonally restricted weights
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 <- smacofIndDiff(perception, constraint = "idioscal")  ## IDIOSCAL
Wk <- res.idio$cweights
G <- res.idio$gspace
G
G


data(helm)
res.helm <- smacofIndDiff(helm, constraint = "indscal")
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")
plot(res.helm, plot.type = "resplot")

## idioscal and indscal with starting configurations:
startconf <- matrix(rnorm(20), 10, 2)
idioscal(helm, init = startconf)
indscal(helm, init = startconf)

Run the code above in your browser using DataLab