View source: R/immer_unique_patterns.R
immer_unique_patterns | R Documentation |
Extracts unique item response patterns.
immer_unique_patterns(dat, w=rep(1, nrow(dat)))
dat |
Data frame containing integer item responses |
w |
Optional vector of weights |
A list with entries
y |
Data frame with unique item response patterns |
w |
Vector of frequency weights |
y_string |
Item response pattern coded as a string |
See mirt::expand.table
for back-converting
unique item response patterns into a data frame with item responses.
#############################################################################
# EXAMPLE 1: Unique item response patterns data.read
#############################################################################
data( data.read, package="sirt")
dat <- data.read
# extract item response patterns
res <- immer::immer_unique_patterns(dat)
## Not run:
# back-conversion with expand.table
dat2 <- mirt::expand.table( cbind( res$y, res$w ) )
# check correctness
colMeans(dat)
colMeans(dat2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.