Skip to contents

Normal-vector projection of an external measure

Usage

morie_spatial_voting_normal_vectors(ideal_points, external_measure)

Arguments

ideal_points

Ideal-point coordinates.

external_measure

Vector to project.

Value

List with normal_vector, angle_degrees, angle_radians, r_squared, coefficients.

References

Armstrong et al. (2021), Section 2.6.

Examples

set.seed(1)
morie_spatial_voting_normal_vectors(matrix(rnorm(20), 10, 2), rnorm(10))
#> $normal_vector
#> [1] -0.8945082  0.4470515
#> 
#> $angle_degrees
#> [1] 153.4453
#> 
#> $angle_radians
#> [1] 2.678126
#> 
#> $r_squared
#> [1] 0.6427161
#> 
#> $coefficients
#> [1] -0.1282139 -0.6966423  0.3481634
#>