# Load package
library(prolsirm)
# Generate example posterior samples
# M=3 samples of person latent positions (N=50, q=2)
z <- list(matrix(rnorm(100), ncol = 2),
matrix(rnorm(100), ncol = 2),
matrix(rnorm(100), ncol = 2))
# M=3 samples of item latent positions (I=5, q=2)
w <- list(matrix(rnorm(10), ncol = 2),
matrix(rnorm(10), ncol = 2),
matrix(rnorm(10), ncol = 2))
# Perform Procrustes matching
matched_data <- procrustes(z = z, w = w)
Run the code above in your browser using DataLab