fvar | R Documentation |
Performs the F test of equality of variances for two normal populations on each row/column of the two input matrices.
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)
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. |
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
.
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
For a marked increase in computation speed turn off the calculation of
confidence interval by setting conf.level
to NA.
Karolis Koncevičius
var.test()
X <- iris[iris$Species=="setosa",1:4]
Y <- iris[iris$Species=="virginica",1:4]
col_f_var(X, Y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.