Learn R Programming

permutest (version 1.0.0)

one_sample: One-sample permutation test

Description

This function runs a permutation test for the one-sample problem by calling the permutation_test function using the one-sample mean test statistic.

Usage

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

Value

The permutation test p-value

Arguments

x

array of data

shift

Value of shift to apply in one-sample problem

alternative

String, two-sided or one-sided (greater or less) p-value

reps

Number of iterations to use when calculating permutation p-value

seed

An integer seed value

Examples

Run this code
one_sample(x = c(-1, 1, 2), seed = 42)

Run the code above in your browser using DataLab