convert_to_simulation: Convert a NONMEM run to a simulation

View source: R/sim-diagnostics.R

convert_to_simulationR Documentation

Convert a NONMEM run to a simulation

Description

[Stable]

Replaces $EST with $SIM.

Usage

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.

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.

Value

An nm object with modified ctl_contents field.

Examples


## Not run: 

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

## End(Not run)


NMproject documentation built on Sept. 30, 2022, 1:06 a.m.