perm.t.test: Permutation t-test

Description Usage Arguments Details Value See Also Examples

View source: R/perm.t.test.R

Description

Two Sample t-test via monte-carlo permutation

Usage

1
2
perm.t.test(x,y,statistic=c("t","mean"),
			alternative=c("two.sided", "less", "greater"), midp=TRUE, B=10000)

Arguments

x

a numeric vector containing the first sample

y

a numeric vector containing the second sample

statistic

The statistic to be permuted. See details

alternative

The alternative hypothesis

midp

should the mid p-value be used

B

The number of monte-carlo samples to be generated

Details

This function performs a two sample permutation test. If the mean is permuted, then the test assumes exchangability between the two samples. if the t-statistic is used, the test assumes either exchangability or a sufficiently large sample size. Because there is little lost in the way of power, and the assumptions are weaker, the t-statistic is used by default.

Value

A list with class "htest" containing the following components:

statistic

The observed value of the statistic.

p.value

the p-value for the test.

method

a character string indicating the type of test performed.

data.name

a character string giving the name(s) of the data.

B

The number of samples generated

alternative

the direction of the test

See Also

t.test

Examples

1
perm.t.test(rnorm(100),runif(100,-.5,.5))

Deducer documentation built on May 2, 2019, 8:35 a.m.

Related to perm.t.test in Deducer...