Re: [R] BBH2 and FrF2 packages

From: Andrea Bernasconi DG <andrea.bernasconi.dg_at_gmail.com>
Date: Wed, 30 Jun 2010 10:52:28 +0200

Hi Dennis,

Thank you for your answer.

Are you sure that the following commands are working?

library(FrF2)
plan <- FrF2(8, 3, factor.names=c("T","C","K"), default.level=c("-","+"), randomize = FALSE) y <- c(60,72,54,68,52,83,45,80)
plan <- add.response(plan, y)
MEPlot(plan)
IAPlot(plan)

I get the following errors:

> library(FrF2)

Loading required package: BsMD
Loading required package: scatterplot3d
Loading required package: igraph
Loading required package: sfsmisc
Loading required package: DoE.base
Loading required package: relimp

Loading Tcl/Tk interface ... done
Loading required package: tcltk
Loading required package: vcd
Loading required package: MASS
Loading required package: grid
Loading required package: colorspace

Attaching package: 'DoE.base'

The following object(s) are masked from 'package:relimp':

    showData

The following object(s) are masked from 'package:stats':

    lm

The following object(s) are masked from 'package:graphics':

    plot.design

The following object(s) are masked from 'package:utils':

    fix

Attaching package: 'FrF2'

The following object(s) are masked from 'package:BsMD':

    DanielPlot

Warning message:
In fun(...) : no valid postscript previewer found; consider setting   options("eps_view"= "....") yourself
> plan <- FrF2(8, 3, factor.names=c("T","C","K"), default.level=c("-","+"), randomize = FALSE)
creating full factorial with 8 runs ...
> y <- c(60,72,54,68,52,83,45,80)
> plan <- add.response(plan, y)
> MEPlot(plan)

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

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

Only adding a fake factor to the plan the plot commands are working



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

Sincerely, Andrea B.

On 25 Jun, 2010, at 10:35 AM, Dennis Murphy wrote:

> Hi:
>
> MEPlot, IAPlot and cubePlot come from the FrF2 package; the DanielPlot function is in both package BsMD
> and FrF2. Try
>
> library(FrF2)
>
> and then run your code again; it worked for me...
>
> If you check the list of functions in BHH2 under HTML help, you'll find that none of the plot functions you used below are found in that package, but they are all found under FrF2.
>
> HTH,
> Dennis
>
> On Thu, Jun 24, 2010 at 4:17 PM, Andrea Bernasconi DG <andrea.bernasconi.dg_at_gmail.com> wrote:
> 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.
>

Mobile +41 79 621 74 07

        [[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 Wed 30 Jun 2010 - 08:55:00 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 Wed 30 Jun 2010 - 09:00:45 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