oneway: Oneway ANOVA

onewayR Documentation

Oneway ANOVA

Description

Performs an analysis of variance tests on each row/column of the input matrix.

Usage

row_oneway_equalvar(x, g)

col_oneway_equalvar(x, g)

row_oneway_welch(x, g)

col_oneway_welch(x, g)

Arguments

x

numeric matrix.

g

a vector specifying group membership for each observation of x.

Details

Functions to perform ONEWAY ANOVA analysis for rows/columns of matrices.

row_oneway_equalvar(x, g) - oneway ANOVA on rows. col_oneway_equalvar(x, g) - oneway ANOVA on columns.

Results should be the same as running aov(x ~ g) on every row (or column) of x

row_oneway_welch(x, g) - oneway ANOVA with Welch correction on rows. col_oneway_welch(x, g) - oneway ANOVA with Welch correction on columns.

Results should be the same as running oneway.test(x, g, var.equal=FALSE) on every row (or column) of x

Value

a data.frame where each row contains the results of an oneway anova test performed on the corresponding row/column of x. The columns will vary depending on the type of test performed.

They will contain a subset of the following information:
1. obs.tot - total number of observations
2. obs.groups - number of groups
3. sumsq.between - between group (treatment) sum of squares
4. sumsq.within - within group (residual) sum of squares
5. meansq.between - between group mean squares
6. meansq.within - within group mean squares
7. df.between - between group (treatment) degrees of freedom
8. df.within - within group (residual) degrees of freedom
9. statistic - F statistic
10. pvalue - p.value

Author(s)

Karolis Koncevičius

See Also

aov(), oneway.test()

Examples

col_oneway_welch(iris[,1:4], iris$Species)
row_oneway_equalvar(t(iris[,1:4]), iris$Species)


karoliskoncevicius/matrixTests documentation built on Oct. 18, 2023, 5:50 a.m.