Description Usage Arguments Details Value Author(s) References See Also Examples

Variant of smacof for rectangular matrices (typically ratings, preferences) that allows for nonmetric transformations. Also known as nonmetric unfolding.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ```
unfolding(delta, ndim = 2, type = c("ratio", "interval", "ordinal", "mspline"),
conditionality = "unconditional", lambda = 0.5, omega = 1,
circle = c("none", "row", "column"), weightmat = NULL, init = NULL,
fixed = c("none", "row", "column"), fixed.coord = NULL,
ties = c("primary", "secondary"), verbose = FALSE, relax = TRUE,
itmax = 10000, eps = 1e-6, spline.degree = 2, spline.intKnots = 2,
parallelize = FALSE)
smacofRect(delta, ndim = 2, type = c("ratio", "interval", "ordinal", "mspline"),
conditionality = "unconditional", lambda = 0.5, omega = 1,
circle = c("none", "row", "column"), weightmat = NULL, init = NULL,
fixed = c("none", "row", "column"), fixed.coord = NULL,
ties = c("primary", "secondary"), verbose = FALSE, relax = TRUE,
itmax = 10000, eps = 1e-6, spline.degree = 2, spline.intKnots = 2,
parallelize = FALSE)
prefscal(delta, ndim = 2, type = c("ratio", "interval", "ordinal", "mspline"),
conditionality = "unconditional", lambda = 0.5, omega = 1,
circle = c("none", "row", "column"), weightmat = NULL, init = NULL,
fixed = c("none", "row", "column"), fixed.coord = NULL,
ties = c("primary", "secondary"), verbose = FALSE, relax = TRUE,
itmax = 10000, eps = 1e-6, spline.degree = 2, spline.intKnots = 2,
parallelize = FALSE)
``` |

`delta` |
Data frame or matrix of preferences, ratings, dissimilarities. |

`ndim` |
Number of dimensions. |

`type` |
MDS type: |

`conditionality` |
A single transformations are applied for the entire matrix |

`lambda` |
Penalty strength balancing the loss contribution of stress and the penalty (see details). |

`omega` |
Penalty width determines for what values of the variation coefficient the penalty should become active (see details). |

`circle` |
If |

`weightmat` |
Optional matrix with dissimilarity weights. |

`init` |
Optional list of length two with starting values for the row coordinates (first element) and column coordinates (second element). |

`fixed` |
Do external unfolding by fixing the |

`fixed.coord` |
Matrix with fixed coordinates of the appropriate size. |

`ties` |
Tie specification for |

`verbose` |
If |

`relax` |
If |

`itmax` |
Maximum number of iterations. |

`eps` |
Convergence criterion. |

`spline.degree` |
Degree of the spline for an |

`spline.intKnots` |
Number of interior knots of the spline for a |

`parallelize` |
Tries to parallelize the computations when |

Unfolding tries to match a rectangular matrix `delta`

of dissimilarities between row and column objects by Euclidean distances between row and column points. Badness of fit is measured by raw Stress as the sum of squared differences between `delta`

and the Euclidean distances. Instead of dissimilarities optimal transformations (dhats) can be found. The dhats should be a function of the original `delta`

restricted to be `"ratio"`

, `"interval"`

, `"ordinal"`

, or `"mspline"`

. These transformations can be the same for the entire matrix (`conditionality = "unconditional"`

) of data, or different per row (`conditionality = "row"`

). To avoid a degenerate solution with all dhats and distances equal to 1, the prefscal penalty is is used.

A penalty is added based on the variation coefficient of the dhats (mean dhat divided by the standard deviation of the dhats). The penalty width (`omega`

) weights the penalty and determines from what value of the variation coefficient of the dhats the penalty should become active. The penalty strength (`lambda`

) is needed to ensure that the penalty can be strong enough. Busing et al. (2005) suggest to use *λ = 0.5* and *ω = 1.0* (for unconditional solutions *ω* can be lowered to a value as low as 0.1).

External unfolding can be done by specifying `fixed = "row"`

or `"column"`

and providing the fixed coordinates in `fixed.coord`

. Then, either the rows or columns are fixed up to a uniform constant.

Creates an object of class `smacofR`

.

`obsdiss` |
Observed dissimilarities, corresponds to |

`confdist` |
Configuration dissimilarities |

`dhat` |
Matrix with optimal transformation of size |

`iord` |
List of size 1 for matrix conditional and size |

`conf.row` |
Matrix of final row configurations |

`conf.col` |
Matrix of final column configurations |

`stress` |
Final, normalized stress value |

`pstress` |
Penalized stress value (the criterion that is minimized) |

`spp.row` |
Stress per point, rows |

`spp.col` |
Stress per point, columns |

`congvec` |
Vector of congruency coefficients |

`ndim` |
Number of dimensions |

`model` |
Type of smacof model |

`niter` |
Number of iterations |

`nind` |
Number of individuals (rows) |

`trans` |
Transformation |

`conditionality` |
Conditionality of the transformation |

`nobj` |
Number of objects (columns) |

Patrick Groenen, 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, https://www.jstatsoft.org/v31/i03/

Busing, F. M. T. A., Groenen, P. J. F., & Heiser, W. J. (2005). Avoiding degeneracy in multidimensional unfolding by penalizing on the coefficient of variation. Psychometrika, 70, 71-98.

`plot.smacof`

, `smacofConstraint`

, `smacofSym`

, `smacofIndDiff`

, `smacofSphere`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ```
## Ratio unfolding
res <- unfolding(breakfast)
res
## various configuration plots
plot(res)
plot(res, type = "p", pch = 25)
plot(res, type = "p", pch = 25, col.columns = 3,
label.conf.columns = list(label = TRUE, pos = 3, col = 3),
col.rows = 8, label.conf.rows = list(label = TRUE, pos = 3, col = 8))
## Shepard plot
plot(res, "Shepard")
## Stress decomposition chart
plot(res, "stressplot")
## Not run:
## Ordinal unfolding, row-conditional
## Note that ordinal unfolding may need many iterations (several thousands)
res <- unfolding(breakfast, type = "ordinal", conditionality = "row", omega = 0.1, itmax = 3000)
res
plot(res, "Shepard") ## Shepard plot
plot(res)
## End(Not run)
``` |

```
Loading required package: plotrix
Loading required package: colorspace
Loading required package: e1071
Attaching package: ‘smacof’
The following object is masked from ‘package:base’:
transform
Call: unfolding(delta = breakfast)
Model: Rectangular smacof
Number of subjects: 42
Number of objects: 15
Transformation: none
Conditionality: matrix
Stress-1 value: 0.308625
Penalized Stress: 3.525172
Number of iterations: 50
Warning message:
In unfolding(breakfast, type = "ordinal", conditionality = "row", :
Iteration limit reached! Increase itmax argument!
Call: unfolding(delta = breakfast, type = "ordinal", conditionality = "row",
omega = 0.1, itmax = 3000)
Model: Rectangular smacof
Number of subjects: 42
Number of objects: 15
Transformation: ordinalp
Conditionality: row
Stress-1 value: 0.117478
Penalized Stress: 5.171487
Number of iterations: 3000
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.