multiscale function

Multiscale SMACOF

Multiscale SMACOF

An implementation for maximum likelihood MDS aka multiscale that minimizes the multiscale stress by majorization with ratio and interval optimal scaling. Uses a repeat loop. Note that since this done via the route of r-sytress, the multiscale stress is approximate and only accuarte for kappa->0.

multiscale( delta, type = c("ratio", "interval"), weightmat, init = NULL, ndim = 2, acc = 1e-06, itmax = 10000, verbose = FALSE, kappa = 0.01, principal = FALSE )

Arguments

  • delta: dist object or a symmetric, numeric data.frame or matrix of distances. Warning: these will get transformed to the log scale, so make sure that log(delta)>=0.
  • type: what optimal scaling type of MDS to fit. Currently one of "ratio" or "interval". Default is "ratio".
  • weightmat: a matrix of finite weights
  • init: starting configuration
  • ndim: dimension of the configuration; defaults to 2
  • acc: numeric accuracy of the iteration. Default is 1e-6.
  • itmax: maximum number of iterations. Default is 10000.
  • verbose: should iteration output be printed; if > 1 then yes
  • kappa: As this is not exactly multiscale but an r-stress approximation, we have multiscale only for kappa->0. This argument can therefore be used to make the approximation more accurate by making it smaller. Default is 0.1.
  • principal: If ‘TRUE’, principal axis transformation is applied to the final configuration

Returns

a 'smacofP' object (inheriting from 'smacofB', see smacofSym). It is a list with the components

  • delta: Observed dissimilarities
  • tdelta: Observed explicitly transformed (log) dissimilarities, normalized
  • dhat: Explicitly transformed dissimilarities (dhats), optimally scaled and normalized
  • confdist: Transformed configuration distances
  • 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
  • stress.m: Default stress (stress-1^2)

Warning

The input delta will internally get transformed to the log scale, so make sure that log(delta)>=0 otherwise it throws an error. It is often a good idea to use 1+delta in this case.

Examples

dis<-smacof::kinshipdelta res<-multiscale(as.matrix(dis),type="interval",itmax=1000) res summary(res) plot(res)

See Also

rStressMin