Learn R Programming

RVAideMemoire (version 0.9-35)

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

Description

Perform a permutational F test to compare two variances.

Usage

perm.var.test(formula, data, ratio = 1, alternative = c("two.sided", "less",
  "greater"), nperm = 999)

Arguments

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).
ratio
the hypothesized ratio of the two population variances.
alternative
a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less".
nperm
number of permutations.

Value

  • methodname of the test.
  • statistictest statistics of the parametric test.
  • permutationsnumber of permutations.
  • p.valuep-value of the permutational test.
  • estimatethe ratio of the two variances.
  • alternativea character string describing the alternative hypothesis.
  • data.namea character string giving the name(s) of the data.
  • null.valuethe ratio of population variances under the null hypothesis.

See Also

var.test

Examples

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

Run the code above in your browser using DataLab