Learn R Programming

CarletonStats (version 2.2)

anovaSummarized: Anova F test

Description

ANOVA F test when given summarized data (sample sizes, means and standard deviations).

Usage

anovaSummarized(N, mn, stdev)

Value

Returns invisibly a list

Treatment SS

The treatment sum of squares (also called the "between sum of squares").

Residual SS

Residual sum of squares (also called the "within sum of squares").

Degrees of Freedom

a vector with the numerator and denominator degrees of freedom.

Treatment Mean Square

Treatment SS/numerator DF

Residual Mean Square

Residual SS/denominator DF

Residual Standard Error

Square root of Residual Mean Square

F

the F statistic

P-value

p-value

...

Arguments

N

a vector with the sample sizes

mn

a vector of means, one for each group in the sample

stdev

a vector of standard deviations, one for each group in the sample

Author

Laura Chihara

Details

Perform an ANOVA F test when presented with summarized data: sample sizes, sample means and sample standard devations.

Examples

Run this code

#use the data set chickwts from base R
head(chickwts)

N <- table(chickwts$feed)
stdev <- tapply(chickwts$weight, chickwts$feed, sd)
mn <- tapply(chickwts$weight, chickwts$feed, mean)

anovaSummarized(N, mn, stdev)

Run the code above in your browser using DataLab