Learn R Programming

permutest (version 1.0.0)

two_sample: Two-sample permutation test

Description

This function runs a permutation test with difference in means test statistic for the two-sample problem by calling the permutation_test function.

Usage

two_sample(x, y, shift = 0, alternative = "greater", reps = 10^4, seed = NULL)

Value

The permutation test p-value

Arguments

x

array of data for treatment group

y

array of data for control group

shift

Value of shift to apply in two-sample problem

alternative

String, two-sided or one-sided (greater or less) p-value; options are 'greater', 'less', or 'two-sided'

reps

Number of iterations to use when calculating permutation p-value

seed

An integer seed value

Examples

Run this code
two_sample(x = c(10, 9, 11), y = c(12, 11, 13), alternative = "less", seed = 42)

Run the code above in your browser using DataLab