Description Usage Arguments Value Examples
Simulate answer on specified items, given true theta.
1 | simulate_answer(theta, model, alpha, beta, guessing, item_keys)
|
theta |
Vector with true theta. |
model |
One of |
alpha |
Matrix of alpha parameters, one column per dimension, one row per item. Row names should contain the item keys. Note that so called within-dimensional models still use an alpha matrix, they simply have only one non-zero loading per item. |
beta |
Matrix of beta parameters, one column per item step, one row per item. Row names should contain the item keys.
Note that |
guessing |
Matrix with one column of guessing parameters per item. Row names should contain the item keys. Optionally used in 3PLM model, ignored for all others. |
item_keys |
Character vector of item keys for which answers should be simulated. |
Vector with responses.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | alpha_beta <- simulate_testbank(model = "3PLM", number_items = 50,
number_dimensions = 1, number_itemsteps = 1)
guessing <- matrix(rep(.5, 50), dimnames = list(rownames(alpha_beta$alpha), NULL))
# Without guessing parameter
simulate_answer(theta = .3, model = "3PLM", alpha = alpha_beta$alpha,
beta = alpha_beta$beta, guessing = NULL, item_keys = "item3")
# With guessing parameter
simulate_answer(theta = .3, model = "3PLM", alpha = alpha_beta$alpha,
beta = alpha_beta$beta, guessing = guessing, item_keys = "item3")
# Simulate answers for more than one item
simulate_answer(theta = .3, model = "3PLM", alpha = alpha_beta$alpha,
beta = alpha_beta$beta, guessing = NULL,
item_keys = c("item5", "item2", "item8", "item1", "item18"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.