permutation_test: Permutation t-test for inference

Description Usage Arguments Value See Also

Description

This function computes the t-test on the inputs R times and samples the pooled data (i.e. x and y together) without replacement. The function calculates the p-value by

Usage

1
permutation_test(x, y, R, use_sample = TRUE, ...)

Arguments

x

a numeric vector

y

a numeric vector

R

number of resamples. Must be between 99 and 999.

use_sample

logical. Use the sample() function? If FALSE, this function will use the runif() function to draw random samples.

...

optional (named) parameters

  • alternative: a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less". You can specify just the initial letter. See ?t.test() for more information

  • var.equal: a logical variable indicating whether to treat the two variances as being equal. If TRUE then the pooled variance is used to estimate the variance otherwise the Welch (or Satterthwaite) approximation to the degrees of freedom is used. See ?t.test() for more information.

  • tolerance: defines the error tolerance bounds around the proportion of indices. Smaller tolerance means smaller bounds and more resampling to get the 'right' proportion

Value

List containing

See Also

Rizzo, Maria L. "Statistical Computing with R". Chapman and Hall/CRC, 2007. pp. 183-188


JasperHG90/meerkat documentation built on May 31, 2019, 5:39 a.m.