Last data update: 2014.03.03

R: Analysis of Variance F statistic
anovaFR Documentation

Analysis of Variance F statistic

Description

Calculates the analysis of variance F statistic.

Usage

anovaF(y, w, calcOptions = NULL)

Arguments

y

a vector or matrix of outcomes.

w

a vector or matrix of assignments.

calcOptions

a list of options for calculating the analysis of variance (ANOVA) F statistic (if necessary). calcOptions$block can denote a block variable to be accounted for. calcOptions$row and calcOptions$col can denote rows and columns to be accounted for in a Latin square design.

Details

Returns the F statistic calculated in an analysis of variance of a linear model with no interaction terms.

Value

An analysis of variance F statistic.

Author(s)

Joseph J. Lee and Tirthankar Dasgupta

Examples

## 1 treatment factor with 3 levels
## Assignments and outcomes
w = c(1,1,1,1,2,2,2,2,3,3,3,3)
y = c(4,6,5,7,4,7,11,9,8,12,9,9)
anovaF(y, w)

## 1 treatment factor with 3 levels, with block
## Assignments, blocks, and outcomes
w = c(1,1,1,1,2,2,2,2,3,3,3,3)
x = c(1,1,2,2,1,1,2,2,1,1,2,2)
y = c(4,6,5,7,4,7,11,9,8,12,9,9)
anovaF(y, w, calcOptions = list(block = x))

Results