npar.t.test.paired {nparcomp} | R Documentation |
A 2-sample nonparametric studentized permutation test for paired data
Description
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.
Usage
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)
Arguments
formula |
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. |
data |
A dataframe containing the variables specified in formula. |
conf.level |
The confidence level (default is 0.95). |
alternative |
Character string defining the alternative hypothesis, one of "two.sided", "less" or "greater". |
nperm |
The number of permutations for the studentized permutation test. By default it is nperm=10,000. |
rounds |
Number of rounds for the numeric values of the output (default is 3). |
info |
A logical whether you want a brief overview with informations about the output. |
plot.simci |
A logical indicating whether you want a plot of the confidence interval. |
Value
Info |
List of samples and sample sizes. |
Analysis |
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. |
input |
List of input by user. |
Note
A summary and a graph can be created separately by using the functions
summary.nparttestpaired
and plot.nparttestpaired
.
Make sure that your dataset is ordered by subjects before applying npar.t.test.paired.
Author(s)
Frank Konietschke
References
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.
See Also
For multiple comparison procedures based on relative effects, see nparcomp
.
Examples
## 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)
## End(Not run)