An implementation to minimize r-stress by majorization with ratio, interval and ordinal optimal scaling. Uses a repeat loop.
rStressMin(
delta,
r = 0.5,
type = c("ratio", "interval", "ordinal"),
ties = "primary",
weightmat = 1 - diag(nrow(delta)),
init = NULL,
ndim = 2,
acc = 1e-06,
itmax = 10000,
verbose = FALSE,
principal = FALSE
)rstressMin(
delta,
r = 0.5,
type = c("ratio", "interval", "ordinal"),
ties = "primary",
weightmat = 1 - diag(nrow(delta)),
init = NULL,
ndim = 2,
acc = 1e-06,
itmax = 10000,
verbose = FALSE,
principal = FALSE
)
rstressmds(
delta,
r = 0.5,
type = c("ratio", "interval", "ordinal"),
ties = "primary",
weightmat = 1 - diag(nrow(delta)),
init = NULL,
ndim = 2,
acc = 1e-06,
itmax = 10000,
verbose = FALSE,
principal = FALSE
)
rstress(
delta,
r = 0.5,
type = c("ratio", "interval", "ordinal"),
ties = "primary",
weightmat = 1 - diag(nrow(delta)),
init = NULL,
ndim = 2,
acc = 1e-06,
itmax = 10000,
verbose = FALSE,
principal = FALSE
)
a 'smacofP' object (inheriting from 'smacofB', see smacofSym
). It is a list with the components
delta: Observed, untransformed dissimilarities
tdelta: Observed explicitly transformed dissimilarities, normalized
dhat: Explicitly transformed dissimilarities (dhats), optimally scaled and normalized
confdist: Configuration dissimilarities
conf: Matrix of fitted configuration
stress: Default stress (stress 1; sqrt of explicitly normalized stress)
spp: Stress per point
ndim: Number of dimensions
model: Name of smacof model
niter: Number of iterations
nobj: Number of objects
type: Type of MDS model
weightmat: weighting matrix as supplied
stress.m: Default stress (stress-1^2)
tweightmat: transformed weighting matrix (here NULL)
dist object or a symmetric, numeric data.frame or matrix of distances
power of the transformation of the fitted distances (corresponds to kappa/2 in power stress); defaults to 0.5 for standard stress
what type of MDS to fit. Currently one of "ratio", "interval" or "ordinal". Default is "ratio".
the handling of ties for ordinal (nonmetric) MDS. Possible are "primary" (default), "secondary" or "tertiary".
a matrix of finite weights.
starting configuration
dimension of the configuration; defaults to 2
numeric accuracy of the iteration. Default is 1e-6.
maximum number of iterations. Default is 10000.
should iteration output be printed; if > 1 then yes
If 'TRUE', principal axis transformation is applied to the final configuration
smacofSym
dis<-smacof::kinshipdelta
res<-rStressMin(as.matrix(dis),type="ordinal",r=1,itmax=1000)
res
summary(res)
plot(res)
Run the code above in your browser using DataLab