pairwise.ext.t.test: Compute Pairwise t Tests

View source: R/pairwise.ext.t.test.R

pairwise.ext.t.testR Documentation

Compute Pairwise t Tests

Description

The function computes pairwise t tests using functions t.test, boot.t.test or perm.t.test.

Usage

pairwise.ext.t.test(x, g, method = "t.test", p.adjust.method = "holm", 
                    paired = FALSE, ...)

Arguments

x

numeric vector.

g

grouping vector or factor

method

character giving the name of the function to be applied; that is, "t.test", "hsu.t.test", "boot.t.test" or "perm.t.test".

p.adjust.method

method for adjusting p values (see p.adjust). Can be abbreviated.

paired

a logical indicating whether you want a paired test.

...

additional arguments to fun.

Details

The function computes pairwise t tests using function t.test, hsu.t.test, boot.t.test or perm.t.test.

The implementation is in certain aspects analogously to pairwise.t.test. However, a more detailed output is generated.

Value

Object of class "pw.htest" containing the following components:

data.name

a character string giving the names of the data.

method

the type of test applied.

null.value

the location parameter mu.

alternative

a character string describing the alternative hypothesis.

conf.level

confidence level of the confidence interval.

results

a data.frame containing the results of function t.test, boot.t.test or perm.t.test.

Author(s)

Matthias Kohl Matthias.Kohl@stamats.de

See Also

t.test, pairwise.t.test

Examples

set.seed(13)
x <- rnorm(100)
g <- factor(sample(1:4, 100, replace = TRUE))
levels(g) <- c("a", "b", "c", "d")
pairwise.ext.t.test(x, g)
## in contrast to
pairwise.t.test(x, g, pool.sd = FALSE)
## moreover
pairwise.ext.t.test(x, g, method = "hsu.t.test")
pairwise.ext.t.test(x, g, method = "boot.t.test")
pairwise.ext.t.test(x, g, method = "perm.t.test")

stamats/MKinfer documentation built on April 10, 2024, 3:33 p.m.