powered by
Performs a permutation F test to compare two variances.
perm.var.test(x, ...)# S3 method for default perm.var.test(x, y, ...)# S3 method for formula perm.var.test(formula, data, alternative = c("two.sided", "less", "greater"), nperm = 999, progress = TRUE, ...)
# S3 method for default perm.var.test(x, y, ...)
# S3 method for formula perm.var.test(formula, data, alternative = c("two.sided", "less", "greater"), nperm = 999, progress = TRUE, ...)
name of the test.
test statistics of the parametric test.
number of permutations.
p-value of the permutation test.
the ratio of the two variances.
a character string describing the alternative hypothesis.
a character string giving the name(s) of the data.
the ratio of population variances under the null hypothesis, always 1.
a numeric vector of data values.
a formula of the form a ~ b where a gives the data values and b a factor with 2 levels giving the corresponding groups.
a ~ b
a
b
an optional data frame containing the variables in the formula formula. By default the variables are taken from environment(formula).
formula
environment(formula)
a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less".
"two.sided"
"greater"
"less"
logical indicating if the progress bar should be displayed.
further arguments to be passed to or from other methods.
Maxime HERVE <maxime.herve@univ-rennes1.fr>
The function deals with the limitted floating point precision, which can bias calculation of p-values based on a discrete test statistic distribution.
var.test
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