Skip to contents

Bayesian unfolding (stub) – Bakker & Poole sampler

Usage

morie_spatial_voting_bayesian_unfolding(
  D,
  n_dims = 2L,
  n_samples = 1000L,
  burn_in = 200L
)

Arguments

D

Respondent-stimulus dissimilarity matrix.

n_dims

Latent dimensions. @param n_samples MCMC samples.

n_samples

Integer; posterior-sample count.

burn_in

Burn-in length.

Value

List with respondent/stimulus configurations and an engine tag (smacof deterministic mode, or the native Metropolis sampler when smacof is absent).

References

Bakker, R. and Poole, K. T. (2013).

Examples

# \donttest{
# Random positive respondent-stimulus dissimilarities; an all-zero
# matrix is degenerate for the unfolding transform.
set.seed(1)
morie_spatial_voting_bayesian_unfolding(matrix(runif(12, 0.5, 2), 3, 4))
#> $coords_r
#>            [,1]       [,2]
#> [1,]  0.3764198 -0.6197119
#> [2,] -0.0560329 -0.3690477
#> [3,]  0.4876329  0.5276199
#> 
#> $coords_s
#>            [,1]        [,2]
#> [1,]  0.8802008 -0.36615593
#> [2,] -0.7689275 -0.07885794
#> [3,] -0.5978790  0.55825951
#> [4,]  0.4866057 -0.11324564
#> 
#> $stress
#> [1] 0.09089538
#> 
#> $n_dims
#> [1] 2
#> 
#> $engine
#> [1] "smacof::unfolding (deterministic; full Bayesian not ported)"
#> 
# }