perm.var.test: Permutation F test to compare two variances

View source: R/perm.var.test.R

perm.var.testR Documentation

Permutation F test to compare two variances

Description

Performs a permutation F test to compare two variances.

Usage


perm.var.test(x, ...)

## Default S3 method:
perm.var.test(x, y, ...)

## S3 method for class 'formula'
perm.var.test(formula, data, alternative = c("two.sided", "less",
  "greater"), nperm = 999, progress = TRUE, ...)

Arguments

x

a numeric vector of data values.

y

a numeric vector of data values.

formula

a formula of the form a ~ b where a gives the data values and b a factor with 2 levels giving the corresponding groups.

data

an optional data frame containing the variables in the formula formula. By default the variables are taken from environment(formula).

alternative

a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less".

nperm

number of permutations.

progress

logical indicating if the progress bar should be displayed.

...

further arguments to be passed to or from other methods.

Details

The function deals with the limitted floating point precision, which can bias calculation of p-values based on a discrete test statistic distribution.

Value

method

name of the test.

statistic

test statistics of the parametric test.

permutations

number of permutations.

p.value

p-value of the permutation test.

estimate

the ratio of the two variances.

alternative

a character string describing the alternative hypothesis.

data.name

a character string giving the name(s) of the data.

null.value

the ratio of population variances under the null hypothesis, always 1.

Author(s)

Maxime HERVE <maxime.herve@univ-rennes1.fr>

See Also

var.test

Examples

response <- c(rpois(8,1),rpois(8,3))
fact <- gl(2,8,labels=LETTERS[1:2])
perm.var.test(response~fact)

RVAideMemoire documentation built on Nov. 6, 2023, 5:07 p.m.