FrF2-package: Fractional Factorial designs with 2-level factors

Description Details Author(s) References See Also Examples

Description

creates regular and non-regular Fractional Factorial 2-level designs. Furthermore, analysis tools for Fractional Factorial designs with 2-level factors are offered (main effects and interaction plots for all factors simultaneously, cube plot for looking at the simultaneous effects of three factors, full or half normal plot, alias structure in a more readable format than with the built-in function alias).

The package works together with packages DoE.base and DoE.wrapper.

Details

The package is still subject to development; most key functionality is now included. Please contact me, if you have suggestions.

This package designs and analyses Fractional Factorial experiments with 2-level factors. Regular (function FrF2) and non-regular (function pb) 2-level fractional factorial designs can be generated. For regular fractional factorials, function FrF2 permits the specification of effects of interest, whose estimation is requested clear of aliasing with other effects. The function can furthermore generate regular fractional factorials as blocked or split-plot designs, and hard-to-change factors can be specified in order to keep the number of level changes low. Regular resolution V designs larger than those obtainable from function FrF2 can be created by function FrF2Large (these are not guaranteed to be optimal). Analysis facilities work for completely aliased designs only, i.e. e.g. not for analysing Plackett-Burman designs with interactions.

Functions fac.design, fractionate or oa.design from Chambers and Hastie (1993) have been used as role models e.g. for the option factor.names or for outputting a data frame with attributes. However, S compatibility has not been considered in devising this package. The original above-mentioned functions are not available in R; similar functions have been implemented in package DoE.base together with other general functionality for experimental designs.

In terms of analysis, package FrF2 works on linear models and enables convenient main effects and interaction plots (functions MEPlot and IAPlot) similar to those offered by Minitab software for all factors simultaneously, even though especially the interactions are often aliased, i.e. the model is typically singular. For the (less frequent) case of suspected three-factor-interactions, function cubePlot displays a cube with corners labeled with the (modeled) means of three factors simultaneously. Furthermore, the function DanielPlot from package BsMD has been modified to automatically label effects significant according to the Lenth-criterion, to automatically distinguish between whole-plot and split-plot effects for split-plot designs, and to provide more usage comfort to the analyst.
Finally, the function aliases determines the alias structure of a Fractional Factorial 2-level design in a format more suitable for human readers than the output from the built-in function alias.

Author(s)

Ulrike Groemping

Maintainer: Ulrike Groemping <groemping@bht-berlin.de>

References

Box G. E. P, Hunter, W. C. and Hunter, J. S. (2005) Statistics for Experimenters, 2nd edition. New York: Wiley.

Chambers, J.M. and Hastie, T.J. (1993). Statistical Models in S, Chapman and Hall, London.

Chen, J., Sun, D.X. and Wu, C.F.J. (1993) A catalogue of 2-level and 3-level orthogonal arrays. International Statistical Review 61, 131-145.

Daniel, C. (1959) Use of Half Normal Plots in Interpreting Two Level Experiments. Technometrics, 1, 311-340.

Groemping, U. (2014). R Package FrF2 for Creating and Analyzing Fractional Factorial 2-Level Designs. Journal of Statistical Software, 56, Issue 1, 1-56. http://www.jstatsoft.org/v56/i01/.

Hedayat, A.S., Sloane, N.J.A. and Stufken, J. (1999) Orthogonal Arrays: Theory and Applications, Springer, New York.

Lenth, R.V. (1989) Quick and easy analysis of unreplicated factorials. Technometrics, 31, 469-473.

Mee, R. (2009). A Comprehensive Guide to Factorial Two-Level Experimentation. New York: Springer.

Montgomery, D.C. (2001). Design and Analysis of Experiments (5th ed.). Wiley, New York.

Plackett, R.L.; Burman, J.P. (1946) The design of optimum multifactorial experiments. Biometrika 33, 305-325.

Ryan, K.J. and Bulutoglu, D.A. (2010). Minimum Aberration Fractional Factorial Designs With Large N. Technometrics 52, 250-255.

Sanchez, S.M. and Sanchez, P.J. (2005). Very Large Fractional Factorial and Central Composite Designs. ACM Transactions on Modeling and Computer Simulation 15, 362-377.

See Also

