rankb: Rank Based Tests for Incomplete Paired Data
Description
The function performs testing the hypothesis of equality of means for the incomplete pairs setting data. The function uses a rank-based procedure for parameter estimation and hypothesis testing when the data are a mixture of paired observations and independent samples. The rank-based methods combine Wilcoxon signed-rank statistics and Wilcoxon-Mann-Whitney two-sample procedures. These methods were developed by Dubnicka, Blair and Hettmansperger (2002).
Usage
rankb(xp, yp, xu, yu, mu = NULL, method = "Ranku",
alternative = "two.sided", verbose = TRUE)
Arguments
xp, yp
(non-empty) numeric vectors of data values of the the complete pairs
xu
a numeric vector of data on x only
yu
a numeric vector of data on y only
mu
a number indicating the true value of the mean (or difference in means if you are performing a two sample test)
method
a character string specifying the different type of methods, must be one of "Ranku" or "Rankw"
alternative
a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less"
verbose
if TRUE, show the test used, null and alternative hypotheses in addition to the p-value
Value
A S4 object containing the following components:
Title
a character string describing the test used
Nhypothesis
a character string describing the null hypothesis
Ahypothesis
a character string describing the alternative hypothesis
Pval
the p-value for the test
References
Dubnicka, S. R., Blair, R. C., & Hettmansperger, T. P. (2002). Rank-based procedures for mixed paired and two-sample designs. Journal of Modern Applied Statistical Methods, 1(1), 6.
# NOT RUN {n=20n1=15n2=10r=0.8xp=rnorm(n)
yp=r*xp+(1-r)*(rnorm(n))
xu=rnorm(n1)
yu=rnorm(n2)
mu=0rankb(xp,yp,xu,yu,mu,method="Rankw",alternative="two.sided")
# }