In this entry, we will show how to generate a balanced incomplete block design (BIBD) for a best worst scaling type 1. Suppose you have \(v\) attributes you want to rank using a BWS type 1. A BWS type 1 experiments consists of \(r\) questions where in each question \(b\) attributes are given and asked to indicate the best and worst out of this subset of attributes.

The library crossdes contains the function find.BIB which has the following arguments:

This function can be used to search for a BIBD. The outcome, a matrix representing the experimental design, is not necessarily a BIBD design. The function isGYD will check if the found design is balanced (rows and or blocks). Here is an example of seven attributes, with seven questions and three attributes per question:

library(crossdes)
set.seed(1968)
des1 <- find.BIB(7,7,3)
print(des1)
##      [,1] [,2] [,3]
## [1,]    1    4    5
## [2,]    2    5    7
## [3,]    4    6    7
## [4,]    2    3    4
## [5,]    1    2    6
## [6,]    3    5    6
## [7,]    1    3    7
isGYD(des1)
## 
## [1] The design is a balanced incomplete block design w.r.t. rows.

We have set the seed with set.seed to fix the random seed. If you then generate the design on another moment it will give you the same design. To check how many times two attributes are simultanously in a question you can check isGYD(des1, tables = T) and check the table with Concurrence w.r.t. rows.

Suppose we try to find a BIBD design with five attributes per question for ranking 12 attributes. In order to do so we iterate over a sequence of number of questions (parametrized with \(i\)):

for (i in 12:15){
  des2 <- find.BIB(12,i,5)
  print(paste("A design with ",i,"questions:"))
  isGYD(des2)
}
## [1] "A design with  12 questions:"
## 
## [1] The design is neither balanced w.r.t. rows nor w.r.t. columns.
## 
## [1] "A design with  13 questions:"
## 
## [1] The design is neither balanced w.r.t. rows nor w.r.t. columns.
## 
## [1] "A design with  14 questions:"
## 
## [1] The design is neither balanced w.r.t. rows nor w.r.t. columns.
## 
## [1] "A design with  15 questions:"
## 
## [1] The design is neither balanced w.r.t. rows nor w.r.t. columns.

You can see that for each value of \(i\) there is no BIBD design.

Suppose we search for a design of fourty attributes / items and we set the number of questions to \(160\).

des2 <- find.BIB(40,160,4)
isGYD(des2)
## 
## [1] The design is neither balanced w.r.t. rows nor w.r.t. columns.
# number of occurences of treatments:
isGYD(des2)[3]
## 
## [1] The design is neither balanced w.r.t. rows nor w.r.t. columns.
## $`Number of occurrences of treatments in d`
##  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 
## 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 
## 27 28 29 30 31 32 33 34 35 36 37 38 39 40 
## 16 16 16 16 16 16 16 16 16 16 16 16 16 16

The following BIBD designs has been used in BWS case 1 studies:

With the function bws.questionnaire from the library support.BWS you get the series of BWS questions that correspond to the BIBD design.

library(support.BWS)
bws.questionnaire(choice.set = des1,
                  design.type = 2,
                  item.names = c("Item1", "Item2", "Item3", "Item4", "Item5", "Item6", "Item7"))
## 
## Q1
##  Best Items Worst
##  [ ]  Item1 [ ]  
##  [ ]  Item4 [ ]  
##  [ ]  Item5 [ ]  
## 
## Q2
##  Best Items Worst
##  [ ]  Item2 [ ]  
##  [ ]  Item5 [ ]  
##  [ ]  Item7 [ ]  
## 
## Q3
##  Best Items Worst
##  [ ]  Item4 [ ]  
##  [ ]  Item6 [ ]  
##  [ ]  Item7 [ ]  
## 
## Q4
##  Best Items Worst
##  [ ]  Item2 [ ]  
##  [ ]  Item3 [ ]  
##  [ ]  Item4 [ ]  
## 
## Q5
##  Best Items Worst
##  [ ]  Item1 [ ]  
##  [ ]  Item2 [ ]  
##  [ ]  Item6 [ ]  
## 
## Q6
##  Best Items Worst
##  [ ]  Item3 [ ]  
##  [ ]  Item5 [ ]  
##  [ ]  Item6 [ ]  
## 
## Q7
##  Best Items Worst
##  [ ]  Item1 [ ]  
##  [ ]  Item3 [ ]  
##  [ ]  Item7 [ ]