balanced.pcdesign.Rd
Creates a (completely) balanced paired-comparison design.
balanced.pcdesign(nstimuli)
nstimuli | number of stimuli in the paired-comparison design |
---|
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. Subjects should be equally assigned
to listA
and listB
for the purpose of balancing the
within-pair presentation order across a sample of subjects. Pairs should be
re-randomized for each subject. See David (1988) for details.
a character array holding the balanced pairs
the vector pairs in the original within-pair order
the vector of pairs in the inverted within-pair order
David, H. (1988). The method of paired comparisons. London: Griffin.
## Create balanced design for 6 stimuli bp <- balanced.pcdesign(6) ## Replicate each within-pair order 10 times and re-randomize cbind(replicate(10, sample(bp$listA)), replicate(10, sample(bp$listB)))#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] #> [1,] "fc" "bd" "ce" "fa" "dc" "fb" "dc" "fb" "fc" "ef" "ca" "be" "ca" #> [2,] "fb" "da" "ba" "ed" "ba" "cb" "cb" "ae" "eb" "cb" "ab" "de" "fe" #> [3,] "cb" "ce" "ed" "eb" "df" "ba" "fa" "ac" "fb" "fc" "af" "ec" "ea" #> [4,] "ce" "fc" "bd" "ce" "ef" "ed" "ce" "eb" "df" "fb" "bc" "cd" "bf" #> [5,] "ba" "eb" "ef" "ac" "fa" "ef" "fc" "fc" "da" "ce" "fd" "ea" "de" #> [6,] "df" "ba" "ae" "ae" "fb" "eb" "ba" "ed" "cb" "df" "be" "cf" "ad" #> [7,] "da" "df" "eb" "dc" "bd" "fc" "da" "dc" "bd" "fa" "db" "fd" "db" #> [8,] "fa" "ac" "fa" "df" "ed" "ae" "ed" "fa" "fa" "dc" "ec" "bc" "cd" #> [9,] "ae" "ae" "df" "da" "ae" "df" "bd" "ef" "ed" "bd" "fe" "db" "af" #> [10,] "bd" "dc" "cb" "bd" "da" "da" "eb" "ce" "ba" "ed" "ea" "af" "cf" #> [11,] "ed" "fa" "ac" "fc" "eb" "ac" "fb" "ba" "dc" "ac" "bf" "ab" "ec" #> [12,] "eb" "fb" "fc" "ba" "fc" "bd" "ae" "da" "ef" "ae" "cd" "ca" "bc" #> [13,] "ef" "ef" "fb" "cb" "ac" "ce" "df" "df" "ce" "da" "cf" "bf" "ab" #> [14,] "ac" "cb" "da" "ef" "ce" "fa" "ac" "bd" "ae" "ba" "de" "fe" "fd" #> [15,] "dc" "ed" "dc" "fb" "cb" "dc" "ef" "cb" "ac" "eb" "ad" "ad" "be" #> [,14] [,15] [,16] [,17] [,18] [,19] [,20] #> [1,] "ec" "bc" "bf" "be" "af" "ca" "af" #> [2,] "de" "ca" "bc" "fe" "ca" "fe" "ea" #> [3,] "fd" "be" "ad" "ea" "db" "ec" "de" #> [4,] "ad" "bf" "fd" "db" "ab" "cd" "fe" #> [5,] "bc" "cf" "cf" "bc" "cf" "fd" "bc" #> [6,] "ab" "fe" "af" "cf" "cd" "af" "ec" #> [7,] "ca" "af" "de" "ec" "be" "de" "be" #> [8,] "cf" "ec" "fe" "cd" "bf" "cf" "cf" #> [9,] "bf" "ad" "ec" "fd" "ad" "be" "cd" #> [10,] "cd" "ea" "be" "ab" "fd" "ea" "ca" #> [11,] "db" "de" "cd" "ad" "bc" "bc" "fd" #> [12,] "ea" "db" "ea" "af" "fe" "ab" "db" #> [13,] "fe" "cd" "ab" "bf" "ec" "bf" "ab" #> [14,] "be" "fd" "ca" "de" "de" "ad" "bf" #> [15,] "af" "ab" "db" "ca" "ea" "db" "ad"