Add a argument 'scenarios' to the simulate method.
Write scenarios as you write CAMPSIS events.
Writing a scenario could be achieved as follows: Scenario(name (optional), model, dataset)
Argument model could be a CAMPSIS model or a function/lambda formula to apply on the original model.
Argument dataset could be a CAMPSIS dataset or a function/lambda formula to apply on the original dataset
Thanks to the new generic functions find(), contains(), delete() and replace(), updating a model/dataset is easy.
Example 1: test several values of THETA KA:
scenarios <- Scenarios() %>%
add(Scenario()))) %>% # Original model and dataset
add(Scenario(model=~.x %>% replace(Theta("KA", value=X)))) %>%
add(Scenario(model=~.x %>% replace(Theta("KA", value=Y)))) %>%
add(Scenario(model=~.x %>% replace(Theta("KA", value=Z))))
Example 2: test different distributions for covariate WT:
Add a argument 'scenarios' to the simulate method.
Write scenarios as you write CAMPSIS events.
Writing a scenario could be achieved as follows: Scenario(name (optional), model, dataset)
Argument model could be a CAMPSIS model or a function/lambda formula to apply on the original model. Argument dataset could be a CAMPSIS dataset or a function/lambda formula to apply on the original dataset
Thanks to the new generic functions find(), contains(), delete() and replace(), updating a model/dataset is easy.
Example 1: test several values of THETA KA:
Example 2: test different distributions for covariate WT:
I think this is an elegant solution as many elements of the model and the dataset can already be retrieved/adapted at this stage.