title: How to calculate main effects of factors in R with DOE.base and/or FrF2 packages?
body: <p>New to DoE. For the following $2^3$ factorial design coded with <code>DoE.base</code> package in R:</p>
  
  <pre><code>### Create a 2^3 factorial design
  plasma.2kdesign &lt;- 
    fac.design(nfactors = 3, replications = 2, randomize = FALSE, 
               factor.names = list(A = c(-1, 1), B = c(-1, 1), C = c(-1, 1)))
  
  etch &lt;- c(550, 669, 633, 642, 1037, 749, 1075, 729, 
            604, 650, 601, 635, 1052, 868, 1063, 860)
  
  plasma.2kdesign &lt;- add.response(design = plasma.2kdesign, response = etch)
  </code></pre>
  
  <p>ANOVA, regression, and main effects &amp; interactions plots are possible by the following code with <code>DoE.base</code> and <code>FrF2</code> packages:</p>
  
  <pre><code>### ANOVA
  plasma.aov &lt;- aov(etch ~ A * B * C, data = plasma.2kdesign)
  summary(plasma.aov)
  
  ### Plot main effects and interactions
  MEPlot(plasma.2kdesign)
  IAPlot(plasma.2kdesign)
  
  ### Regression
  plasma.lm &lt;- lm(etch ~ A * B * C, data = plasma.2kdesign)
  summary(plasma.lm)
  </code></pre>
  
  <p><strong>How do I calculate the main effects of $A, B, C, AB, AC, BC, ABC$ with functions in <code>DoE.base</code> and/or <code>FrF2</code> packages?</strong> Thanks!</p>