Automated Test Assembly

Share:

Description

ata creates a autmoated test assemlby (ATA) object

ata.obj.rel adds an relative (maximize/minimize) objective function to LP

ata.obj.abs adds an absolute objective function to LP

ata.maxselect sets the maximum selection for items

ata.fixitem set a fixed value for items, e.g, 1 for selection and 0 for no selection

ata.solve solves the LP and returns results

ata.collapse combine assmebly results from list to one data frame

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
ata(pool, nform)

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

ata.obj.rel(x, value, mode, negative.obj = FALSE, forms = NULL)

ata.obj.abs(x, value, target, forms = NULL)

ata.constraint(x, var, level, min, max, forms = NULL)

ata.maxselect(x, maxselect, items = NULL)

ata.fixitem(x, value, items, forms = NULL)

ata.solve(x, ...)

ata.collapse.rs(x)

Arguments

pool

an item pool (data.frame)

nform

the number of forms to assemble

x

the ata object

...

further arguments

value

a variable name, a theta point, or a vector of numeric values for all items

mode

min for minimization and max for maximization

negative.obj

TRUE if the objective function is epected to have a negative value

forms

a vector of form where objective function is added

target

the target value of the objective function

var

the variable used to create constraint, and use "len" to add test length constraint

level

a level value for categorical variable, and NA or NULL for continuous varialbe

min

the minimum value

max

the maximum value

maxselect

the maximum times of selection

items

a vector of item index

Details

An ata object contains pool (item pool), nitem (number of items in the pool), nform (number of forms), nlpitem (number of item-related decision variables in LP), nlp (number of all decision variables), lp (the LP object), rs.index (indices of assembled items, if LP is solved), rs.items (assembled items, if LP is solved)

ata.obj.rel: For maximization problem, if obj.fn > 0, maximize y while obj.fn - y >= 0. If obj.fn < 0, minimize y while obj.fn + y >= 0. For minimization problem, if obj.fn > 0, minimize y while obj.fn - y <= 0. If obj.fn < 0, maximize y while obj.fn + y <= 0.

ata.obj.abs minimizes y while obj.fn + y >= target and obj.fn - y <= target.

In ata.solve, the ... are additional lp.control.options

Value

ata returns an ata object

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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
pool <- gen.irt(1, 100)$items
pool$content <- sample(1:3, nrow(pool), replace=TRUE)
pool$time <- round(exp(rnorm(nrow(pool), log(20), .1)))
# assemble two 10-item forms to maximize information at theta=(-.5, .5)
x <- ata(pool, 2)
x <- ata.maxselect(x, 1)
x <- ata.constraint(x, "len", NA, 10, 10)
x <- ata.obj.rel(x, -0.5, "max")
x <- ata.obj.rel(x,  0.5, "max")
x <- ata.solve(x)
y1 <- x$rs.items[[1]]
y2 <- x$rs.items[[2]]
y1
y2
with(y1, plot(irt(c(-.5, .5), a, b, c), type="information"))
with(y2, plot(irt(c(-.5, .5), a, b, c), type="information"))
# assemble two 10-item forms to maximize difficulty without any items from content 1
x <- ata(pool, 2)
x <- ata.maxselect(x, 1)
x <- ata.constraint(x, "len", NA, 10, 10)
x <- ata.constraint(x, "content", 1, 0, 0)
x <- ata.obj.rel(x, "b", "max")
x <- ata.solve(x)
y1 <- x$rs.items[[1]]
y2 <- x$rs.items[[2]]
with(y1, plot(irt(0, a, b, c), type="information"))
with(y2, plot(irt(0, a, b, c), type="information"))
# assemble two 10-item forms to have have information (3.5, 3.5, 3.5) at (-.5, 0, .5)
x <- ata(pool, 2)
x <- ata.maxselect(x, 1)
x <- ata.constraint(x, "len", NA, 10, 10)
x <- ata.obj.abs(x, -0.5, 3.5)
x <- ata.obj.abs(x,  0.0, 3.5)
x <- ata.obj.abs(x,  0.5, 3.5)
x <- ata.solve(x)
y1 <- x$rs.items[[1]]
y2 <- x$rs.items[[2]]
with(y1, plot(irt(c(-.5,0,.5),a,b,c), type="information"))
with(y2, plot(irt(c(-.5,0,.5),a,b,c), type="information"))
# assemble two 10-item forms in which mean(b)=1, sd(b)=1
x <- ata(pool, 2)
x <- ata.maxselect(x, 1)
x <- ata.constraint(x, "len", NA, 10, 10)
x <- ata.obj.abs(x, "b", 1.0 * 10)
x <- ata.obj.abs(x, (pool$b-1.0)^2, 1.0 * 10)
x <- ata.solve(x)
y1 <- x$rs.items[[1]]
mean(y1$b)
sd(y1$b)
y2 <- x$rs.items[[2]]
mean(y2$b)
sd(y2$b)
x$rs.items
with(y1, plot(irt(0, a, b, c), type="information"))
with(y2, plot(irt(0, a, b, c), type="information"))