Skip to content

Commit

Permalink
rearrange false positives code and fix rendering error
Browse files Browse the repository at this point in the history
  • Loading branch information
idavydov committed Oct 16, 2024
1 parent 91f68a4 commit eb4ebd4
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions vignettes/false_positives.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,17 @@ bc <- BatchContainer$new(
trueEffect = rnorm(96, mean = 10, sd = 1)
)
)
```

## Simulating a study in which randomization is not used

First we simulate a study in which randomization is not used. In this context,
it means that the treatment (controls and compounds in columns) and the plate
effect are correlated. The following plot visualizes the layout of the plate,
the true effect, the plate effect, and the measurement as a sum of the true
effect and the plate effect.

```{r}
# get observations with batch effect
get_observations <- function(bc) {
bc$get_samples() |>
Expand All @@ -111,20 +121,12 @@ get_observations <- function(bc) {
measurement = trueEffect + plateEffect
)
}
head(dat) |> gt::gt()
```

## Simulating a study in which randomization is not used

First we simulate a study in which randomization is not used. In this context,
it means that the treatment (controls and compounds in columns) and the plate
effect are correlated. The following plot visualizes the layout of the plate,
the true effect, the plate effect, and the measurement as a sum of the true
effect and the plate effect.

```{r}
dat <- get_observations(bc)
head(dat) |> gt::gt()
```

```{r rawPlatePlots, fig.height=5.5, fig.width=8}
Expand Down

0 comments on commit eb4ebd4

Please sign in to comment.