View source: R/bws.questionnaire.R
| bws.questionnaire | R Documentation |
This function converts a two-level orthogonal main-effect design (OMED)/balanced incomplete block design (BIBD) into a series of BWS questions.
bws.questionnaire(choice.sets, design.type, item.names)
choice.sets |
A data frame or matrix containing choice sets. |
design.type |
A value describing how to design the choice sets: |
item.names |
A vector containing the names of items shown in the questions. |
A two-level OMED/BIBD is assigned to choice.sets, and may be generated by R functions (e.g., the oa.design function in DoE.base; the find.BIB function in crossdes) or copied manually from text books/web sites related to the design of experiments.
When the design is a two-level OMED, each row corresponds to a question and each column corresponds to an item. The level values in the design have to be 1 and 2. The former corresponds to an item being “absent” from a column and the latter corresponds to the item being “present.” The correspondence between item names and columns is defined and assigned to the argument item.names: the order of names in the vector assigned to item.names corresponds to the order of columns (from left to right) in the choice sets assigned to choice.sets.
When the design is a BIBD, each row corresponds to a question and the number of columns is equal to the number of items per question. The level values in the design have to be serial integer values, starting from 1: each value corresponds to an item. The correspondence between item names and level values is defined and assigned to the argument item.names: the order of names in item.names corresponds to the order of level values in the design (i.e., the j th item in item.names corresponds to the level value of j in the design).
BWS questions converted from the design are returned.
Hideo Aizaki
bws.dataset, oa.design, find.BIB
## See examples in bws.dataset()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.