-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
54 lines (37 loc) · 2.15 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
title: "Design of Experiments in R"
output: md_document
---
# Introduction
This repository is designed to be a refrence for myself and others for using R
in the design of experiments. It is a living document to store code snippets and
reminders of how to achieve outcomes given inputs and constraints.
This repository is heavily influenced by ["Statistical Methods for Mineral Engineers"](https://jktech.com.au/statistical-methods-mineral-engineers) by the
incredibly influential Prof. TJ Napier-Munn and the CRAN Task View ["Design of Experiments (DoE) & Analysis of Experimental Data"](https://cran.r-project.org/web/views/ExperimentalDesign.html) by Ulrike
Groemping.
## High Level Notes
* Use blocking to account for factors that probably have an effect but aren't interesting.
- Date
- Batch of materials
- Person performing experiments
- Equipment the test is performed on
* Pay attention to the [resolution](https://en.wikipedia.org/wiki/Fractional_factorial_design#Resolution) of the study. Stay within III-V most of the time.
- I : Not Useful
- II : Not useful, can't distinguish main effects
- III: Useful, estimate main effects but can't distinguish two-factor interactions
- IV : Useful, can estimate main and two-factor effects but two factor interactions can be confounded
- V : Useful, can estimate main, two-factor, two-factor interactions and three factor interactions
- VI : Rarely useful, overkill, estimate all above factors unless there is other three-factor interactions
## Fractional Factorial Designs with 2-Level Factors
* Used When you have On-Off style interactions or High-Low effects.
Below is an example of a flotation test to measure bubble size given three
parameters and three replications. The experiment is of a resolution "III" and
will not be able to identify two-factor interactions.
```{r packages, results='asis', echo=TRUE}
pacman::p_load(tidyverse, FrF2)
example1 = FrF2(factor.names = c("frother","collector","salinity"),
resolution = 3,
replications = 3)
example1_runorder = attr(example1,"run.order")
example1 %>% bind_cols(example1_runorder) %>% knitr::kable(format = "markdown")
```