Skip to contents

Efron & Tibshirani (1993) resampling of respondents for Aldrich-McKelvey and Basic Space scaling SEs.

Usage

morie_spatial_voting_nonparametric_bootstrap(
  Z,
  scale_fn = "am",
  n_boot = 200L,
  seed = 42L
)

Arguments

Z

Perception matrix.

scale_fn

One of "am", "blackbox", "blackbox_t".

n_boot

Number of bootstrap replications.

seed

RNG seed.

Value

List with se_positions, boot_mean, ci_lower, ci_upper, n_boot.

References

Efron, B. and Tibshirani, R. (1993). An Introduction to the Bootstrap. Chapman & Hall.

Examples

set.seed(1)
Z <- matrix(rnorm(20 * 5), 20, 5)
morie_spatial_voting_nonparametric_bootstrap(Z, n_boot = 10L)
#> $se_positions
#> [1] 1.0007189 0.7647354 0.5003621 1.0998751 0.7623130
#> 
#> $boot_mean
#> [1]  0.3128526 -0.4850690  0.2612352  0.3616339 -0.4506528
#> 
#> $ci_lower
#> [1] -0.9840775 -1.2401618 -0.6798102 -1.1576912 -1.1348797
#> 
#> $ci_upper
#> [1] 1.4759892 0.8323183 0.8216361 1.6516877 0.9325095
#> 
#> $n_boot
#> [1] 10
#>