View source: R/irt_params_helpers.R
| irt_params_2pl | R Documentation |
Creates a list of discrimination (a) and difficulty (b) parameters
suitable for passing to irt_design().
irt_params_2pl(
n_items,
a_dist = "lnorm",
a_mean = 0,
a_sd = 0.25,
b_dist = "normal",
b_mean = 0,
b_sd = 1,
b_range = c(-2, 2),
seed = NULL
)
n_items |
Positive integer. Number of items. |
a_dist |
Character string for the discrimination distribution.
Currently only |
a_mean |
Numeric. Mean of the log-normal distribution for |
a_sd |
Numeric. SD of the log-normal distribution for |
b_dist |
Character string for the difficulty distribution. One of
|
b_mean |
Numeric. Mean of the normal distribution for |
b_sd |
Numeric. SD of the normal distribution for |
b_range |
Numeric vector of length 2. Range for evenly-spaced |
seed |
Optional integer seed for reproducibility. If |
A named list with elements a (numeric vector) and b (numeric
vector), each of length n_items.
irt_params_grm() for GRM parameters, irt_design() to use the
generated parameters.
# Default 2PL parameters for 30 items
params <- irt_params_2pl(n_items = 30, seed = 42)
# Evenly-spaced difficulty
params <- irt_params_2pl(n_items = 20, b_dist = "even", b_range = c(-3, 3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.