# smacofSphere: Spherical SMACOF In smacof: Multidimensional Scaling

## Description

Dual and primal approach for spherical SMACOF.

## Usage

 ```1 2 3 4 5``` ```smacofSphere(delta, ndim = 2, type = c("ratio", "interval", "ordinal","mspline"), algorithm = c("dual", "primal"), weightmat = NULL, init = "torgerson", ties = "primary", verbose = FALSE, penalty = 100, relax = FALSE, modulus = 1, itmax = 1000, eps = 1e-6, spline.degree = 2, spline.intKnots = 2) ```

## Arguments

 `delta` Either a symmetric dissimilarity matrix or an object of class `dist` `ndim` Number of dimensions `type` MDS type: `"interval"`, `"ratio"`, or `"ordinal"` (nonmetric MDS) `algorithm` Algorithm type (see details) `weightmat` Optional matrix with dissimilarity weights `init` Either `"torgerson"` (classical scaling starting solution), `"random"` (random configuration), or a user-defined matrix `ties` Tie specification for non-metric MDS only `verbose` If `TRUE`, intermediate stress is printed out `penalty` Penalty parameter for dual algorithm (larger 0), see details `relax` If `TRUE`, block relaxation is used for majorization (dual algorithm) `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

## Details

For large scale problems it is suggested to use the dual algorithm. Using the penalty parameter (dual algorithm), the user allow for slight point deviations from the circle (the higher the penalty, the stricter the algorithm is in terms of placing points in the sphere, see examples section below).

## Value

 `delta` Observed dissimilarities `obsdiss` Observed dissimilarities, normalized `obsdiss1` Dual SMACOF: Observed dissimilarities `obsdiss2` Dual SMACOF: Restriction matrix `confdist` Configuration dissimilarities `conf` Matrix with fitted configurations `spp` Stress per point `resmat` Matrix with squared residuals `rss` Residual sum-of-squares `stress` Stress-1 value `init` Starting configurations `ndim` Number of dimensions `dummyvec` Dummy vector of restriction matrix `model` Type of smacof model `niter` Number of iterations `nobj` Number of objects

## Author(s)

Jan de Leeuw and Patrick Mair

## References

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

`smacofRect`, `smacofIndDiff`, `smacofSym`,`smacofConstraint`
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14``` ```## spherical SMACOF solution for trading data ## dual algorithm res <- smacofSphere(trading, type = "ordinal") res plot(res) ## lower penalty res <- smacofSphere(trading, penalty = 20, type = "ordinal") res plot(res) ## primal algorithm, interval res <- smacofSphere(trading, type = "interval", algorithm = "primal") res ```