The function npar.t.test.paired performs a two sample studentized permutation test for paired data, that is testing the hypothesis $$H_0: p=1/2$$ where p denotes the relative effect of 2 dependent samples, and computes a confidence interval for the relative effect p. In addition the Brunner-Munzel-Test accompanied by a confidence interval for the relative effect is implemented. npar.t.test.paired also computes one-sided and two-sided confidence intervals and p-values. The confidence interval can be plotted.
npar.t.test.paired(formula, data, conf.level = 0.95, alternative = c("two.sided",
"less", "greater"), nperm=10000, rounds = 3,
info = TRUE, plot.simci = TRUE)
A two-sided 'formula' specifying a numeric response variable and a factor with two levels. If the factor contains more than two levels, an error message will be returned.
A dataframe containing the variables specified in formula.
The confidence level (default is 0.95).
Character string defining the alternative hypothesis, one of "two.sided", "less" or "greater".
The number of permutations for the studentized permutation test. By default it is nperm=10,000.
Number of rounds for the numeric values of the output (default is 3).
A logical whether you want a brief overview with informations about the output.
A logical indicating whether you want a plot of the confidence interval.
List of samples and sample sizes.
Effect: relative effect p(a,b) of the two samples 'a' and 'b', p.hat: estimated relative effect, Lower: Lower limit of the confidence interval, Upper: Upper limit of the confidence interval, T: studentized teststatistic p.value: p-value for the hypothesis.
List of input by user.
Munzel, U., Brunner, E. (2002). An Exact Paired Rank Test. Biometrical Journal 44, 584-593.
Konietschke, F., Pauly, M. (2012). A Studentized Permutation Test for the Nonparametric Behrens-Fisher Problem in Paired Data. Electronic Journal of Statistic, Vol 6, 1358-1372.
For multiple comparison procedures based on relative effects, see nparcomp
.
# NOT RUN {
data(PGI)
a<-npar.t.test.paired(PGIscore~timepoint, data = PGI,
alternative = "two.sided", info=FALSE, plot.simci=FALSE)
summary(a)
plot(a)
# }
Run the code above in your browser using DataLab