40 likes | 190 Views
C09: Hands-On Exercise for Model Diagnostics 2 (Simulation Using Parameter Uncertainty). Dongwoo Kang. Objectives. Practice simulation algorithm 1 (simulation using parameter uncertainty) using metrumrg package PK model: 1 compartment (ADVAN1 TRANS1) Dataset: mock data of 200 subjects
E N D
C09: Hands-On Exercise forModel Diagnostics 2(Simulation Using Parameter Uncertainty) Dongwoo Kang
Objectives • Practice simulation algorithm 1 (simulation using parameter uncertainty) using metrumrg package • PK model: 1 compartment (ADVAN1 TRANS1) • Dataset: mock data of 200 subjects • Simulation control R codes and NONMEM (control and output) files from the (prior) analysis are provided • Package metrumrg can be downloaded from CRAN as a zip file (http://cran.fhcrc.org/web/packages/metrumrg/index.html)
Directories and files • Directories • C:\C09\pk12 – exercise working directory • C:\C09\pk12-key – solutions and results • Files • pk12-est.ctl: (prior) analysis control file • pk12-est.out: (prior) analysis output from pk12-est.ctl • pk12-sim.tab: mock dataset for simulation • pk12-tmp.ctl: template NONMEM control file for generating simulation files • sim-1-prm.R: simulation control code to generate random parameters for simulation using MIfuns package • sim-2-nm-file.R: simulation control code to generate simulation NONMEM files and run them • sim-3-postproc.R: postprocessing code to compute individual AUC and plot histogram
Procedure • Installation of R and packages • Install R • Install package metrumrg • Packages – Install package(s) from local zip files … • Install the necessary packages (lattice, MASS, reshape, and plyr) from CRAN repository if not installed • Packages – Set CRAN mirror – Install package(s) • Simulation • Open sim-1-prm.R • Open pk12-est.out and copy the required numbers to sim-1-prm.R to replace xxx • Run sim-1-prm.R • Check that prm-pk12.csv is generated • Run sim-2-nm-file.R to generate simulation NONMEM files • Run batch file to perform simulation, modify it appropriately • Open and run sim-3-postproc.R and check the histogram