Learn R Programming

easypower (version 1.0.2)

n.oneway: Calculates the required sample size for a one-way ANOVA.

Description

Calculates the required sample size for a one-way ANOVA.

Usage

n.oneway(iv = iv, sig.level = 0.05, power = 0.8)

Value

Returns the recommended sample size given the conditions to achieve the desired power.

Arguments

iv

List of data for the treatment to be tested.

sig.level

Desired significance level (default is 0.05).

power

Desired level of power (default is 0.80).

References

Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). Hillsdale, N.J.: Lawrence Erlbaum Associates.

Examples

Run this code
# Exercise 8.10, p.391 from Cohen (1988)
main.eff <- list(name = "Teaching", levels = 4, eta.sq = 0.0588)
# Running the function with default settings
n.oneway(iv = main.eff)

Run the code above in your browser using DataLab