15  Completely randomised design

đź“– Status of the book

Hi there! This book is a work-in-progress. You may like to come back later when it’s closer to a complete state. If you would like to raise issues or leave feedback, please feel to do this:

A completely randomised design, commonly abbreviated as CRD, contain two factors: experimental units and treatments with a completely unstructured experiment (i.e. no grouping for the factors). CRD is sufficiently characterised by the number of units, \(n\), and the number of treatment, \(t\). Instead of \(n\), you ccan parameterise the design with the number of replications, \(r\); in which case, you can derive \(n = rt\). The later parameterisation means that the design will be balanced while the former does not guarantee that the design is balanced.

You can call on menu_crd() to see the code in the terms of the fundamental system. If you omit the argument values, then a random parameterisation will be selected for you. You can find more details about the design in the documentation (?menu_crd).

menu_crd()
design("Completely Randomised Design") %>%
  set_units(unit = 23) %>%
  set_trts(trt = 10) %>%
  allot_trts(trt ~ unit) %>%
  assign_trts("random", seed = 679) %>%
  serve_table()

If you want to generate the design table, then you can use the takeout() function parsing the named design object created by the set of menu_ functions. If you don’t select any menu then the takeout() function will automatically select a random menu for you. You can find the list of available named experimental designs by calling on scan_menu(). For now, let’s “takeout” the completely randomised design with 5 treatments and 30 experimental units.

crd <- takeout(menu_crd(t = 5, n = 30, seed = 1), )
crd
design("Completely Randomised Design") %>%
  set_units(unit = 30) %>%
  set_trts(trt = 5) %>%
  allot_trts(trt ~ unit) %>%
  assign_trts("random", seed = 1) %>%
  serve_table() 

# Completely Randomised Design 
# An edibble: 30 x 2
      unit    trt
 * <U(30)> <T(5)>
     <chr>  <chr>
 1  unit01   trt5
 2  unit02   trt3
 3  unit03   trt1
 4  unit04   trt5
 5  unit05   trt3
 6  unit06   trt5
 7  unit07   trt1
 8  unit08   trt1
 9  unit09   trt2
10  unit10   trt2
# â„ą 20 more rows

A design table generated by takeout() is an object with a special class of edbl_table. When you print a takeout object, a table will be displayed like a typical edbl_table object but the recipe code will also be displayed prior to the table.

You can quickly plot the design using the autoplot() in the deggust package.

autoplot(crd)