Learn R Programming

flipr (version 0.3.3)

one-sample-stats: Test Statistics for the One-Sample Problem

Description

This is a collection of functions that provide test statistics to be used into the permutation scheme for performing one-sample testing.

Usage

stat_max(data, flips, ...)

Value

A numeric value evaluating the desired test statistic.

Arguments

data

A list storing the sample from which the user wants to make inference.

flips

A numeric vectors of -1s and 1s to be used to randomly flip some data points around the center of symmetric of the distribution of the sample.

...

Extra parameters specific to some statistics.

Examples

Run this code
n <- 10
x <- as.list(rnorm(n))
flips <- sample(c(-1, 1), n, replace = TRUE)
stat_max(x, flips)

Run the code above in your browser using DataLab