[R] BBH2 and FrF2 packages

From: Andrea Bernasconi DG <andrea.bernasconi.dg_at_gmail.com>
Date: Fri, 25 Jun 2010 01:17:27 +0200


Hi R HELP,

I consider the 2^3 factorial experiment described at page 177 of the book Statistics for Experimenters: Design, Innovation, and Discovery by George E. P. Box, J. Stuart Hunter, William G. Hunter (BHH2).

This example use the following data in file BHH2-Data/tab0502.dat at ftp://ftp.wiley.com/
in /sci_tech_med/statistics_experimenters/BHH2-Data.zip

  run T C K y

1   1 -1 -1 -1 60
2   2  1 -1 -1 72
3   3 -1  1 -1 54
4   4  1  1 -1 68

5 5 -1 -1 1 52
6 6 1 -1 1 83
7 7 -1 1 1 45
8 8 1 1 1 80

Using these data and the R BHH2 package, I was not able to reproduce the very simple results in the BHH2 book. In particular, the following solution will have no meaning since K is categorical:

( plan <- lm(y ~ (T+C+K)^2, data = DATA) )
MEPlot(plan) # Main Effects
IAPlot(plan) # Interactions Effects
DanielPlot(plan)
cubePlot(plan, "T", "C", "K")

I decided to rebuilt the data using:

plan <- FrF2(8, 3, factor.names=c("T","C","K"), default.level=c("-","+"), randomize = FALSE)
( plan <- add.response(plan, y) )

giving:

  T C K y

1 - - - 60
2 + - - 72
3 - + - 54
4 + + - 68
5 - - + 52
6 + - + 83

7 - + + 45
8 + + + 80
class=design, type= full factorial

Unfortunately the following plot commands do not work:

MEPlot(plan)
IAPlot(plan)
DanielPlot(plan)

The error is:
Error in MEPlot.design(plan) :
  The design obj must be of a type containing FrF2 or pb.

Why?

If I add a fake factor to the plan the plot commands work, but the solution will have no meaning:

plan <- FrF2(8, 4, factor.names=c("T","C","K","Q"), default.level=c("-","+"), randomize = FALSE)
( plan <- add.response(plan, y) )

MEPlot(plan)
IAPlot(plan)
DanielPlot(plan)

Sincerely, Andrea B.

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 24 Jun 2010 - 23:24:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 25 Jun 2010 - 09:00:35 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive