Learn R Programming

NMproject (version 0.6.9)

convert_to_simulation: Convert a NONMEM run to a simulation

Description

[Stable]

Replaces $EST with $SIM.

Usage

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

Value

An nm object with modified ctl_contents field.

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.

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

Run this code

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")
  
}

Run the code above in your browser using DataLab