multistart function

Multistart MDS function

Multistart MDS function

For different starting configurations, this function fits a series of PS models given in object or call and returns the one with the lowest stress overall. The starting configuirations can be supplied or are generated internally.

multistart( object, mdscall = NULL, ndim = 2, conflist, nstarts = 108, return.all = FALSE, verbose = TRUE, min = -5, max = 5 )

Arguments

  • object: A fitted object of class 'smacofP', 'smacofB' or 'smacof'. If supplied this takes precedence over the call argument. If given this is added to the output and may be the optimal one.
  • mdscall: Alternatively to a fitted object, one can pass a syntactically valid call for any of the MDS functions cops, stops or smacof that find a configuration (not the ones that do parameter selection like pcops or stops). If object and call is given, object takes precedence.
  • ndim: Dimensions of target space.
  • conflist: Optional list of starting configurations.
  • nstarts: If conflist is not supplied, how many random starting configurations should be used. The default is 108, which implies that at least one of the stress is within the lowest 1 percent of all stresses with probability of 1/3 or within the lowest 5 percent of stresses with probability 0.996
  • return.all: Should all fitted MDS be returned. If FALSE (default) only the optimal one is returned.
  • verbose: If >0 prints the fitting progress.
  • min: lower bound for the uniform distribution to sample from
  • max: upper bound for the uniform distribution to sample from

Returns

if 'return.all=FALSE', a list with the best fitted model as 'best(minimalbadnessoffitofallfittedmodels)andbest' (minimal badness-of-fit of all fitted models) and 'stressvec' the stresses of all models. If 'return.all=TRUE' a list with slots

  • best: The object resulting from the fit that had the overall lowest objective function value (usually stress)
  • stressvec: The vector of objective function values
  • models: A list of all the fitted objects.

Details

If no configuration list is supplied, then nstarts configurations are simulated. They are drawn from a ndim-dimesnional uniform distribution with minimum min and maximum max. We recommend to use the route via supplying a fitted model as these are typically starting from a Torgerson configuration and are likely quite good.

One can simply extract $best and save that and work with it right away.

Examples

dis<-smacof::kinshipdelta ## Version 1: Using a fitted object (recommended) res1<-rStressMin(delta=dis,type="ordinal",itmax=100) resm<-multistart(res1,nstarts=2) ## best model res2<-resm$best #it's starting configuration res2$init ## Version 2: Using a call object and supplying conflist conflist<-list(res2$init,jitter(res2$init,1)) c1 <- call("rstressMin",delta=dis,type="ordinal",itmax=100) resm<-multistart(mdscall=c1,conflist=conflist,return.all=TRUE)