| get.data.from.response.TIRT | R Documentation |
Converts a Thurstonian IRT pairwise-response matrix back to the
human-readable forced-choice strings used in data. This is the
inverse of get.response.from.data.TIRT.
get.data.from.response.TIRT(
response,
block.items,
fc.type = NULL,
pairs.value = NULL
)
response |
An |
block.items |
A list of length |
fc.type |
Character vector of length |
pairs.value |
A list of length |
TIRT differs from the generic FC converters because the model is expressed
through pairwise comparisons. The input response is therefore not a
block-level pattern-index matrix. It is an N \times P binary matrix,
where each column is one observed item pair and each entry is coded:
1: the first item in that pair was preferred;
0: the second item in that pair was preferred.
The number of response columns contributed by a block with K items is
determined by fc.type:
All K(K-1)/2 unordered pairs are observed. Pair columns
are generated in the order (1,2), (1,3), \dots, (K-1,K) using the
item labels in block.items[[b]].
Only the pairs needed to identify the most- and least-preferred
items are retained. The block contributes 2K - 3 response columns
per person.
Only the pairs involving the picked item are retained. The
block contributes K - 1 response columns per person.
For "MOLE" and "PICK", the identities of the retained pairs
can vary by person. The pairs.value object records those
person-specific pair definitions and is required to reconstruct data
strings without ambiguity. It is normally copied directly from the
pairs.value component returned by
get.response.from.data.TIRT.
TIRT conversion assumes consecutive item labels across blocks, for example
list(1:2, 3:5). This is the layout returned by
sim.data.TIRT.
A data frame with N rows and B columns. Column names
are "block.1", "block.2", etc. Cell values are character
strings encoding the within-block ordering: full rankings for
"RANK", "best>worst" for "MOLE", and single
integers for "PICK".
get.response.from.data.TIRT for the reverse conversion.
get.data.from.response for the generic (non-TIRT) converter
used by FCGGUM and FCMIRT.
# 2 RANK blocks: block 1 has items 1,2; block 2 has items 3,4,5.
items <- list(1:2, 3:5)
resp <- cbind(
c(1, 0), # block 1 pair: 1 vs 2
c(1, 0), # block 2 pair: 3 vs 4
c(1, 0), # block 2 pair: 3 vs 5
c(1, 0) # block 2 pair: 4 vs 5
)
get.data.from.response.TIRT(resp, items, fc.type = "RANK")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.