updateDesign: Update design elements

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/updateDesign.R

Description

A function that will update the object returned from findNextItem.

Usage

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

Author(s)

Phil Chalmers [email protected]

References

Chalmers, R., P. (2012). mirt: A Multidimensional Item Response Theory Package for the R Environment. Journal of Statistical Software, 48(6), 1-29. 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. doi: 10.18637/jss.v071.i05

See Also

mirtCAT, findNextItem

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## 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 Update.thetas definition in design
CATdesign$design@Update.thetas(CATdesign$design, CATdesign$person, CATdesign$test) 
findNextItem(CATdesign)

## End(Not run)

philchalmers/mirtCAT documentation built on Oct. 22, 2018, 11:28 p.m.