Last data update: 2014.03.03

R: Update design elements
updateDesignR Documentation

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 indiciating 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.

Author(s)

Phil Chalmers rphilip.chalmers@gmail.com

See Also

mirtCAT, findNextItem

Examples

## 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) 

# detemine 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)

Results