Size.2levFr {BDEsize} | R Documentation |
Sample Size Calculator for Two-level Fractional Factorial Design
Description
This function computes sample size for two-level fractional factorial design to detect a certain standardized effect size with power at the significance level. The model for fractional factorial design contains only main effects in resolution III and IV.
Usage
Size.2levFr(nfactor, nfraction, interaction = FALSE, delta_type = 1,
delta = c(1, 0, 1), alpha = 0.05, beta = 0.2, maxsize = 1000)
Arguments
nfactor |
the number of factor. |
nfraction |
the number of fraction. For example, when a model is |
interaction |
specifies whether two-way interaction effects are included in a model with the main effects. When |
delta_type |
specifies the type of standardized effect size: 1 for standard deviation type and 2 for range type. |
delta |
vector of effect sizes: |
alpha |
Type I error. |
beta |
Type II error. |
maxsize |
tolerance for sample size. |
Details
This function computes sample size in two-level fractional factorial design to detect a certain standardized effect size delta
with power 1-beta
at the significance level alpha
.
Value
model |
a character vector expressing a model. The main effects are expressed by the upper-case letters of the Roman alphabet, and two-way interaction effects are denoted by * operator for pairs of the main effects. |
n |
optimal sample size. |
Delta |
a vector of minimal detectable standardized effect sizes. |
References
R. V. Lenth (2006-9). Java Applets for Power and Sample Size[Computer software]. Retrieved March 27, 2018 from https://homepage.divms.uiowa.edu/~rlenth/Power/.
Y. B. Lim (1998). Study on the Size of Minimal Standardized Detectable Difference in Balanced Design of Experiments. Journal of the Korean society for Quality Management, 26(4), 239–249.
M. A. Kastenbaum, D. G. Hoel and K. O. Bowman (1970) Sample size requirements : one-way analysis of variance, Biometrika, 57(2), 421–430.
D. C. Montgomery (2013) Design and analysis of experiments. John Wiley & Sons.
See Also
Size.Full
, Size.Split
, Size.Block
.
Examples
# only main effects
model1 <- Size.2levFr(nfactor=3, nfraction=1, interaction=FALSE,
delta_type=1, delta=c(1, 0, 1), alpha=0.05, beta=0.2)
model1$model
model1$n
model1$Delta
# including two-way interaction effects
model2 <- Size.2levFr(nfactor=5, nfraction=1, interaction=TRUE,
delta_type=1, delta=c(1, 1, 1), alpha=0.05, beta=0.2)