tmatta / lsasim

Simulate large scale assessment data
6 stars 5 forks source link

Error: Default booklet assembly requires more than 2 forms #6

Closed mollyolaf closed 7 years ago

mollyolaf commented 7 years ago

How to generate a test with just one block (all items to all "examinees") or two blocks?

tmatta commented 7 years ago

Here is an example that generates 1 block and one booklet so that all 20 items go to all 50 students.

source("R/item_gen.R")  
source("R/block_design.R")  
source("R/booklet_design.R")  
source("R/booklet_sample.R") 

#--- Generate items for example
gen2PL <- item_gen(n_2pl = 20,
                   b_bounds = c(-2, 2),
                   a_bounds = c(.75, 1.25))

item_block_mat <- matrix(nrow = nrow(gen2PL), ncol = 1, byrow = T, rep(1, 20))

block_2 <- block_design(item_parameters = gen2PL, item_block_matrix = item_block_mat)

book_2 <- booklet_design(item_block_assignment = block_2$block_assignment,
          book_design = matrix(1, nrow = 1, ncol = 1))

assign_booklets <- booklet_sample(n_subj = 50, book_item_design = book_2)