
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
set.seed(1)
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.4342372 0.5595366 -0.9767794
#>
#> $cutpoints[[2]]
#> [1] -0.4245716 -1.1417692
#>
#> $cutpoints[[3]]
#> [1] -0.01524211 0.07868657 -0.96886613
#>
#> $cutpoints[[4]]
#> [1] -0.5185655 -0.2199394 -0.3836984
#>
#>
#> $normals
#> [,1]
#> [1,] 1
#> [2,] -1
#> [3,] -1
#> [4,] -1
#>
#> $correct_class
#> [1] 0.2
#>
#> $iterations
#> [1] 2
#>