getDesignTwoWayANOVA {lrstat}R Documentation

Power and sample size for two-way ANOVA

Description

Obtains the power and sample size for two-way analysis of variance.

Usage

getDesignTwoWayANOVA(
  beta = NA_real_,
  n = NA_real_,
  nlevelsA = 2,
  nlevelsB = 2,
  means = NA_real_,
  stDev = 1,
  rounding = TRUE,
  alpha = 0.05
)

Arguments

beta

The type II error.

n

The total sample size.

nlevelsA

The number of groups for Factor A.

nlevelsB

The number of levels for Factor B.

means

The matrix of treatment means for Factors A and B combination.

stDev

The common standard deviation.

rounding

Whether to round up sample size. Defaults to 1 for sample size rounding.

alpha

The two-sided significance level. Defaults to 0.05.

Value

An S3 class designTwoWayANOVA object with the following components:

Author(s)

Kaifeng Lu, kaifenglu@gmail.com

Examples


(design1 <- getDesignTwoWayANOVA(
  beta = 0.1, nlevelsA = 2, nlevelsB = 2,
  means = matrix(c(0.5, 4.7, 0.4, 6.9), 2, 2, byrow = TRUE),
  stDev = 2, alpha = 0.05))


[Package lrstat version 0.2.9 Index]