These slides are viewed best by Chrome or Firefox and occasionally need to be refreshed if elements did not load properly. See here for the PDF .
Press the right arrow to progress to the next slide!
Presenter: Emi Tanaka
Department of Econometrics and Business Statistics,
Monash University, Melbourne, Australia
emi.tanaka@monash.edu
23 Jan 2021 @ TokyoR
Grammar of Experimental Design
実験計画法の「文法」
「文法」とはどういう意味なのでしょうか?
1 Grammar of Graphics グラフィクスの文法
2 Grammar of Data Manipulation データ操作の文法
3 Grammar of Experimental Design 実験計画法の文法
Wickham (2016) ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York
Wilkinson (2005) The Grammar of Graphics. Statistics and Computing. Springer, 2nd edition.
まずはデーターから
👩🏻🏫
一般的なオーストラリアの大学で働いてる学者は時間を以下のように分けるよう期待されています:
df
## duty perc## 1 Teaching 40## 2 Research 40## 3 Other 20
tibble::as_tibble(df)
## # A tibble: 3 x 2## duty perc## <chr> <dbl>## 1 Teaching 40## 2 Research 40## 3 Other 20
barplot(as.matrix(df$perc), legend = df$duty)
pie(df$perc, labels = df$duty)
R Core Team (2020) R: A Language and Environment for Statistical Computing https://www.R-project.org/
df
## duty perc## 1 Teaching 40## 2 Research 40## 3 Other 20
tibble::as_tibble(df)
## # A tibble: 3 x 2## duty perc## <chr> <dbl>## 1 Teaching 40## 2 Research 40## 3 Other 20
barplot(as.matrix(df$perc), legend = df$duty)
pie(df$perc, labels = df$duty)
R Core Team (2020) R: A Language and Environment for Statistical Computing https://www.R-project.org/
Single purpose functions to generate "named plots"
ggplot2
df
## duty perc## 1 Teaching 40## 2 Research 40## 3 Other 20
tibble::as_tibble(df)
## # A tibble: 3 x 2## duty perc## <chr> <dbl>## 1 Teaching 40## 2 Research 40## 3 Other 20
ggplot(df, aes(x = "", # dummy y = perc, fill = duty)) + geom_col()
ggplot2
df
## duty perc## 1 Teaching 40## 2 Research 40## 3 Other 20
tibble::as_tibble(df)
## # A tibble: 3 x 2## duty perc## <chr> <dbl>## 1 Teaching 40## 2 Research 40## 3 Other 20
ggplot(df, aes(x = "", # dummy y = perc, fill = duty)) + geom_col()
ggplot(df, aes(x = "", # dummy y = perc, fill = duty)) + geom_col() + coord_polar(theta = "y")
ggplot2
df
## duty perc## 1 Teaching 40## 2 Research 40## 3 Other 20
tibble::as_tibble(df)
## # A tibble: 3 x 2## duty perc## <chr> <dbl>## 1 Teaching 40## 2 Research 40## 3 Other 20
ggplot(df, aes(x = "", # dummy y = perc, fill = duty)) + geom_col()
ggplot(df, aes(x = "", # dummy y = perc, fill = duty)) + geom_col() + coord_polar(theta = "y")
stacked barplotとpie chartの違いはcoordinate systemがCartesian coordinateからpolar coordinateと変わった
data(cochran.crd, package = "agridat")cochran.crd
## inf trt row col## 1 9 F3 4 1## 2 12 O 4 2## 3 18 S6 4 3## 4 10 F12 4 4## 5 24 S6 4 5## 6 17 S12 4 6## 7 30 S3 4 7## 8 16 F6 4 8## 9 10 O 3 1## 10 7 S3 3 2## 11 4 F12 3 3## 12 10 F6 3 4## 13 21 S3 3 5## 14 24 O 3 6## 15 29 O 3 7## 16 12 S6 3 8## 17 9 F3 2 1## 18 7 S12 2 2## 19 18 F6 2 3## 20 30 O 2 4## 21 18 F6 2 5## 22 16 S12 2 6## 23 16 F3 2 7## 24 4 F12 2 8## 25 9 S3 1 1## 26 18 O 1 2## 27 17 S12 1 3## 28 19 S6 1 4## 29 32 O 1 5## 30 5 F12 1 6## 31 26 O 1 7## 32 4 F3 1 8
Kevin Wright (2020). agridat: Agricultural Datasets. R
package version 1.17.
W.G. Cochran and G. Cox, 1957. Experimental Designs, 2nd ed. John Wiley, New York.
data(cochran.crd, package = "agridat")cochran.crd
## inf trt row col## 1 9 F3 4 1## 2 12 O 4 2## 3 18 S6 4 3## 4 10 F12 4 4## 5 24 S6 4 5## 6 17 S12 4 6## 7 30 S3 4 7## 8 16 F6 4 8## 9 10 O 3 1## 10 7 S3 3 2## 11 4 F12 3 3## 12 10 F6 3 4## 13 21 S3 3 5## 14 24 O 3 6## 15 29 O 3 7## 16 12 S6 3 8## 17 9 F3 2 1## 18 7 S12 2 2## 19 18 F6 2 3## 20 30 O 2 4## 21 18 F6 2 5## 22 16 S12 2 6## 23 16 F3 2 7## 24 4 F12 2 8## 25 9 S3 1 1## 26 18 O 1 2## 27 17 S12 1 3## 28 19 S6 1 4## 29 32 O 1 5## 30 5 F12 1 6## 31 26 O 1 7## 32 4 F3 1 8
ggplot(cochran.crd, aes(x = col, y = row, fill = inf)) + geom_tile(color = "black", size = 1.2) + scale_fill_gradient(low = "gold", high = "firebrick4") + theme(text = element_text(size = 20))
ggplot(cochran.crd, aes(x = col, y = row, fill = trt)) + geom_tile(color = "black", size = 1.2) + scale_fill_viridis_d() + theme(text = element_text(size = 20))
Kevin Wright (2020). agridat: Agricultural Datasets. R
package version 1.17.
W.G. Cochran and G. Cox, 1957. Experimental Designs, 2nd ed. John Wiley, New York.
Wickham, François, Henry & Müller (2020) dplyr: A Grammar of Data Manipulation. R-package version 1.0.0.
tapply(cochran.crd$inf, cochran.crd$trt, mean)
## F12 F3 F6 O S12 S3 S6 ## 5.750 9.500 15.500 22.625 14.250 16.750 18.250
tapply(cochran.crd$inf, cochran.crd$trt, sd)
## F12 F3 F6 O S12 S3 S6 ## 2.872281 4.932883 3.785939 8.365533 4.856267 10.781929 4.924429
tapply(cochran.crd$inf, cochran.crd$trt, function(x) c(avg = mean(x), sd = sd(x)))
## $F12## avg sd ## 5.750000 2.872281 ## ## $F3## avg sd ## 9.500000 4.932883 ## ## $F6## avg sd ## 15.500000 3.785939 ## ## $O## avg sd ## 22.625000 8.365533 ## ## $S12## avg sd ## 14.250000 4.856267 ## ## $S3## avg sd ## 16.75000 10.78193 ## ## $S6## avg sd ## 18.250000 4.924429
tapply(cochran.crd$inf, cochran.crd$trt, mean)
## F12 F3 F6 O S12 S3 S6 ## 5.750 9.500 15.500 22.625 14.250 16.750 18.250
tapply(cochran.crd$inf, cochran.crd$trt, sd)
## F12 F3 F6 O S12 S3 S6 ## 2.872281 4.932883 3.785939 8.365533 4.856267 10.781929 4.924429
tapply(cochran.crd$inf, cochran.crd$trt, function(x) c(avg = mean(x), sd = sd(x)))
## $F12## avg sd ## 5.750000 2.872281 ## ## $F3## avg sd ## 9.500000 4.932883 ## ## $F6## avg sd ## 15.500000 3.785939 ## ## $O## avg sd ## 22.625000 8.365533 ## ## $S12## avg sd ## 14.250000 4.856267 ## ## $S3## avg sd ## 16.75000 10.78193 ## ## $S6## avg sd ## 18.250000 4.924429
library(dplyr)cochran.crd %>% group_by(trt) %>% summarise(avg = mean(inf), sd = sd(inf))
## # A tibble: 7 x 3## trt avg sd## * <fct> <dbl> <dbl>## 1 F12 5.75 2.87## 2 F3 9.5 4.93## 3 F6 15.5 3.79## 4 O 22.6 8.37## 5 S12 14.2 4.86## 6 S3 16.8 10.8 ## 7 S6 18.2 4.92
tapply(cochran.crd$inf, cochran.crd$trt, mean)
## F12 F3 F6 O S12 S3 S6 ## 5.750 9.500 15.500 22.625 14.250 16.750 18.250
tapply(cochran.crd$inf, cochran.crd$trt, sd)
## F12 F3 F6 O S12 S3 S6 ## 2.872281 4.932883 3.785939 8.365533 4.856267 10.781929 4.924429
tapply(cochran.crd$inf, cochran.crd$trt, function(x) c(avg = mean(x), sd = sd(x)))
## $F12## avg sd ## 5.750000 2.872281 ## ## $F3## avg sd ## 9.500000 4.932883 ## ## $F6## avg sd ## 15.500000 3.785939 ## ## $O## avg sd ## 22.625000 8.365533 ## ## $S12## avg sd ## 14.250000 4.856267 ## ## $S3## avg sd ## 16.75000 10.78193 ## ## $S6## avg sd ## 18.250000 4.924429
library(dplyr)cochran.crd %>% group_by(trt) %>% summarise(avg = mean(inf), sd = sd(inf))
## # A tibble: 7 x 3## trt avg sd## * <fct> <dbl> <dbl>## 1 F12 5.75 2.87## 2 F3 9.5 4.93## 3 F6 15.5 3.79## 4 O 22.6 8.37## 5 S12 14.2 4.86## 6 S3 16.8 10.8 ## 7 S6 18.2 4.92
右の方が意図が分かりやすいです
教える内容:
observation=mean+treatment+error
(with constraints and distributional assumptions)
observation=mean+treatment+block+error
observation=mean+treatment+row+column+error
observation=mean+block+treatment+error
observation=mean+A+B+A:B+error
observation=mean+A+WP+B+A:B+error
contains
as of 2021-01-21
(Please note that there may be some webscrapping error)
AlgDesign
and agricolae
are the most downloaded
(data from cranlogs
from 2015-01-01 to 2020-12-31)
agricolae::design.crd
Completely randomised design for t=3 treatments with 2 replicates each
trt <- c("A", "B", "C")agricolae::design.crd(trt = trt, r = 2) %>% glimpse()
## List of 2## $ parameters:List of 7## ..$ design: chr "crd"## ..$ trt : chr [1:3] "A" "B" "C"## ..$ r : num [1:3] 2 2 2## ..$ serie : num 2## ..$ seed : int 2074805913## ..$ kinds : chr "Super-Duper"## ..$ : logi TRUE## $ book :'data.frame': 6 obs. of 3 variables:## ..$ plots: num [1:6] 101 102 103 104 105 106## ..$ r : int [1:6] 1 2 1 1 2 2## ..$ trt : chr [1:6] "A" "A" "B" "C" ...
agricolae::design.rcbd
Randomised complete block design for t=3 treatments with 2 blocks
trt <- c("A", "B", "C")agricolae::design.rcbd(trt = trt, r = 2) %>% glimpse()
## List of 3## $ parameters:List of 7## ..$ design: chr "rcbd"## ..$ trt : chr [1:3] "A" "B" "C"## ..$ r : num 2## ..$ serie : num 2## ..$ seed : int 490734433## ..$ kinds : chr "Super-Duper"## ..$ : logi TRUE## $ sketch : chr [1:2, 1:3] "A" "C" "B" "A" ...## $ book :'data.frame': 6 obs. of 3 variables:## ..$ plots: num [1:6] 101 102 103 201 202 203## ..$ block: Factor w/ 2 levels "1","2": 1 1 1 2 2 2## ..$ trt : Factor w/ 3 levels "A","B","C": 1 2 3 3 1 2
agricolae::design.lsd()
Latin square design for t=3 treatments
trt <- c("A", "B", "C")agricolae::design.lsd(trt = trt) %>% glimpse()
## List of 3## $ parameters:List of 7## ..$ design: chr "lsd"## ..$ trt : chr [1:3] "A" "B" "C"## ..$ r : int 3## ..$ serie : num 2## ..$ seed : int -338489375## ..$ kinds : chr "Super-Duper"## ..$ : logi TRUE## $ sketch : chr [1:3, 1:3] "A" "C" "B" "B" ...## $ book :'data.frame': 9 obs. of 4 variables:## ..$ plots: num [1:9] 101 102 103 201 202 203 301 302 303## ..$ row : Factor w/ 3 levels "1","2","3": 1 1 1 2 2 2 3 3 3## ..$ col : Factor w/ 3 levels "1","2","3": 1 2 3 1 2 3 1 2 3## ..$ trt : Factor w/ 3 levels "A","B","C": 1 2 3 3 1 2 2 3 1
agricolae::design.bib()
Balanced incomplete block design for t=3 treatments with block size of 2
trt <- c("A", "B", "C")agricolae::design.bib(trt = trt, k = 2) %>% glimpse()
## [1] "No improvement over initial random design."## ## Parameters BIB## ==============## Lambda : 1## treatmeans : 3## Block size : 2## Blocks : 3## Replication: 2 ## ## Efficiency factor 0.75 ## ## <<< Book >>>
## List of 4## $ parameters:List of 6## ..$ design: chr "bib"## ..$ trt : chr [1:3] "A" "B" "C"## ..$ k : num 2## ..$ serie : num 2## ..$ seed : int -907106719## ..$ kinds : chr "Super-Duper"## $ statistics:'data.frame': 1 obs. of 6 variables:## ..$ lambda : num 1## ..$ treatmeans: int 3## ..$ blockSize : num 2## ..$ blocks : int 3## ..$ r : num 2## ..$ Efficiency: num 0.75## $ sketch : chr [1:3, 1:2] "C" "A" "C" "A" ...## $ book :'data.frame': 6 obs. of 3 variables:## ..$ plots: num [1:6] 101 102 201 202 301 302## ..$ block: Factor w/ 3 levels "1","2","3": 1 1 2 2 3 3## ..$ trt : Factor w/ 3 levels "A","B","C": 3 1 1 2 3 2
agricolae::design.ab()
Factorial design for t=3×2 treatments with 2 replication for each treatment
agricolae::design.ab(trt = c(3, 2), r = 2, design = "crd") %>% glimpse()
## List of 2## $ parameters:List of 8## ..$ design : chr "factorial"## ..$ trt : chr [1:6] "1 1" "1 2" "2 1" "2 2" ...## ..$ r : num [1:6] 2 2 2 2 2 2## ..$ serie : num 2## ..$ seed : int -751356955## ..$ kinds : chr "Super-Duper"## ..$ : logi TRUE## ..$ applied: chr "crd"## $ book :'data.frame': 12 obs. of 4 variables:## ..$ plots: num [1:12] 101 102 103 104 105 106 107 108 109 110 ...## ..$ r : int [1:12] 1 1 1 1 1 2 2 1 2 2 ...## ..$ A : chr [1:12] "3" "2" "3" "1" ...## ..$ B : chr [1:12] "1" "2" "2" "2" ...
Note not A/B testing!
agricolae::design.split()
Split-plot design for t=2×4 treatments with 2 replication for each treatment
trt1 <- c("I", "R"); trt2 <- LETTERS[1:4]agricolae::design.split(trt1 = trt1, trt2 = trt2, r = 2, design = "crd") %>% glimpse()
## List of 2## $ parameters:List of 8## ..$ design : chr "split"## ..$ : logi TRUE## ..$ trt1 : chr [1:2] "I" "R"## ..$ applied: chr "crd"## ..$ r : num [1:2] 2 2## ..$ serie : num 2## ..$ seed : int 157974485## ..$ kinds : chr "Super-Duper"## $ book :'data.frame': 16 obs. of 5 variables:## ..$ plots : num [1:16] 101 101 101 101 102 102 102 102 103 103 ...## ..$ splots: Factor w/ 4 levels "1","2","3","4": 1 2 3 4 1 2 3 4 1 2 ...## ..$ r : int [1:16] 1 1 1 1 1 1 1 1 2 2 ...## ..$ trt1 : chr [1:16] "R" "R" "R" "R" ...## ..$ trt2 : chr [1:16] "C" "B" "A" "D" ...
agricolae::design.crd
, etc.) are like "named statistical graphic" functions (pie
, barplot
)agricolae::design.crd
, etc.) are like "named statistical graphic" functions (pie
, barplot
)edibble
R-packageのもとです agricolae::design.crd
, etc.) are like "named statistical graphic" functions (pie
, barplot
)edibble
R-packageのもとです 名前の元
tibble
R-package とは modern reimagining of the data.frame
edibble
とは experimental design tibbleMüller & Wickham (2020) tibble: Simple Data Frames. R package version 3.0.3
edibble
プロトタイプlibrary(edibble)start_design(name = "cochran.crd") %>% set_units(plot = 32)
## cochran.crd## └─plot (32 levels)
edibble
プロトタイプlibrary(edibble)start_design(name = "cochran.crd") %>% set_units(plot = 32) %>% set_trts(trt = c("F12", "F3", "F6", "O", "S12", "S3", "S6"))
## cochran.crd## ├─plot (32 levels)## └─trt (7 levels)
edibble
プロトタイプlibrary(edibble)start_design(name = "cochran.crd") %>% set_units(plot = 32) %>% set_trts(trt = c("F12", "F3", "F6", "O", "S12", "S3", "S6")) %>% allocate_trts(trt ~ plot)
## cochran.crd## ├─plot (32 levels)## └─trt (7 levels)
edibble
プロトタイプlibrary(edibble)start_design(name = "cochran.crd") %>% set_units(plot = 32) %>% set_trts(trt = c("F12", "F3", "F6", "O", "S12", "S3", "S6")) %>% allocate_trts(~ plot) %>% randomise_trts()
## cochran.crd## ├─plot (32 levels)## └─trt (7 levels)
edibble
プロトタイプlibrary(edibble)start_design(name = "cochran.crd") %>% set_units(plot = 32) %>% set_trts(trt = c("F12", "F3", "F6", "O", "S12", "S3", "S6")) %>% allocate_trts(~ plot) %>% randomise_trts() %>% serve_table()
## # An edibble: 32 x 2## plot trt ## <unit(32)> <trt(7)>## 1 plot1 F12 ## 2 plot2 S6 ## 3 plot3 F6 ## 4 plot4 O ## 5 plot5 S6 ## 6 plot6 O ## 7 plot7 O ## 8 plot8 S3 ## 9 plot9 S6 ## 10 plot10 S12 ## # … with 22 more rows
edibble
プロトタイプ前の実験研究法とどう違うか分かりますか?
library(edibble)start_design(name = "cochran.crd") %>% set_units(block = c("B1", "B2"), plot = nested_in(block, 16)) %>% set_trts(trt = c("F12", "F3", "F6", "O", "S12", "S3", "S6")) %>% allocate_trts(~ plot) %>% randomise_trts() %>% serve_table()
## # An edibble: 32 x 3## block plot trt ## <unit(2)> <unit(32)> <trt(7)>## 1 B1 plot1 S6 ## 2 B1 plot2 S3 ## 3 B1 plot3 F12 ## 4 B1 plot4 F6 ## 5 B1 plot5 S3 ## 6 B1 plot6 S6 ## 7 B1 plot7 S6 ## 8 B1 plot8 S12 ## 9 B1 plot9 F12 ## 10 B1 plot10 F3 ## # … with 22 more rows
edibble
ユニット・ストラクチャーstart_design("complex unit structure") %>% set_units(city = c("tokyo", "nagano", "sydney", "melbourne", "washington"), school = nested_in(city, "tokyo" ~ 4, "sydney" ~ 1, . ~ 2)) %>% serve_table()
## # An edibble: 11 x 2## city school ## <unit(5)> <unit(11)>## 1 tokyo school1 ## 2 tokyo school2 ## 3 tokyo school3 ## 4 tokyo school4 ## 5 nagano school5 ## 6 nagano school6 ## 7 sydney school7 ## 8 melbourne school8 ## 9 melbourne school9 ## 10 washington school10 ## 11 washington school11
edibble
トリートメント・ストラクチャーdes <- start_design(name = "Effective teaching") %>% set_units(class = 4, student = nested_in(class, 30)) %>% set_trts(style = c("flipped", "traditional"), exam = c("take-home", "open-book", "closed-book")) %>% allocate_trts(style ~ class, exam ~ student) %>% randomise_trts()print(serve_table(des), n = 120)
## # An edibble: 120 x 4## class student style exam ## <unit(4)> <unit(120)> <trt(2)> <trt(3)> ## 1 class1 student1 flipped closed-book## 2 class1 student2 flipped closed-book## 3 class1 student3 flipped open-book ## 4 class1 student4 flipped open-book ## 5 class1 student5 flipped open-book ## 6 class1 student6 flipped take-home ## 7 class1 student7 flipped closed-book## 8 class1 student8 flipped take-home ## 9 class1 student9 flipped open-book ## 10 class1 student10 flipped open-book ## 11 class1 student11 flipped open-book ## 12 class1 student12 flipped open-book ## 13 class1 student13 flipped take-home ## 14 class1 student14 flipped take-home ## 15 class1 student15 flipped closed-book## 16 class1 student16 flipped take-home ## 17 class1 student17 flipped closed-book## 18 class1 student18 flipped closed-book## 19 class1 student19 flipped closed-book## 20 class1 student20 flipped open-book ## 21 class1 student21 flipped take-home ## 22 class1 student22 flipped take-home ## 23 class1 student23 flipped open-book ## 24 class1 student24 flipped closed-book## 25 class1 student25 flipped take-home ## 26 class1 student26 flipped take-home ## 27 class1 student27 flipped closed-book## 28 class1 student28 flipped open-book ## 29 class1 student29 flipped take-home ## 30 class1 student30 flipped closed-book## 31 class2 student31 flipped closed-book## 32 class2 student32 flipped open-book ## 33 class2 student33 flipped closed-book## 34 class2 student34 flipped take-home ## 35 class2 student35 flipped open-book ## 36 class2 student36 flipped take-home ## 37 class2 student37 flipped open-book ## 38 class2 student38 flipped open-book ## 39 class2 student39 flipped closed-book## 40 class2 student40 flipped closed-book## 41 class2 student41 flipped take-home ## 42 class2 student42 flipped closed-book## 43 class2 student43 flipped open-book ## 44 class2 student44 flipped open-book ## 45 class2 student45 flipped take-home ## 46 class2 student46 flipped closed-book## 47 class2 student47 flipped closed-book## 48 class2 student48 flipped take-home ## 49 class2 student49 flipped open-book ## 50 class2 student50 flipped closed-book## 51 class2 student51 flipped take-home ## 52 class2 student52 flipped take-home ## 53 class2 student53 flipped open-book ## 54 class2 student54 flipped take-home ## 55 class2 student55 flipped closed-book## 56 class2 student56 flipped closed-book## 57 class2 student57 flipped open-book ## 58 class2 student58 flipped take-home ## 59 class2 student59 flipped open-book ## 60 class2 student60 flipped take-home ## 61 class3 student61 traditional closed-book## 62 class3 student62 traditional take-home ## 63 class3 student63 traditional open-book ## 64 class3 student64 traditional closed-book## 65 class3 student65 traditional closed-book## 66 class3 student66 traditional open-book ## 67 class3 student67 traditional take-home ## 68 class3 student68 traditional take-home ## 69 class3 student69 traditional open-book ## 70 class3 student70 traditional closed-book## 71 class3 student71 traditional closed-book## 72 class3 student72 traditional open-book ## 73 class3 student73 traditional take-home ## 74 class3 student74 traditional open-book ## 75 class3 student75 traditional closed-book## 76 class3 student76 traditional closed-book## 77 class3 student77 traditional closed-book## 78 class3 student78 traditional open-book ## 79 class3 student79 traditional take-home ## 80 class3 student80 traditional closed-book## 81 class3 student81 traditional take-home ## 82 class3 student82 traditional open-book ## 83 class3 student83 traditional take-home ## 84 class3 student84 traditional open-book ## 85 class3 student85 traditional open-book ## 86 class3 student86 traditional closed-book## 87 class3 student87 traditional open-book ## 88 class3 student88 traditional take-home ## 89 class3 student89 traditional take-home ## 90 class3 student90 traditional take-home ## 91 class4 student91 traditional open-book ## 92 class4 student92 traditional closed-book## 93 class4 student93 traditional closed-book## 94 class4 student94 traditional take-home ## 95 class4 student95 traditional closed-book## 96 class4 student96 traditional take-home ## 97 class4 student97 traditional take-home ## 98 class4 student98 traditional open-book ## 99 class4 student99 traditional closed-book## 100 class4 student100 traditional take-home ## 101 class4 student101 traditional closed-book## 102 class4 student102 traditional open-book ## 103 class4 student103 traditional open-book ## 104 class4 student104 traditional closed-book## 105 class4 student105 traditional closed-book## 106 class4 student106 traditional open-book ## 107 class4 student107 traditional open-book ## 108 class4 student108 traditional closed-book## 109 class4 student109 traditional closed-book## 110 class4 student110 traditional take-home ## 111 class4 student111 traditional open-book ## 112 class4 student112 traditional take-home ## 113 class4 student113 traditional take-home ## 114 class4 student114 traditional take-home ## 115 class4 student115 traditional take-home ## 116 class4 student116 traditional open-book ## 117 class4 student117 traditional take-home ## 118 class4 student118 traditional open-book ## 119 class4 student119 traditional open-book ## 120 class4 student120 traditional closed-book
edibble
・記録out <- des %>% record_vars(student = c(mark, gender), class = teacher) %>% expect_vars(mark = to_be_numeric(with_value(between = c(0, 100))), gender = to_be_factor(levels = c("female", "male", "other", "unknown"))) %>% serve_table()out
## # An edibble: 120 x 7## class student style exam mark gender teacher## <unit(4)> <unit(120)> <trt(2)> <trt(3)> <rcrd> <rcrd> <rcrd>## 1 class1 student1 flipped closed-book ■ ■ ■## 2 class1 student2 flipped closed-book ■ ■ x## 3 class1 student3 flipped open-book ■ ■ x## 4 class1 student4 flipped open-book ■ ■ x## 5 class1 student5 flipped open-book ■ ■ x## 6 class1 student6 flipped take-home ■ ■ x## 7 class1 student7 flipped closed-book ■ ■ x## 8 class1 student8 flipped take-home ■ ■ x## 9 class1 student9 flipped open-book ■ ■ x## 10 class1 student10 flipped open-book ■ ■ x## # … with 110 more rows
実験計画は重要です!
edibble
の目的は実験計画を容易にする事です
実験計画は重要です!
edibble
の目的は実験計画を容易にする事です
🚧 edibble
は開発中です
コメントとフィードバックを歓迎します!
This slide is made using the xaringan
R-package and found at
Emi Tanaka
Department of Econometrics and Business Statistics,
Monash University, Melbourne, Australia
emi.tanaka@monash.edu
This slide is made using the xaringan
R-package and found at
Emi Tanaka
Department of Econometrics and Business Statistics,
Monash University, Melbourne, Australia
emi.tanaka@monash.edu
Presenter: Emi Tanaka
Department of Econometrics and Business Statistics,
Monash University, Melbourne, Australia
emi.tanaka@monash.edu
23 Jan 2021 @ TokyoR
Keyboard shortcuts
↑, ←, Pg Up, k | Go to previous slide |
↓, →, Pg Dn, Space, j | Go to next slide |
Home | Go to first slide |
End | Go to last slide |
Number + Return | Go to specific slide |
b / m / f | Toggle blackout / mirrored / fullscreen mode |
c | Clone slideshow |
p | Toggle presenter mode |
t | Restart the presentation timer |
?, h | Toggle this help |
Esc | Back to slideshow |