mst: Computerized Multistage Testing (MST)

Description Usage Arguments Details Examples

View source: R/module5_mst.R

Description

mst creates a multistage (MST) object

mst_route adds and removes routes in the MST

mst_obj adds objective functions to the MST

mst_constraint adds constraints to the MST

mst_stage_length sets the minimum and maximum length for a stage

mst_rdp anchors the routing decision point (rdp) between adjacent modules

mst_module_mininfo sets the minimum information for modules

mst_assemble assembles the mst

mst_get_items extracts items from results

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
mst(pool, design, npanel, method = c("topdown", "bottomup"), len = NULL,
  maxselect = NULL)

mst_route(x, route, op = c("+", "-"))

mst_obj(x, theta, indices = NULL, target = NULL, flatten = NULL)

mst_constraint(x, coef, min = NA, max = NA, level = NULL,
  indices = NULL)

mst_stage_length(x, stages, min = NA, max = NA)

mst_rdp(x, theta, indices, tol)

mst_module_mininfo(x, theta, mininfo, indices)

mst_assemble(x, ...)

## S3 method for class 'mst'
print(x, ...)

## S3 method for class 'mst'
plot(x, ...)

mst_get_items(x, panel, stage = NULL, module = NULL, route = NULL)

Arguments

pool

the item pool (data.frame)

design

the MST design (string): e.g., "1-2-3", "1-2-2", etc.

npanel

the number of panels

method

the design method: 'topdown' or 'bottomup'

len

the module/route length

maxselect

the maximum selection of items

x

a MST object

route

a MST route represented by a vector of module indices

op

"+" for adding a route and "-" for removing a route

theta

a theta point or interval for optimization

indices

the index of the route (topdown) or the module (bottomup) for adding objectives

target

the target values of the TIF objectives. NULL for maximization

flatten

the parameter for getting a flat TIF

coef

the coefficients of the constraint

min

the lower bound of the constraints

max

the upper bound of the constraints

level

the constrained level, NA for continuous variable

stages

the stage index

tol

tolerance parameter

mininfo

the minimum information threshold

...

further arguments

panel

the panel index

stage

the stage index

module

the module index

Details

The mst object contains: item pool (pool), ATA (assembler), route map (route), module map (module), design method (method), and several constants such as npanel, nstage, nmodule, nroute.
Two identifiers are used to index modules/testlets. form is a unique id for all modules (for ATA), and index is a panel-wise unique id (for MST).
There are two methods for designing MST: 'bottomup' and 'topdown'. The bottomup approach adds objectives and constraints on individual modules, whereas the topdown approach adds objectives and constraints directly on routes.

plot.mst draws module information functions if byroute=FALSE and route information functions if byroute=TRUE

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
## Not run: 
library(dplyr)
set.seed(10001)
## generate item pool
pool <- model_3pl()$gendata(1, 300)$items
pool$content <- sample(1:3, nrow(pool), replace=TRUE)
pool$time <- round(exp(rnorm(nrow(pool), log(60), .2)))

## ex. 1: 1-2-2 MST, 2 panels, topdown
## 20 items in total, 10 items in content area 1
## maximize info. at -1 and 1 for easy and hard routes
x <- mst(pool, "1-2-2", 2, 'topdown', len=20, maxselect=1)
x <- mst_obj(x, theta=-1, indices=1:2)
x <- mst_obj(x, theta=1, indices=3:4)
x <- mst_constraint(x, "content", 10, 10, level=1)
x <- mst_assemble(x, timeout=10)
plot(x)
plot(x, byroute=TRUE)
freq(mst_get_items(x, panel=1, route=1)$content, 1:3)$freq
freq(mst_get_items(x, panel=2, route=4)$content, 1:3)$freq

## ex. 2: 1-2-3 MST, 2 panels, bottomup, 
## 10 items in total and 4 items in content area 1 in each module
## maximize info. at -1, 0 and 1 for easy, medium, and hard modules
x <- mst(pool, "1-2-3", 2, 'bottomup', len=10, maxselect=1) %>%
  mst_route(c(1, 2, 6), "-") %>%
  mst_route(c(1, 3, 4), "-") %>%
  mst_obj(theta= 0, indices=c(1, 5)) %>%
  mst_obj(theta=-1, indices=c(2, 4)) %>%
  mst_obj(theta= 1, indices=c(3, 6)) %>%
  mst_constraint("content", 4, 4, level=1)
x <- mst_assemble(x, timeout=10)
group_by(x$items, panel, index) %>% summarise(n=sum(content==1))

## End(Not run)

xxIRT documentation built on Aug. 30, 2017, 5:06 p.m.

Related to mst in xxIRT...