Closed emitanaka closed 1 year ago
maybe call it fill_rcrds
or simulate_rcrds
start_design() %>%
set_trts(treat = c("A", "B", "C")) %>%
set_units(unit = 12) %>%
allocate_trts(treat ~ unit) %>%
randomise_trts() %> %
set_rcrds(response = unit) %>%
expect_rcrds(response = to_be_numeric(with_value(between = c(0, 100))) %>%
simulate_rcrds(response = sim_norm(mean = ~30 + treat, sd = 3,
effects = list(treat = c("A" = 3, "B" = 2, "C" = 0)))
fill_rcrds
= literally just fill records based on expect_rcrds
(with some simple choice of distribution). if not specified then just sample from standard normal. The idea is to just have some numbers or factor levels filled quickly so you can run analysis as demonstration.
simulate_rcrd
is for more complex case.
Fill values for record vars using expected range of values (by default assumes uniform or normal or allow distribution?)