sim_bmat {flexmet} | R Documentation |
Randomly Generate FMP Parameters
Description
Generate monotonic polynomial coefficients for user-specified item complexities and prior distributions.
Usage
sim_bmat(
n_items,
k,
ncat = 2,
xi_dist = list(runif, min = -1, max = 1),
omega_dist = list(runif, min = -1, max = 1),
alpha_dist = list(runif, min = -1, max = 0.5),
tau_dist = list(runif, min = -3, max = 0)
)
Arguments
n_items |
Number of items for which to simulate item parameters. |
k |
Either a scalar for the item complexity of all items or a vector of length n_items if different items have different item complexities. |
ncat |
Vector of length n_item giving the number of response categories for each item. If of length 1, all items will have the same number of response categories. |
xi_dist |
List of information about the distribution from which to randomly sample xi parameters. The first element should be a function that generates random deviates (e.g., runif or rnorm), and further elements should be named arguments to the function. |
omega_dist |
List of information about the distribution from which to randomly sample omega parameters. The first element should be a function that generates random deviates (e.g., runif or rnorm), and further elements should be named arguments to the function. |
alpha_dist |
List of information about the distribution from which to randomly sample alpha parameters. The first element should be a function that generates random deviates (e.g., runif or rnorm), and further elements should be named arguments to the function. Ignored if all k = 0. |
tau_dist |
List of information about the distribution from which to randomly sample tau parameters. The first element should be a function that generates random deviates (e.g., runif or rnorm), and further elements should be named arguments to the function. Ignored if all k = 0. |
Details
Randomly generate FMP item parameters for a given k value.
Value
bmat |
Item parameters in the b parameterization (polynomial coefficients). |
greekmat |
Item parameters in the Greek-letter parameterization |
Examples
## generate FMP item parameters for 5 dichotomous items all with k = 2
set.seed(2342)
pars <- sim_bmat(n_items = 5, k = 2)
pars$bmat
## generate FMP item parameters for 5 items with varying k values and
## varying numbers of response categories
set.seed(2432)
pars <- sim_bmat(n_items = 5, k = c(1, 2, 0, 0, 2), ncat = c(2, 3, 4, 5, 2))
pars$bmat