Learn R Programming

mirtCAT (version 1.2)

updateDesign: Update design elements

Description

A function that will update the object returned from findNextItem.

Usage

updateDesign(x, items, responses, Theta = NULL)

Arguments

x
an object of class 'mirtCAT_design' returned from the mirtCAT function when passing design_elements = TRUE
items
a numeric vector indicating which items to select
responses
a numeric vector indicating the responses the the selected items
Theta
(optional) vector indicating the value of Theta/latent traits to be set

Value

returns an object of class 'mirtCAT_design' with updated elements.

See Also

mirtCAT, findNextItem

Examples

Run this code
## Not run: 
# # test defined in mirtCAT help file, first example
# CATdesign <- mirtCAT(df, mod, criteria = 'MI', design_elements = TRUE)
# 
# # returns number 1 in this case, since that's the starting item
# findNextItem(CATdesign) 
# 
# # determine next item if item 1 and item 10 were answered correctly, and Theta = 0.5
# CATdesign <- updateDesign(CATdesign, items = c(1, 10), responses = c(1, 1), Theta = 0.5)
# findNextItem(CATdesign) 
# 
# # alternatively, update the Theta using the internal ReferenceClass method
# Person$help('Update.thetas') # internal help file for class 'Person'
# CATdesign$person$Update.thetas(CATdesign$design, CATdesign$test) 
# findNextItem(CATdesign)
# ## End(Not run)

Run the code above in your browser using DataLab