This function balances the pairs of stimuli so that each stimulus appears equally often as the first or second member of a pair.

1 | ```
balance.pairs(matrix.x, matrix.y, numstim)
``` |

`matrix.x` |
A matrix where the elements correspond to the ordinal position of the stimulus presented first in each pair |

`matrix.y` |
A matrix where the elements correspond to the ordinal position of the stimulus presented second in each pair |

`numstim` |
The number of stimuli |

This function is called in the `ross.ordering`

, `matrix.sampling`

and `incomplete.design`

functions.

A data frame of the ordinal positions for the balanced pairs of stimuli.

Andrew Zieffler zief002@umn.edu, Stacy Karl karlx028@umn.edu, and Julio Cabrera cabre031@umn.edu

Davison, M. L. Zieffler, A. Cabrera, J. Karl, S. R. and Cohen, H. S. in press Automated Assembly of Optimally Spaced and Balanced Paired Comparisons: Controlling Order Effects. *Behavioral Research Methods*. DOI 10.3758/s13428-011-0170-0

Cohen, H.S. and Davison, M.L. 1973 Jiffy-Scale: A FORTRAN IV Program for Generating Ross-Ordered Paired Comparisons. *Behavioral Science*, **18**, 1, 76.

Ross, R.T. 1934 Optimimum Orders for the Presentation of Pairs in the Method of Paired Comparisons. *Journal of Educational Psychology*, **25**, 5, 375–382.

`matrix.x`

, `matrix.y`

1 | ```
balance.pairs(matrix.x(9), matrix.y(9), 9)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.