Testing the format of the list for content balancing under dichotomous or polytomous IRT models

Share:

Description

This command tests whether format of the list to be assigned to cbControl argument of function nextItem is appropriate for content balancing, and returns a warning message otherwise.

Usage

1
2
test.cbList(list, cbGroup)
 

Arguments

list

a list of arguments to be tested. See Details.

cbGroup

a vector of character or factor names of the subgroups of items in the bank, or NULL.

Details

The test.cbList function checks whether the list provided in the cbControl argument of the nextItem and randomCAT functions, is accurate for controlling for content balancing. It mainly serves as an initial check for the randomCAT function.

The function returns an "ok" message if the arguments of list match the requirement of the list cbControl for content balancing. Otherwise, a message is returned with information about list - type mismatch. This will be the case if:

  • list is not a list or has not exactly two elements,

  • at least one of the argument names is incorrect,

  • the lengths of the arguments are different, or different from the number of subgroups of items,

  • the 'names' element does not match with the subgroups' names,

  • the 'props' element is not numeric or holds negative values.

Each mismatch yields a different output message to help in debugging the problem.

Value

A list with two arguments:

test

a logical value indicating whether the format of the list is accurate (TRUE) or not (FALSE).

message

either a message to indicate the type of misspecification, or "ok" if the format is accurate.

Author(s)

David Magis
Department of Education, University of Liege, Belgium
david.magis@ulg.ac.be

References

Magis, D., and Raiche, G. (2012). Random Generation of Response Patterns under Computerized Adaptive Testing with the R Package catR. Journal of Statistical Software, 48 (8), 1-31. URL http://www.jstatsoft.org/v48/i08/

See Also

nextItem, randomCAT

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
56
57
58
59
60
61
62
63
64
65
66
67
## Dichotomous models ##

 # Loading the 'tcals' parameters 
 data(tcals)
 
 # Vector of group membership for 'tcals' data set
 group <- tcals$Group

 # Creation of a correct list with arbitrary proportions
 cbList <- list(names = c("Audio1", "Audio2", "Written1", "Written2", "Written3"), 
        props = c(0.1, 0.2, 0.2, 0.2, 0.3))

 # Testing 'cbList'
 test.cbList(cbList, group)

 # Creation of an incorrect list (mismatch in first name)
 cbList <- list(names = c("audio1", "Audio2", "Written1", "Written2", "Written3"), 
        props=c(0.1, 0.2, 0.2, 0.2, 0.3))
 test.cbList(cbList, group)

 # Creation of an incorrect list (mismatch in name of second
 # element)
 cbList <- list(names = c("Audio1", "Audio2", "Written1", "Written2", "Written3"), 
        prop = c(0.1, 0.2, 0.2, 0.2, 0.3))
 test.cbList(cbList, group)

 # Creation of an incorrect list (second element shorter than
 # first element)
 cbList <- list(names = c("Audio1", "Audio2", "Written1", "Written2", "Written3"), 
         props=c(0.1, 0.2, 0.2, 0.2))
 test.cbList(cbList, group)

 # Creation of an incorrect list (adding a third element)
 cbList <- list(names = c("Audio1", "Audio2", "Written1", "Written2", "Written3"),  
        props = c(0.1, 0.2, 0.2, 0.2), third = "hi")
 test.cbList(cbList, group)


## Polytomous models ##

 # Creation of an appropriate list for content balancing
 # Equal proprotions across subgroups of items
 cbList <- list(names = c("Group1", "Group2", "Group3", "Group4"), props = rep(1, 4))

 # Creation of a "wrong" list
 cbList2 <- list(names=c("group1","group2"),props = c(1, 1))

 # Generation of an item bank under GRM with 100 items and at most 4 categories
 m.GRM <- genPolyMatrix(100, 4, "GRM", cbControl = cbList)

 # Breaking the 'm.GRM' bank
 bank <- breakBank(m.GRM)

 # Testing 'cbList' and 'cbList2'
 test.cbList(cbList, bank$cbGroup)
 test.cbList(cbList2, bank$cbGroup)

 # Generation of an item bank under PCM with 100 items, 4 categories and groups
 m.PCM <- genPolyMatrix(100, 4, "PCM", same.nrCat = TRUE, cbControl = cbList2)
 
 # Breaking the 'm.PCM' bank
 bank2 <- breakBank(m.PCM)

 # Testing 'cbList' and 'cbList2'
 test.cbList(cbList, bank2$cbGroup)
 test.cbList(cbList2, bank2$cbGroup)
 

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.