The key design generating functions: FrF2, pb, FrF2Large
S3 class design
Related packages: DoE.base, DoE.wrapper, BsMD;
Graphical analysis functions: MEPlot, IAPlot, cubePlot, DanielPlot
Analysis of alias structure for linear models of FrF2 designs: aliases

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
    ### for examples on design generation, cf. functions pb and FrF2
  
    ### Injection Molding Experiment. Box et al. 1978.
    data(BM93.e3.data, package="BsMD")  #from BsMD
    iMdat <- BM93.e3.data[1:16,2:10]  #only original experiment
    # make data more user-friendly
    colnames(iMdat) <- c("MoldTemp","Moisture","HoldPress","CavityThick","BoostPress",
             "CycleTime","GateSize","ScrewSpeed", "y")
    # linear model with all main effects and 2-factor interactions
    iM.lm <- lm(y ~ (.)^2, data = iMdat)
    # determine aliases
    aliases(iM.lm)
    # coded version
    aliases(iM.lm, code=TRUE)
    # normal plot of effects, default is autolabel with alpha=0.05
    DanielPlot(iM.lm)  
    DanielPlot(iM.lm,code=TRUE)
    DanielPlot(iM.lm,code=TRUE,alpha=0.5)
    # half normal plot of effects
    DanielPlot(iM.lm,code=TRUE,alpha=0.5,half=TRUE)
    # main effects plots
    MEPlot(iM.lm)
    # interaction plots
    IAPlot(iM.lm)
    # interaction plots with attention drawn to aliases
    aus <- IAPlot(iM.lm, show.alias=TRUE)
    # alias groups corresponding to interaction plots
    aliases(iM.lm)$aliases[9:15]
    # returned object
    aus
    # cube plot of three factors
    # (not very useful for this model, for demonstration only)
      ## per default, modeled means are shown
      ## this does not make a difference here, since the main effect of 
      ## ScrewSpeed is confounded with the MoldTemp:HoldPress:BoostPress
      ## interaction, so that the three-factor-interaction is indirectly included 
      ## in the modeled means
      cubePlot(iM.lm, "MoldTemp", "HoldPress", "BoostPress")
      ## modeled means without a three-factor interaction
      cubePlot(lm(y ~ (MoldTemp+HoldPress+BoostPress)^2, data = iMdat), 
         "MoldTemp", "HoldPress", "BoostPress")
      ## modeled=FALSE reverts to showing the apparent three-factor interaction
      cubePlot(lm(y ~ (MoldTemp+HoldPress+BoostPress)^2, data = iMdat), 
         "MoldTemp", "HoldPress", "BoostPress", modeled=FALSE)
      ## cubePlot also works on raw data
      cubePlot(iMdat$y, iMdat$MoldTemp, iMdat$HoldPress, iMdat$BoostPress)
    ## plotting functions also work directly on designs, 
    ## if these have been generated from functions FrF2 or pb:
      plan <- FrF2(16, 7)
      plan <- add.response(plan, rnorm(16))
      MEPlot(plan)
      IAPlot(plan)
      DanielPlot(plan)
      

Example output

Loading required package: DoE.base
Loading required package: grid
Loading required package: conf.design

Attaching package: 'DoE.base'

The following objects are masked from 'package:stats':

    aov, lm

The following object is masked from 'package:graphics':

    plot.design

The following object is masked from 'package:base':

    lengths

                                                                                       
 MoldTemp:Moisture = HoldPress:GateSize = CavityThick:ScrewSpeed = BoostPress:CycleTime
 MoldTemp:HoldPress = Moisture:GateSize = CavityThick:CycleTime = BoostPress:ScrewSpeed
 MoldTemp:CavityThick = Moisture:ScrewSpeed = HoldPress:CycleTime = BoostPress:GateSize
 MoldTemp:BoostPress = Moisture:CycleTime = HoldPress:ScrewSpeed = CavityThick:GateSize
 MoldTemp:CycleTime = Moisture:BoostPress = HoldPress:CavityThick = GateSize:ScrewSpeed
 MoldTemp:GateSize = Moisture:HoldPress = CavityThick:BoostPress = CycleTime:ScrewSpeed
 MoldTemp:ScrewSpeed = Moisture:CavityThick = HoldPress:BoostPress = CycleTime:GateSize
$legend
                                                                      
   A=MoldTemp    B=Moisture   C=HoldPress D=CavityThick  E=BoostPress 
                                          
  F=CycleTime    G=GateSize  H=ScrewSpeed 

$aliases
                      
 A:B = C:G = D:H = E:F
 A:C = B:G = D:F = E:H
 A:D = B:H = C:F = E:G
 A:E = B:F = C:H = D:G
 A:F = B:E = C:D = G:H
 A:G = B:C = D:E = F:H
 A:H = B:D = C:E = F:G

simulated critical values not available for all requests, used conservative ones
simulated critical values not available for all requests, used conservative ones
[[1]]
[1] "MoldTemp:Moisture"      "HoldPress:GateSize"     "CavityThick:ScrewSpeed"
[4] "BoostPress:CycleTime"  

[[2]]
[1] "MoldTemp:HoldPress"    "Moisture:GateSize"     "CavityThick:CycleTime"
[4] "BoostPress:ScrewSpeed"

[[3]]
[1] "MoldTemp:CavityThick" "Moisture:ScrewSpeed"  "HoldPress:CycleTime" 
[4] "BoostPress:GateSize" 

[[4]]
[1] "MoldTemp:BoostPress"  "Moisture:CycleTime"   "HoldPress:ScrewSpeed"
[4] "CavityThick:GateSize"

[[5]]
[1] "MoldTemp:CycleTime"    "Moisture:BoostPress"   "HoldPress:CavityThick"
[4] "GateSize:ScrewSpeed"  

