Ordered Optimal Classification for ordinal scales
Source:R/spatial_voting.R
morie_spatial_voting_ordered_oc.RdOrdered Optimal Classification for ordinal scales
References
Hare, C., Liu, T.-P., and Lupton, R. N. (2018). "What Ordered Optimal Classification reveals about ideological structure, cleavages, and polarization in the American mass public." Public Choice, 176(1), 57-78.
Examples
Y <- matrix(sample(1:4, 60, replace = TRUE), 15, 4)
morie_spatial_voting_ordered_oc(Y, n_dims = 1L, max_iter = 20L)
#> $ideal_points
#> [,1]
#> [1,] 1.37095845
#> [2,] -0.56469817
#> [3,] 0.36312841
#> [4,] 0.63286260
#> [5,] 0.40426832
#> [6,] -0.10612452
#> [7,] 1.51152200
#> [8,] -0.09465904
#> [9,] 2.01842371
#> [10,] -0.06271410
#> [11,] 1.30486965
#> [12,] 2.28664539
#> [13,] -1.38886070
#> [14,] -0.27878877
#> [15,] -0.13332134
#>
#> $cutpoints
#> $cutpoints[[1]]
#> [1] 0.44508978 -0.07868657 -0.02792395
#>
#> $cutpoints[[2]]
#> [1] -0.51856546 -0.21993945 0.07868657
#>
#> $cutpoints[[3]]
#> [1] 0.07868657 -0.62961374 0.52773300
#>
#> $cutpoints[[4]]
#> [1] -0.68127683 0.07868657 -0.21993945
#>
#>
#> $normals
#> [,1]
#> [1,] 1
#> [2,] -1
#> [3,] -1
#> [4,] -1
#>
#> $correct_class
#> [1] 0.2333333
#>
#> $iterations
#> [1] 3
#>