booklet_sample {lsasim} | R Documentation |
Assignment of test booklets to test takers
Description
booklet_sample
randomly assigns test booklets to test takers.
Usage
booklet_sample(
n_subj,
book_item_design,
book_prob = NULL,
resample = FALSE,
e = 0.1,
iter = 20
)
Arguments
n_subj |
an integer, the number of subjects (test takers). |
book_item_design |
a data frame containing the items that belong to each booklet with booklets as columns and booklet item numbers as rows. See 'Details'. |
book_prob |
a vector of probability weights for obtaining the booklets being sampled. The default equally weights all books. |
resample |
logical indicating if booklets should be re-sampled to minimize differences.
Can only be used when |
e |
a number between 0 and 1 exclusive, re-sampling stopping criteria, the difference between the most sampled and least sampled booklets. |
iter |
an integer defining the number of iterations to reach e. |
Details
If using booklet_sample
in tandem with booklet_design
, book_item_design
is the the first element of the returned list of block_design
.
Examples
it_bk <- matrix(c(1, 2, 1, 4, 5, 4, 7, 8, 7, 10, 3, 10, 2, 6, 3, 5, 9, 6, 8, 0, 9),
ncol = 3, byrow = TRUE)
booklet_sample(n_subj = 10, book_item_design = it_bk, book_prob = c(.2, .5, .3))