triplets | R Documentation |
This data set contains synthetic data of the first 200 out of a total of 2000 participants on 4 triplets, originally generated as part of Brown and Maydeu-Olivares (2012). In each triplet, participants had to rank the three alternative items according to their preference. Responses were then converted into a set of dichotomous pairwise responses between all the three alternatives. More details can be found in Brown and Maydeu-Olivares (2012).
triplets
A data frame of 200 observations containing information on 12 variables. Overall, the 12 items measure 3 different traits. Items 1, 4, 7, and 10 load on trait 1, items 2, 5, 8, and 11 load on trait 2, and items 3, 6, 9, and 12 load on trait 3. Moreover, items 4, 9, and 11 are inverted.
Response preferences between item 1 and 2.
Response preferences between item 1 and 3.
Response preferences between item 2 and 3.
Response preferences between item 4 and 5.
Response preferences between item 4 and 6.
Response preferences between item 5 and 6.
Response preferences between item 7 and 8.
Response preferences between item 7 and 9.
Response preferences between item 8 and 9.
Response preferences between item 10 and 11.
Response preferences between item 10 and 12.
Response preferences between item 11 and 12.
Brown, A. & Maydeu-Olivares, A. (2012). Fitting a Thurstonian IRT model to forced-choice data using Mplus. Behavior Research Methods, 44, 1135–1147. DOI: 10.3758/s13428-012-0217-x
# load the data
data("triplets")
# define the blocks of items
blocks <-
set_block(c("i1", "i2", "i3"), traits = c("t1", "t2", "t3"),
signs = c(1, 1, 1)) +
set_block(c("i4", "i5", "i6"), traits = c("t1", "t2", "t3"),
signs = c(-1, 1, 1)) +
set_block(c("i7", "i8", "i9"), traits = c("t1", "t2", "t3"),
signs = c(1, 1, -1)) +
set_block(c("i10", "i11", "i12"), traits = c("t1", "t2", "t3"),
signs = c(1, -1, 1))
# generate the data to be understood by 'thurstonianIRT'
tdat <- make_TIRT_data(
triplets, blocks, direction = "larger",
format = "pairwise", family = "bernoulli", range = c(0, 1)
)
# fit the data using Stan
fit <- fit_TIRT_stan(tdat, chains = 1)
print(fit)
predict(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.