Fpower: Power function for F tests involving one-way and two-way...

View source: R/biblioteca.R

FpowerR Documentation

Power function for F tests involving one-way and two-way ANOVA

Description

Implementation of the power function for F tests involving one-way and two-way ANOVA using the conservative method based on a single specified difference between any two treatment means, and an standard deviation of the experimental error. The Fpower function has been adapted from the Fpower1 and Fpower2 functions provided in the package daewr.

Usage

Fpower(alpha = 0.05, nlev = NULL, nreps = NULL, Delta = NULL, sigma = NULL)

Arguments

alpha

the significance level of the test (default value is alpha = 0.05).

nlev

vector containing the number of levels of the factors.

nreps

the number of replicates in each combination of factor levels.

Delta

the size of a practical difference in two means.

sigma

the standard deviation of the experimental error.

Value

a data.frame containing the sample size (nreps), the total number of runs of the experiment (ntotal), the residual's degrees of freedom (df2), and the calculated power associated with the effects in the design.

Examples

# one-way ANOVA:
Fpower(alpha=.05, nlev=3, nreps=2:10, Delta=40, sigma=25)

# two-way ANOVA:
Fpower(alpha=.05, nlev=c(3, 3), nreps=2:10, Delta=40, sigma=25)

# tree-way ANOVA:
Fpower(alpha=.05, nlev=c(3, 3, 3), nreps=2:10, Delta=40, sigma=25)


fndemarqui/planex documentation built on July 9, 2024, 2:13 a.m.