perm.ttest: Permutation t-test for one or two independent samples

View source: R/means_tests.R

Permutation t-test for one or two independent samplesR Documentation

Permutation t-test for one or two independent samples

Description

Permutation t-test for one or two independent samples.

Usage

perm.ttest(x, y = NULL, m, B = 999)
perm.ttest2(x, y, B = 999)

Arguments

x

A numerical vector with the data.

y

A numerical vector with the data. In case of one sample t-test this is NULL.

m

The hypothesized mean in the case of one sample t-test.

B

The number of permutations to perform.

Details

The usual permutation based p-value is computed.

Value

A vector with the test statistic and the permutation based p-value.

Author(s)

Michail Tsagris and Nikolaos Kontemeniotis.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr and Nikolaos Kontemeniotis kontemeniotisn@gmail.com.

References

Good P. I. (2005). Permutation, parametric and bootstrap tests of hypotheses: a practical guide to resampling methods for testing hypotheses. Springer 3rd Edition.

See Also

jack.mean, trim.mean, moranI

Examples

x <- rexp(30, 4)
y <- rbeta(30, 2.5, 7.5)
perm.ttest(x = x, y = y, B = 299)

Rfast2 documentation built on April 11, 2025, 6:15 p.m.