RankSumWithNA:
Rank-Sum Test Statistic for MCAR Data
Description
This function calculates a test statistic analogous to the rank sum, but adjusted to accommodate missing responses. The result is intended to be used as a test statistic in a permutation test. Under the assumption that the data are missing completely at random, the resulting permutation test is an "nearly" exact test of distributional equality of the observed responses (Pesarin and Salmaso 2010, 234--44).
Usage
RankSumWithNA(y, tr, tl, ...)
Arguments
y
Response variable (vector)
tr
Treatment variable (vector)
tl
The level of treatment variable (e.g., "treated" or 1) that indicates treated observations
...
Additional arguments (included for compatibility but ignored)
Value
A scalar test statistic
References
Pesarin, Fortunato, and Luigi Salmaso. 2010. Permutation Tests for Complex Data. Chichester, UK: Wiley.