randomizationTest: Randomization Test

View source: R/randomizationTest.R

randomizationTestR Documentation

Randomization Test

Description

A function to perform randomization test

Usage

randomizationTest(list, R = 500, calc, fun = NA, 
                  seed = NA, printSummary = TRUE)

Arguments

list

a list with two or more numeric vectors

R
calc

a function to be applied to every vector in list

fun

a function to be applied to a vector (e.g. x) of length length(list), containing result of function calc

seed

a single value, interpreted as an integer. If specified make the simulation replicable.

printSummary

logical, if TRUE print a summary of the randomization test

Value

The silently returned value is an object of class "boot"

Author(s)

Daniele Amberti

References

Kenett, R., Zacks, S. with contributions by Amberti, D. Modern Industrial Statistics: with applications in R, MINITAB and JMP. Wiley.

See Also

boot

Examples

data(OELECT)
data(OELECT1)

# test difference in mean:
randomizationTest(list(a=OELECT, b=OELECT1), 
                  R=500, calc=mean, 
                  fun=function(x) x[1]-x[2],
                  seed=123)

mistat documentation built on March 7, 2023, 6:43 p.m.