pairwise.fun {MKinfer} | R Documentation |
Compute pairwise values for a given function
Description
The function computes pairwise values for a given function.
Usage
pairwise.fun(x, g, fun, ...)
Arguments
x |
numeric vector. |
g |
grouping vector or factor |
fun |
some function where the first two arguments have to be numeric vectors for which the function computes some quantity; see example section below. |
... |
additional arguments to fun. |
Details
The function computes pairwise values for a given function.
The implementation is in certain aspects analogously to
pairwise.t.test
.
Value
Vector with pairwise function values.
Author(s)
Matthias Kohl Matthias.Kohl@stamats.de
See Also
Examples
set.seed(13)
x <- rnorm(100)
g <- factor(sample(1:4, 100, replace = TRUE))
levels(g) <- c("a", "b", "c", "d")
pairwise.fun(x, g, fun = function(x, y) t.test(x,y)$p.value)
## in contrast to
pairwise.t.test(x, g, p.adjust.method = "none", pool.sd = FALSE)
[Package MKinfer version 1.2 Index]