Learn R Programming

mistat (version 0.999)

randomizationTest: 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"

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

Run this code
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)

Run the code above in your browser using DataLab