Hi all, Does anybody know if it is possible to build a fractional factorial design in R? That is, suppose that we want do design an experiment with 3 factors with 2, 3 and 3 levels, respectivly. However we want to consider, let's say, only 6 from all possible level combinations. Does R design such experiment? Thanks in advance, Caio [[alternative HTML version deleted]]
alg-design will do the trick regards paul ----- Original Message ----- From: "Caio Azevedo" <cnaberdl at gmail.com> To: "R - discussion list" <r-help at stat.math.ethz.ch> Sent: Monday, April 28, 2008 11:11 PM Subject: [R] Fractional Factorial Design> Hi all, > > Does anybody know if it is possible to build a fractional factorial design > in R? That is, suppose that we want do design an experiment with 3 factors > with 2, 3 and 3 levels, respectivly. However we want to consider, let's > say, > only 6 from all possible level combinations. Does R design such > experiment? > > Thanks in advance, > > Caio > > [[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. >
alg-design doesn;t include fractional factorials; it includes optimal designs. The BHH2 does include fractional factorials for 2-level designs. conf.design is perhaps even better; conf.design generates specified confounded fractional factorials for multi-level designs provided that the number of levels is the same for all factors. I don't know a package that will mix level numbers, but in principle replicating suitably ordered 2-level and a 3-level designs and cbind-ing the two would generate such an experiment. incidentally, if you;re building your own designs, an essential tool is alias(), which will tell you if you have accidental confounding in terms of interest. S>>> "paulandpen" <paulandpen at optusnet.com.au> 28/04/2008 14:17:40 >>>alg-design will do the trick regards paul ----- Original Message ----- From: "Caio Azevedo" <cnaberdl at gmail.com> To: "R - discussion list" <r-help at stat.math.ethz.ch> Sent: Monday, April 28, 2008 11:11 PM Subject: [R] Fractional Factorial Design> Hi all, > > Does anybody know if it is possible to build a fractional factorialdesign> in R? That is, suppose that we want do design an experiment with 3factors> with 2, 3 and 3 levels, respectivly. However we want to consider,let's> say, > only 6 from all possible level combinations. Does R design such > experiment? > > Thanks in advance, > > Caio > > [[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. >______________________________________________ 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. ******************************************************************* This email and any attachments are confidential. Any use...{{dropped:8}}
Caio, using algdesign code below (this produces a full factorial 2*3*3 full design)> gen.factorial(c(2,3,3))X1 X2 X3 1 -1 -1 -1 2 1 -1 -1 3 -1 0 -1 4 1 0 -1 5 -1 1 -1 6 1 1 -1 7 -1 -1 0 8 1 -1 0 9 -1 0 0 10 1 0 0 11 -1 1 0 12 1 1 0 13 -1 -1 1 14 1 -1 1 15 -1 0 1 16 1 0 1 17 -1 1 1 18 1 1 1 using .......> optFederov(~.,dat,6)here is a design that is produced with six trials X1 X2 X3 3 1 -1 -1 4 -1 1 -1 13 -1 -1 1 15 1 -1 1 16 -1 1 1 18 1 1 1 This does the job with good efficiency. I would be interested to know what your objection to this is S Regards Paul ----- Original Message ----- From: "Caio Azevedo" <cnaberdl at gmail.com> To: "R - discussion list" <r-help at stat.math.ethz.ch> Sent: Monday, April 28, 2008 11:11 PM Subject: [R] Fractional Factorial Design> Hi all, > > Does anybody know if it is possible to build a fractional factorial design > in R? That is, suppose that we want do design an experiment with 3 factors > with 2, 3 and 3 levels, respectivly. However we want to consider, let's > say, > only 6 from all possible level combinations. Does R design such > experiment? > > Thanks in advance, > > > > [[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. >
Paul; You asked>using ....... > optFederov(~.,dat,6) >... does the job with good efficiency. > >I would be interested to know what your objection to this is SI have no issue with AlgDesign in principle, but the question was specifically about _fractional_ factorials, so I answered that. As to which is best - well, first pick your definition of 'best'. Both can improve drastically on full factorials. For me, he advantage of a fractional factorial is that it retains balance and, more importantly from a design perspective, I get to choose which effects are confounded and can arrange matters so that some effects are guaranteed unconfounded. The deterministic nature of the selection also makes it a bit easier to build power considerations into the process if you're so minded. The price of that is that the number of observations is typically larger than the smallest algorithmic design that might do a broadly similar job, though never as large as a full factorial. As I see it, the main advantage of algorithmic design is that you get to pick the size of the experiment. A second plus is that you can handle arbitrarily constrained designs much more easily, which is a feature I've sometimes found important. The disadvantage is that you may incur bias in some of the effect estimates, and because the selection process to fit an arbitrary experiment size typically involves some random selection from a candidate list, you don't necessarily get to choose which effects are biased. I guess you will also have a more interesting job deciding how many observations you need for a given power, if that's relevant. Steve E. ******************************************************************* This email and any attachments are confidential. Any use...{{dropped:8}}
Excellent points Steve, I am ever expanding my understanding in the area and power is an interesting one. I do a lot of choice modelling myself, and I am confounded (grin) by the optimal way to develop designs with conditional levels (deliberate confounds) etc. Thanks for that. Regards P ----- Original Message ----- From: "S Ellison" <S.Ellison at lgc.co.uk> To: "Caio Azevedo" <cnaberdl at gmail.com>; "paulandpen" <paulandpen at optusnet.com.au>; "R - discussion list" <r-help at stat.math.ethz.ch> Sent: Tuesday, April 29, 2008 1:48 AM Subject: Re: [R] Fractional Factorial Design> Paul; > > You asked >>using ....... >> optFederov(~.,dat,6) >>... does the job with good efficiency. >> >>I would be interested to know what your objection to this is S > > I have no issue with AlgDesign in principle, but the question was > specifically about _fractional_ factorials, so I answered that. > > As to which is best - well, first pick your definition of 'best'. Both > can improve drastically on full factorials. For me, he advantage of a > fractional factorial is that it retains balance and, more importantly > from a design perspective, I get to choose which effects are confounded > and can arrange matters so that some effects are guaranteed > unconfounded. The deterministic nature of the selection also makes it a > bit easier to build power considerations into the process if you're so > minded. The price of that is that the number of observations is > typically larger than the smallest algorithmic design that might do a > broadly similar job, though never as large as a full factorial. > As I see it, the main advantage of algorithmic design is that you get > to pick the size of the experiment. A second plus is that you can handle > arbitrarily constrained designs much more easily, which is a feature > I've sometimes found important. The disadvantage is that you may incur > bias in some of the effect estimates, and because the selection process > to fit an arbitrary experiment size typically involves some random > selection from a candidate list, you don't necessarily get to choose > which effects are biased. I guess you will also have a more interesting > job deciding how many observations you need for a given power, if that's > relevant. > > > Steve E. > > > ******************************************************************* > This email and any attachments are confidential. Any u...{{dropped:8}}