View source: R/smacofIndDiff.R
smacofIndDiff | R Documentation |
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.
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)
delta |
A list of dissimilarity matrices or a list objects of class |
ndim |
Number of dimensions |
type |
MDS type: |
weightmat |
Optional matrix with dissimilarity weights |
init |
Matrix with starting values for configurations (optional) |
ties |
Tie specification for non-metric MDS |
constraint |
Either |
verbose |
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 |
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.
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 |
Jan de Leeuw and Patrick Mair
De Leeuw, J., & Mair, P. (2009). Multidimensional scaling using majorization: The R package smacof. Journal of Statistical Software, 31(3), 1-30, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v031.i03")}
smacofConstraint
, smacofSym
, smacofRect
, smacofSphere
## 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.