Calculates one-sided qualitative confidence intervals based on a sign test for a matched pairs design and a stratified rank sum test for a general matched sets design.

1 | ```
qualCI(obj)
``` |

`obj` |
an object of class " |

For a matched pairs design, the function identifies the difference between the units in the lowest ranked pair as the qualitative confidence interval, along with the confidence level from the sign test. For a general matched sets design, the function prompts the user to identify the hardest-to-rank pair from a pool of candidate pairs (all treatment-control pairs where the treated unit has a within-set rank that is immediately above the rank for the control unit). The function then returns the difference between the units in this pair as the qualitative confidence interval, along with the confidence level from the stratified rank sum test.

`qualCI`

returns an object of class "`qualCI`

", which consists of the following components:

`qualci` |
pair of units whose difference represents the qualitative confidence interval |

`set` |
set from which pair was drawn |

`ci.level` |
confidence interval level based on sign rank test for matched pairs and the stratified rank sum test for more general matched sets |

Konstantin Kashin kkashin@fas.harvard.edu

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
data(pluralityPairs)
between.ranks <- c(3,4,2,1)
dat <- quade.prep(data=pluralityPairs, set="pair", treatment="plurality",
withinRank="OppHarRank", unit="country", betweenRank=between.ranks)
qout <- quade(dat)
qualCI(qout)
data(pluralitySets)
between.ranks <- c(2,3,1)
dat <- quade.prep(data=pluralitySets, set="set", treatment="plurality",
withinRank="OppHarRank", unit="country", betweenRank=between.ranks)
qout <- quade(dat)
# not run because requires user input
# qualCI(qout)
``` |

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.