The rank.two.samples() function calculates the weighted or unweighted treatment effect in
a two-sample problem. In addition to rankFD, the user can specify the alternative
and choose from a variety of different possibilities to calculate confidence intervals, see the details
below. Furthermore, a Wilcoxon test is calculate with the possibility to consider shift effects.
rank.two.samples(formula, data, conf.level = 0.95,
alternative = c("two.sided", "less", "greater"), rounds = 3,
method = c("logit", "probit", "normal", "t.app", "permu"),
plot.simci = FALSE, info = TRUE, wilcoxon = c("asymptotic",
"exact"), shift.int = TRUE, nperm = 10000)A model formula object. The left hand side
contains the response variable and the right hand side contains the factor
variables of interest. An interaction term must be specified.
A data.frame, list or environment containing the variables in
formula. The default option is NULL.
A number specifying the confidence level; the default is 0.95.
Which alternative is considered? One of "two.sided", "less", "greater".
Value specifying the number of digits the results are rounded to.
specifying the method used for calculation of the confidence intervals. One of "logit", "probit", "normal", "t.app" and "permu".
Logical, indicating whether or not confidence intervals should be plotted
Logical. info = FALSE suppresses the output of additional information concerning e.g. the interpretation of the test results.
asymptotic or exact calculation of Wilcoxon test.
Logical, indicating whether or not shift effects should be considered.
Number of permutations used, default is 10000.
The confidence intervals are given for the treatment effect \(p = P(X_1 < Y_1) + \frac{1}{2}P(X_1 = Y_1)\)
underlying the Wilcoxon-Mann-Whitney test including tied data. Different methods for calculation can be chosen,
see Pauly et al.(2016) for the permutation approach, Brunner and Munzel (2000) for the t-approximation and
Kaufmann et al.(2005) for the transformations. For plotting, the parameter plot.simci must be set to TRUE.
Brunner, E. and Munzel, U. (2000). The nonparametric Behrens-Fisher problem: Asymptotic theory and a small-sample approximation. Biometrical Journal 1, 17 - 21.
Kaufmann, J., Werner, C., and Brunner, E. (2005). Nonparametric methods for analysing the accuracy of diagnostic tests with multiple readers. Statistical Methods in Medical Research 14, 129 - 146
Pauly, M., Asendorf, T., and Konietschke, F. (2016). Permutation tests and confidence intervals for the area under the ROC-curve. Biometrical Journal, to appear.
# NOT RUN {
data(Muco)
Muco2 <- subset(Muco, Disease != "OAD")
twosample <- rank.two.samples(HalfTime ~ Disease, data = Muco2,
alternative = "greater", method = "probit", wilcoxon = "exact", plot.simci = FALSE,
shift.int = FALSE)
# }
Run the code above in your browser using DataLab