procrustes {prolsirm} | R Documentation |
procrustes
Description
Procrustes matching of posterior samples of latent positions of persons ( z
) and items (w
) from LSIRM with q
-dimensional interaction map
Usage
procrustes(z, w, ref = 1)
Arguments
z |
A list of length |
w |
A list of length |
ref |
Reference configuration (i.e., iteration) index. Default is 1 (i.e., posterior samples at iteration 1) ). |
Details
The function performs Procrustes matching by aligning the M
-1 posterior samples of z
and w
to the reference configuration (e.g., iteration 1). Users can select any configuration as the reference with the ref
argument. The function returns M
matched lists of z
and w
after the Procrustes matching process.
Value
A list of M
matched posterior samples of z
and a list of M
matched posterior samples of w
.
References
Borg and Groenen. 1997 Modern Multidimensional Scaling. New York: Springer. pp. 340–342.
Jeon, M., Jin, I. H., Schweinberger, M., & Baugh, S. 2021 Mapping Unobserved Item–Respondent Interactions: A Latent Space Item Response Model with Interaction Map. Psychometrika, 86(2), 378–403.
Andrew, D. M., Kevin M. Q., Jong Hee Park. 2011 MCMCpack: Markov Chain Monte Carlo in R. Journal of Statistical Software. 42(9): 1–21.
Examples
# 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)