generate_pattern: Generate a CAT patterns

Description Usage Arguments Author(s) References See Also Examples

View source: R/generate_pattern.R

Description

Generate a CAT pattern given various inputs. Returns a character vector or numeric matrix (depending on whether a df input was supplied) with columns equal to the test size and rows equal to the number of rows in Theta. For simulation studies, supplying a Theta input with more than 1 row will generate a matrix of responses for running independent CAT session when passed to mirtCAT(..., local_pattern). When the returned object is an integer vector then the Theta values will be stored as an attribute 'Theta' to be automatically used in Monte Carlo simulations.

Usage

1
generate_pattern(mo, Theta, df = NULL)

Arguments

mo

single group object defined by the mirt package

Theta

a numeric vector indicating the latent theta values for a single person

df

(optional) data.frame object containing questions, options, and scoring keys. See mirtCAT for details

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 

# return real response vector given choices and (optional) answers 
pat <- generate_pattern(mod, Theta = 0, df=df)
# mirtCAT(df, mo=mod, local_pattern = pat)

# generate single pattern observed in dataset used to define mod
pat2 <- generate_pattern(mod, Theta = 0)
# mirtCAT(mo=mod, local_pattern = pat2)

# generate multiple patterns to be analyzed independently 
pat3 <- generate_pattern(mod, Theta = matrix(c(0, 2, -2), 3))
# mirtCAT(mo=mod, local_pattern = pat3)


## End(Not run)

mirtCAT documentation built on July 27, 2017, 1:01 a.m.