fvar {matrixTests}R Documentation

F Variance test

Description

Performs the F test of equality of variances for two normal populations on each row/column of the two input matrices.

Usage

row_f_var(x, y, null = 1, alternative = "two.sided", conf.level = 0.95)

col_f_var(x, y, null = 1, alternative = "two.sided", conf.level = 0.95)

Arguments

x

numeric matrix.

y

numeric matrix for the second group of observations.

null

- hypothesized 'x' and 'y' variance ratio. A single number or numeric vector with values for each observation.

alternative

alternative hypothesis to use for each row/column of x. A single string or a vector with values for each observation. Values must be one of "two.sided" (default), "greater" or "less".

conf.level

confidence levels used for the confidence intervals. A single number or a numeric vector with values for each observation. All values must be in the range of [0:1] or NA.

Details

NA values are always ommited.

row_f_var(x, y) - F-test for variance on rows. col_f_var(x, y) - F-test for variance on columns.

Results should be the same as as running var.test(x, y) on every row (or column) of x and y.

Value

a data.frame where each row contains the results of the F variance test performed on the corresponding row/column of x and y.

Each row contains the following information (in order):
1. obs.x - number of x observations
2. obs.y - number of y observations
3. obs.tot - total number of observations
4. var.x - variance of x
5. var.y - variance of y
6. var.ratio - x/y variance ratio
7. df.num - numerator degrees of freedom
8. df.denom - denominator degrees of freedom
9. statistic - F statistic
10 pvalue - p-value
11. conf.low - lower bound of the confidence interval
12. conf.high - higher bound of the confidence interval
13. ratio.null - variance ratio of the null hypothesis
14. alternative - chosen alternative hypothesis
15. conf.level - chosen confidence level

Note

For a marked increase in computation speed turn off the calculation of confidence interval by setting conf.level to NA.

Author(s)

Karolis Koncevičius

See Also

var.test()

Examples

X <- iris[iris$Species=="setosa",1:4]
Y <- iris[iris$Species=="virginica",1:4]
col_f_var(X, Y)


[Package matrixTests version 0.2.3 Index]