[[6]]
[1] "MoldTemp:GateSize"      "Moisture:HoldPress"     "CavityThick:BoostPress"
[4] "CycleTime:ScrewSpeed"  

[[7]]
[1] "MoldTemp:ScrewSpeed"  "Moisture:CavityThick" "HoldPress:BoostPress"
[4] "CycleTime:GateSize"  

    MoldTemp:Moisture MoldTemp:HoldPress MoldTemp:CavityThick
-:-             19.85               17.8                20.05
+:-             19.75               16.2                19.75
-:+             20.35               22.4                20.15
+:+             19.05               22.6                19.05
    MoldTemp:BoostPress MoldTemp:CycleTime MoldTemp:GateSize
-:-                24.3               20.0              19.7
+:-                19.0               19.6              19.2
-:+                15.9               20.2              20.5
+:+                19.8               19.2              19.6
    MoldTemp:ScrewSpeed Moisture:HoldPress Moisture:CavityThick
-:-                19.2              16.95                19.65
+:-                19.1              17.05                20.15
-:+                21.0              22.65                19.95
+:+                19.7              22.35                19.25
    Moisture:BoostPress Moisture:CycleTime Moisture:GateSize
-:-               21.55              22.15             19.95
+:-               21.75              17.45             18.95
-:+               18.05              17.45             19.65
+:+               17.65              21.95             20.45
    Moisture:ScrewSpeed HoldPress:CavityThick HoldPress:BoostPress
-:-                19.0                  17.0                 18.6
+:-                19.3                  22.8                 24.7
-:+                20.6                  17.0                 15.4
+:+                20.1                  22.2                 20.3
    HoldPress:CycleTime HoldPress:GateSize HoldPress:ScrewSpeed
-:-               16.85               16.4                 18.7
+:-               22.75               22.5                 19.6
-:+               17.15               17.6                 15.3
+:+               22.25               22.5                 25.4
    CavityThick:BoostPress CavityThick:CycleTime CavityThick:GateSize
-:-                   21.7                  20.4                 21.9
+:-                   21.6                  19.2                 17.0
-:+                   18.1                  19.4                 17.9
+:+                   17.6                  20.0                 22.2
    CavityThick:ScrewSpeed BoostPress:CycleTime BoostPress:GateSize
-:-                   19.0                 21.4               21.15
+:-                   19.3                 18.2               17.75
-:+                   20.8                 21.9               22.15
+:+                   19.9                 17.5               17.95
    BoostPress:ScrewSpeed CycleTime:GateSize CycleTime:ScrewSpeed
-:-                  21.5               19.2                 19.1
+:-                  16.8               19.7                 19.2
-:+                  21.8               20.4                 20.5
+:+                  18.9               19.7                 20.2
    GateSize:ScrewSpeed
-:-                18.7
+:-                19.6
-:+                20.2
+:+                20.5
attr(,"aliasgroups")
attr(,"aliasgroups")[[1]]
[1] "MoldTemp"

attr(,"aliasgroups")[[2]]
[1] "Moisture"

attr(,"aliasgroups")[[3]]
[1] "HoldPress"

attr(,"aliasgroups")[[4]]
[1] "CavityThick"

attr(,"aliasgroups")[[5]]
[1] "BoostPress"

attr(,"aliasgroups")[[6]]
[1] "CycleTime"

attr(,"aliasgroups")[[7]]
[1] "GateSize"

attr(,"aliasgroups")[[8]]
[1] "ScrewSpeed"

attr(,"aliasgroups")[[9]]
[1] "MoldTemp:Moisture"      "HoldPress:GateSize"     "CavityThick:ScrewSpeed"
[4] "BoostPress:CycleTime"  

attr(,"aliasgroups")[[10]]
[1] "MoldTemp:HoldPress"    "Moisture:GateSize"     "CavityThick:CycleTime"
[4] "BoostPress:ScrewSpeed"

attr(,"aliasgroups")[[11]]
[1] "MoldTemp:CavityThick" "Moisture:ScrewSpeed"  "HoldPress:CycleTime" 
[4] "BoostPress:GateSize" 

attr(,"aliasgroups")[[12]]
[1] "MoldTemp:BoostPress"  "Moisture:CycleTime"   "HoldPress:ScrewSpeed"
[4] "CavityThick:GateSize"

attr(,"aliasgroups")[[13]]
[1] "MoldTemp:CycleTime"    "Moisture:BoostPress"   "HoldPress:CavityThick"
[4] "GateSize:ScrewSpeed"  

attr(,"aliasgroups")[[14]]
[1] "MoldTemp:GateSize"      "Moisture:HoldPress"     "CavityThick:BoostPress"
[4] "CycleTime:ScrewSpeed"  

attr(,"aliasgroups")[[15]]
[1] "MoldTemp:ScrewSpeed"  "Moisture:CavityThick" "HoldPress:BoostPress"
[4] "CycleTime:GateSize"  

sh: 1: cannot create /dev/null: Permission denied

FrF2 documentation built on July 2, 2020, 2:24 a.m.