Description Usage Arguments Value Author(s) Examples
Simulates a specified number of test-takers working on a specified number of items in MC or DOMC format. The accuracy values d' of test-takers can be generated randomly by the function or are passed explicitly.
1 2 3 | simulate_morbist(item_number, option_number, n_respondents, type,
avg_acc = 1.5, sd_acc = 0.5, accuracies = NULL, criterion_list = NULL,
option_data = FALSE)
|
item_number |
How many items are simulated for each test-taker |
option_number |
How many response options should each item have |
n_respondents |
How many test-takers are to be simulated |
type |
Which type of test is be simulated? Must be "mc" or "domc". |
avg_acc |
Mean accuracy (d') of the test-takers |
sd_acc |
Standard deviation of the test-takers' accuracy values d'. |
accuracies |
If not NULL, it must be a vector of length ‘n_respondents' containing an accuracy value d’ for each test taker. If this argument is passed, it overrides the values of avg_acc and sd_acc. Defaults to NULL. |
criterion_list |
A list of criterion vectors of length 'testTaker'. |
option_data |
Should response data on option level be returned (only works if type is "domc"). This is slows down simulation speed; it defaults to 'FALSE'. |
If a DOMC test was simulated and option level data was requested: A list containing two data frames in long format - one stores data on item level, the other store response data on option level. Otherwise: A data.frame in long format storing response data on item level.
Martin Papenberg martin.papenberg@hhu.de
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Prepare input
n = 100
n_items <- 50
n_options <- 5
criteria <- list() # response criteria for DOMC items
for (i in 1:n) criteria[[i]] <- c(rep(0, 4), -Inf)
## Simulate DOMC test responses
DOMC_data <- simulate_morbist(n_items, n_options, n, type="domc",
criterion_list = criteria)
## Simulate MC test responses
MC_data <- simulate_morbist(n_items, n_options, n, type="mc")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.