Recovers respondent ideal points from an issue-scale response matrix
via SVD on the column-centred matrix. Implements Poole's (1998)
decomposition \(X_0 = \Psi W' + J_n c' + E_0\). Delegates to
basicspace::blackbox when available.
Value
A list with ideal_points, stimuli_weights, eigenvalues,
singular_values, explained_variance, col_means, n_dims, and
engine.
Examples
set.seed(1)
X <- matrix(rnorm(30 * 6), 30, 6)
morie_spatial_voting_blackbox(X, n_dims = 2)
#> $ideal_points
#> [,1] [,2]
#> [1,] 0.58085128 -0.826676185
#> [2,] -0.44538833 0.095628158
#> [3,] -0.02257064 -0.155435452
#> [4,] -0.64196658 -0.286881879
#> [5,] -0.87666292 0.363701355
#> [6,] -0.47868528 0.112342734
#> [7,] -0.05123051 0.720706499
#> [8,] -0.21997769 -0.540136613
#> [9,] -0.33995848 -0.495042509
#> [10,] 0.84889066 -0.505738306
#> [11,] -0.15343602 -0.217467933
#> [12,] -0.26258315 0.222831162
#> [13,] 0.36713540 -0.052204022
#> [14,] 0.62208999 0.592328247
#> [15,] -0.67657250 0.355709052
#> [16,] 0.64942730 0.342969537
#> [17,] -0.21200251 0.068297145
#> [18,] -0.58943621 -0.435397378
#> [19,] -0.20742489 -0.095639638
#> [20,] -0.22950946 -0.039318405
#> [21,] 0.72389459 0.210686184
#> [22,] -0.42822524 0.164932490
#> [23,] 0.33606493 -0.374773010
#> [24,] -0.01375499 1.035978485
#> [25,] 0.05081507 -0.601813924
#> [26,] 0.20454782 -0.504979894
#> [27,] -0.08816842 -0.003234797
#> [28,] 0.59455527 0.837512908
#> [29,] 0.50525307 -0.029684480
#> [30,] 0.45402847 0.040800468
#>
#> $stimuli_weights
#> [,1] [,2]
#> [1,] -0.9363968 -0.8511332
#> [2,] 0.5169324 -1.3067813
#> [3,] 0.7234909 -1.6962691
#> [4,] -0.3580879 -0.0149343
#> [5,] -1.0094223 0.1549715
#> [6,] 1.9204472 0.6544508
#>
#> $eigenvalues
#> [1] 42.28608 33.20040
#>
#> $singular_values
#> [1] 6.502775 5.761979
#>
#> $explained_variance
#> [1] 0.5051229
#>
#> $col_means
#> [1] 0.08245817 0.13277458 0.11027803 0.11333276 -0.33002806 0.23700302
#>
#> $n_dims
#> [1] 2
#>
#> $engine
#> [1] "fallback"
#>