Skip to contents

Majorisation-based unfolding embedding respondents and stimuli into a common space.

Usage

morie_spatial_voting_smacof_unfolding(
  D,
  n_dims = 2L,
  max_iter = 300L,
  tol = 1e-06
)

Arguments

D

Respondent-by-stimulus dissimilarity matrix.

n_dims

Latent dimensions.

max_iter

Maximum iterations.

tol

Convergence tolerance.

Value

A list with respondent_coords, stimulus_coords, stress, iterations, converged.

References

Borg & Groenen (2005); Armstrong et al. (2021), Ch. 4.

Examples

set.seed(1)
D <- matrix(stats::runif(12), 3, 4)
morie_spatial_voting_smacof_unfolding(D, max_iter = 20)
#> $respondent_coords
#>            [,1]       [,2]
#> [1,] -0.4765297 -0.2645617
#> [2,] -0.3149654 -0.1746451
#> [3,] -0.4975857 -0.2764589
#> 
#> $stimulus_coords
#>           [,1]      [,2]
#> [1,] 0.3527650 0.1958706
#> [2,] 0.5850912 0.3252692
#> [3,] 0.6514155 0.3612171
#> [4,] 0.1295025 0.0718640
#> 
#> $stress
#> [1] 3.242821
#> 
#> $iterations
#> [1] 20
#> 
#> $converged
#> [1] FALSE
#>