[Stable]

Replaces $EST with $SIM.

convert_to_simulation(m, seed = 12345, subpr = 1)

Arguments

m

A nm object.

seed

Numeric (default = 12345). seed value to include in $SIM.

subpr

Numeric (default = 1). SUBPR value to include in $SIM.

Value

An nm object with modified ctl_contents field.

Details

Will only change $EST/$SIM, therefore it will not be sufficient to change a categorical estimation control file to simulation. You will likely need to perform a manual edit for categorical data simulation.

Examples


if (FALSE) {

## requires NONMEM to be installed

m1s <- m1 %>%
  child(run_id = "m1s") %>%
  update_parameters(m1) %>%
  convert_to_simulation(subpr = 50) %>%
  run_nm()

m1s %>% nm_render("Scripts/basic_vpc.Rmd")
m1s %>% nm_render("Scripts/basic_ppc.Rmd")
  
}