Learn R Programming

eba (version 1.5-2)

balanced.pcdesign: Balanced Paired-Comparison Design

Description

Creates a (completely) balanced paired-comparison design.

Usage

balanced.pcdesign(nstimuli)

Arguments

nstimuli
number of stimuli in the paired-comparison design

Value

  • pairsa character array holding the balanced pairs; see David (1988) for details how it is constructed
  • listAthe vector pairs in the original within-pair order
  • listBthe vector of pairs in the inverted within-pair order

Details

When nstimuli is odd, the presentation order is completely balanced, that is any given stimulus appears an equal number of times as the first and second member of a pair. When nstimuli is even, the presentation order is balanced as much as possible.

In order to balance the within-pair presentation order over a sample of subjects, subjects should be equally assigned to listA and listB.

Pairs should be re-randomized for each subject.

References

David, H. (1988). The method of paired comparisons. London: Griffin.

See Also

pcX, eba.

Examples

Run this code
## Create balanced design for 6 stimuli
bp <- balanced.pcdesign(6)

## Replicate each with-pair order 10 times and re-randomize
cbind(replicate(10, sample(bp$listA)), replicate(10, sample(bp$listB)))

Run the code above in your browser using DataLab