Generate dataset for vignettes and simulation studies
number of markers
number of differential markers
donors per group
paired experimental design
per sample
zero inflation probability
log of mean in treatment
log of mean in control
cell level correlation
donor level correlation
tibble
data frame
set.seed(1)
df = simulate_data(n_cells = 10)
str(df)
#> tibble [80 × 7] (S3: tbl_df/tbl/data.frame)
#> $ donor : chr [1:80] "pid01" "pid01" "pid01" "pid01" ...
#> $ condition: Factor w/ 2 levels "control","treatment": 2 2 2 2 2 2 2 2 2 2 ...
#> $ m01 : num [1:80] 80 6 6 3 17 20 14 90 79 46 ...
#> $ m02 : num [1:80] 21 3 4 1 1 9 40 17 24 0 ...
#> $ m03 : num [1:80] 6 2 12 49 3 8 14 6 0 4 ...
#> $ m04 : num [1:80] 4 0 11 10 0 2 22 8 14 13 ...
#> $ m05 : num [1:80] 12 0 3 0 0 1 1 4 1 1 ...
df
#> # A tibble: 80 × 7
#> donor condition m01 m02 m03 m04 m05
#> <chr> <fct> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 pid01 treatment 80 21 6 4 12
#> 2 pid01 treatment 6 3 2 0 0
#> 3 pid01 treatment 6 4 12 11 3
#> 4 pid01 treatment 3 1 49 10 0
#> 5 pid01 treatment 17 1 3 0 0
#> 6 pid01 treatment 20 9 8 2 1
#> 7 pid01 treatment 14 40 14 22 1
#> 8 pid01 treatment 90 17 6 8 4
#> 9 pid01 treatment 79 24 0 14 1
#> 10 pid01 treatment 46 0 4 13 1
#> # … with 70 more rows