x: an object of class 'mirtCAT_design' returned from the mirtCAT function when passing design_elements = TRUE
new_item: a numeric vector indicating which items to select
new_response: a numeric vector indicating the responses the the selected items
updateTheta: logical; update the internal ability terms after the new item response has been added to the internal objects?
Returns
returns an object of class 'mirtCAT_design' with updated elements.
Examples
## Not run:set.seed(1)nitems <-100itemnames <- paste0('Item.',1:nitems)a <- matrix(rlnorm(nitems,.2,.3))d <- matrix(rnorm(nitems))dat <- simdata(a, d,500, itemtype ='dich')colnames(dat)<- itemnames
mod <- mirt(dat,1, verbose =FALSE)# test defined in mirtCAT help file, first exampleCATdesign <- mirtCAT(mo = mod, criteria ='MI', design_elements =TRUE, start_item =2)# returns 2 in this case, since that was the starting itemfindNextItem(CATdesign)# first iteration, no answered itemsCATdesign$person$items_answered
# update when next item is item 2 and answered correctlyCATdesign <- updateDesign(CATdesign, new_item =2, new_response =1)CATdesign$person$items_answered # item 2 answered firstCATdesign$person$responses # in item 2 element response was = 1 CATdesign$person$thetas # current estimatefindNextItem(CATdesign)# determine next item if item 70 were also answered correctly nextCATdesign <- updateDesign(CATdesign, new_item =70, new_response =1)CATdesign$person$items_answered
CATdesign$person$responses
findNextItem(CATdesign)# continue on, now with item 95 added next (answered incorrectly)CATdesign <- updateDesign(CATdesign, new_item =95, new_response =0)CATdesign$person$thetas
CATdesign$person$thetas_history
CATdesign$person$thetas_SE_history
findNextItem(CATdesign)## End(Not run)
References
Chalmers, R., P. (2012). mirt: A Multidimensional Item Response Theory Package for the R Environment. Journal of Statistical Software, 48(6), 1-29. tools:::Rd_expr_doi("10.18637/jss.v048.i06")
Chalmers, R. P. (2016). Generating Adaptive and Non-Adaptive Test Interfaces for Multidimensional Item Response Theory Applications. Journal of Statistical Software, 71(5), 1-39. tools:::Rd_expr_doi("10.18637/jss.v071.i05")