View source: R/expand_responses.R
expand_responses | R Documentation |
Using scoring matrix provided as its second argument function expands (recodes) responses to each item (column) in a provided matrix of responses into a set of variables that may be put into model estimation.
expand_responses(responses, scoringMatrix)
responses |
a matrix of responses with items in columns and observations in rows |
scoringMatrix |
a matrix describing scoring patterns on each latent trait |
A matrix (of integers)
sM <- make_scoring_matrix_aem(5, "mae")
responses <- matrix(sample(1L:5L, 20, replace = TRUE), ncol = 4,
dimnames = list(NULL, paste0("item", 1:4)))
responses
sM
expand_responses(responses, sM)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.