Generate a CAT patterns

Share:

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 rphilip.chalmers@gmail.com

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)