Package 'DOE' for the Statistical Design of Experiments in by fad10689

VIEWS: 12 PAGES: 16

									Package 'DOE' for
the Statistical Design
of Experiments in R
Petr Šimeček
Institute of Animal Science
Overview
           DoE methods currently
           available in R

           What we are missing

           …and how we (will)
           implement it
Overview
       DoE methods currently
       available in R

       What we are missing

       …and how we (will)
       implement it
Already included in R
 Power / Sample size: t-test, ANOVA,
  proportional test
 Optimal Designs (D,A, and I criteria) –
  AlgDesign
 Confounded designs – conf.design
 Special situations (QTL experiments,
  industry designs…
Already included in R
 Power / Sample size: t-test, ANOVA,
  proportional test
 Optimal Designs (D,A, and I criteria) –
  AlgDesign
 Confounded designs – conf.design
 Special situations (QTL experiments,
  industry designs…)
Already included in R
 Power / Sample size: t-test, ANOVA,
  proportional test
 Optimal Designs (D,A, and I criteria) –
  AlgDesign
 Confounded designs – conf.design
 Special situations (QTL experiments,
  industry designs…)
Overview
       DoE methods currently
       available in R

       What we are missing

       …and how we (will)
       implement it
Example – Sheep Diary

              255 sheep

              Interest in differences
              between machine
              and hand milking

              SDs differ
Example – Sheep Diary (2)
 CHANGE OF TEMPERATURE

 automatic milking: -0.075 (s.d. = 0.205)

 hand milking: -0,050 (s.d. = 0,572)


 ? min. SS of Welsch T-test (N,255-N)
Example – Sheep Diary (3)
 SOLUTION = SIMULATE THE POWER

 sim<-function(N)
  t.test(
   rnorm(N,sd=0,572,mean=-0,050),
   rnorm(255-N,mean=-0.075,sd=0,572)
  )$p.val

 x<-replicate(100000,sim(N))
 sum(x<0.05)/100000
                                                                                   Example – Sheep Diary (4)
                                                                                                     Teplota struku pred a po dojeni, v.1                                                                                                                       Teplota struku pred a po dojeni, v.2




                                                                                                                                                                                                                0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
                                                 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0




                                                                                                                                                               Sila = pravdepodobnost signifikantniho rozdilu
Sila = pravdepodobnost signifikantniho rozdilu




                                                                                                  0 2 4 6 8          12     16    20     24     28    32                                                                                                      0 2 4 6 8    12   16    20   24   28     32

                                                                                               n1 = pocet rucne dojenych ovci, n2=255-n1, rozdil prum. = 0.7                                                                           n1 = pocet rucne dojenych ovci, n2=255-n1, rozdil prum. = 0.525
BIBD
 BALANCED INCOMPLETE BLOCK
 DESIGN

v = number of treatments
k = number of treatments per block
b = number of blocks


   In DOE package this is included in ss.t.test function.
BIBD (2)

 E.g. v = 9, k = 3 and b = 12

          (1,2,3)       (1,4,7 ) (1,5,9) (1,6,8) 
                                                     
          [ 4,5,6]      ( 2,5,8) ( 2,6,7 ) ( 3,5,7 ) 
          ( 7,8,9 )     ( 3,6,9) ( 3,4,8) ( 2,4,9) 
                                                     



  See DOE project on R-FORGE
And many, many more...
   Power analysis and minimal sample size
       ANOVA
       ANOVA with random effects
       Proportional tests
       Survival statistics
       etc.
   Optimal regression designs
   Fractional factorial and weighted designs
   Designs for sequential tests
   Special designs (spatial statistics,microarrays...)
Overview
       DoE methods currently
       available in R

       What we are missing

       …and how we (will)
       implement it
The book

								
To top