PM User manual-formatted-2013-05-16-16.41 - LAPK · • NPAG&is&the& Nonparametric& Adaptive& Grid&...

38
An R package for parametric and nonparametric modeling and simula6on of pharmacokine6c and pharmacodynamic systems User Manual April 2013 Package Version 1.0.0

Transcript of PM User manual-formatted-2013-05-16-16.41 - LAPK · • NPAG&is&the& Nonparametric& Adaptive& Grid&...

An13 R13 package13 for13 parametric13

and13 non-shy‐parametric13 modeling13

and13 simula6on13 of13

pharmacokine6c13 and13

pharmacodynamic13 systems

13 13 13 13 13 13 13 13 13 13 13 13 User13 Manual13 April13 201313 Package13 Version13 100

Table of ContentsIntroduc1on13 3

Ci1ng13 Pmetrics13 3Disclaimer13 3

System13 Requirements13 and13 Installa1on13 3What13 This13 Manual13 Is13 Not13 4GeCng13 Help13 and13 Updates13 5

Pmetrics13 Components13 5Customizing13 Pmetrics13 Func1ons13 6

General13 Workflow13 8Pmetrics13 Input13 Files13 9

Data13 csv13 Files13 9Model13 Files13 10

How13 to13 use13 R13 and13 Pmetrics13 18Pmetrics13 Data13 Objects13 19

Making13 New13 Pmetrics13 Objects13 22NPAG13 Runs13 25

IT2B13 Runs13 28Simulator13 Runs13 31

PloCng13 31Examples13 of13 Pmetrics13 plots13 33

Model13 Diagnos1cs13 36Internal13 Valida1on13 36External13 Valida1on13 37

References13 38

Userrsquos13 Guide13 13 213 13

IntroductionThank13 you13 for13 your13 interest13 in13 Pmetrics13 13 This13 guide13 provides13 instructions13 and13 examples13 to13 assist13 users13 of13 the13 Pmetrics13 R13 package13 by13 the13 Laboratory13 of13 Applied13 Pharmacokinetics13 at13 the13 University13 of13 Southern13 California13 13 Please13 see13 our13 website13 at13 httpwwwlapkorg13 for13 more13 informationHere13 are13 some13 tips13 for13 using13 this13 guidebull Items13 that13 are13 hyperlinked13 can13 be13 selected13 to13 jump13 rapidly13 to13 relevant13 sections13 13 bull At13 the13 bottom13 of13 every13 page13 the13 text13 ldquoUserrsquos13 Guiderdquo13 can13 be13 selected13 to13 jump13 immediately13 to13 the13 table13 of13

contentsbull Items13 in13 courier13 font13 correspond13 to13 R13 commands

Citing PmetricsPlease13 help13 us13 maintain13 our13 funding13 to13 provide13 Pmetrics13 as13 a13 free13 research13 tool13 to13 the13 pharmacometric13 community13 13 If13 you13 use13 Pmetrics13 in13 a13 publication13 you13 can13 cite13 it13 as13 below13 13 In13 R13 you13 can13 always13 type13 citation(ldquoPmetricsrdquo) to13 get13 this13 same13 referenceNeely13 MN13 van13 Guilder13 MG13 Yamada13 WM13 Schumitzky13 A13 Jelliffe13 RW13 Accurate13 Detection13 of13 Outliers13 and13 Subpopulations13 With13 Pmetrics13 a13 Nonparametric13 and13 Parametric13 Pharmacometric13 Modeling13 and13 Simulation13 Package13 for13 R13 Ther13 Drug13 Monit13 201213 34467ndash47613

DisclaimerYou13 the13 user13 assume13 all13 responsibility13 for13 acting13 on13 the13 results13 obtained13 from13 Pmetrics13 13 The13 USC13 Laboratory13 of13 Applied13 Pharmacokinetics13 members13 and13 consultants13 to13 the13 Laboratory13 of13 Applied13 Pharmacokinetics13 and13 the13 University13 of13 Southern13 California13 and13 its13 employees13 assume13 no13 liability13 whatsoever13 13 Your13 use13 of13 the13 package13 constitutes13 your13 agreement13 to13 this13 provision13

System Requirements and InstallationThere13 are13 three13 required13 software13 components13 which13 must13 be13 installed13 on13 your13 system13 in13 this13 order13

1 R2 The13 Pmetrics13 package13 for13 R3 gfortran13 or13 some13 other13 Fortran13 compiler

13 A13 fourth13 highly13 recommended13 but13 optional13 component13 is13 Rstudio13 a13 user-shy‐friendly13 wrapper13 for13 R13 It13 can13 be13 installed13 any13 time13 after13 installing13 R13 (ie13 step13 113 above)13 All13 components13 have13 versions13 for13 Mac13 and13 Windows13 environments13 and13 32-shy‐13 and13 64-shy‐13 bit13 processors13 13 All13 are13 free13 of13 charge13 13

RR13 is13 a13 free13 software13 environment13 for13 statistical13 computing13 and13 graphics13 which13 can13 be13 obtained13 from13 httpwwwR-shy‐projectorg13 13 Pmetrics13 is13 a13 library13 for13 R

PmetricsIf13 you13 are13 reading13 this13 manual13 then13 you13 have13 likely13 visited13 our13 website13 at13 httpwwwlapkorg13 where13 you13 can13 select13 the13 software13 tab13 and13 download13 our13 products13 including13 Pmetrics

Userrsquos13 Guide13 13 313 13

Pmetrics13 is13 distributed13 as13 a13 package13 source13 Zile13 archive13 (tgz13 for13 Mac13 zip13 for13 Windows)13 13 Do13 not13 open13 the13 archive13 13 To13 install13 Pmetrics13 from13 the13 R13 console13 use13 the13 command13 installpackages(filechoose())13 and13 navigate13 when13 prompted13 to13 the13 folder13 in13 which13 you13 placed13 the13 Pmetrics13 package13 archive13 (zip13 or13 tgz)13 Zile13 13 Pmetrics13 will13 need13 the13 following13 R13 packages13 for13 some13 functions13 chron13 Defaults13 and13 R2HTML13 13 However13 you13 do13 not13 have13 to13 install13 these13 if13 you13 do13 not13 already13 have13 them13 in13 your13 R13 library13 13 They13 should13 automatically13 be13 downloaded13 and13 installed13 the13 Zirst13 time13 you13 use13 a13 Pmetrics13 function13 that13 requires13 them13 but13 if13 something13 goes13 awry13 (such13 as13 no13 internet13 connection13 or13 busy13 server)13 you13 can13 do13 this13 manually

FortranIn13 order13 to13 run13 Pmetrics13 a13 Fortran13 compiler13 is13 required13 13 After13 you13 have13 installed13 Pmetrics13 the13 Zirst13 time13 you13 load13 Pmetrics13 into13 R13 with13 the13 function13 library(Pmetrics)13 the13 program13 will13 ask13 you13 which13 Fortran13 compiler13 you13 are13 using13 13 If13 you13 have13 no13 compiler13 you13 will13 have13 the13 option13 to13 automatically13 link13 you13 to13 the13 OS-shy‐speciZic13 page13 of13 our13 website13 with13 explicit13 instructions13 and13 a13 link13 to13 download13 and13 install13 gfortran13 on13 your13 system13 13 Details13 of13 this13 procedure13 follow13 but13 are13 not13 relevant13 if13 you13 already13 have13 a13 compiler13 installedFor13 Mac13 users13 the13 correct13 version13 of13 gfortran13 will13 be13 downloaded13 for13 your13 system13 (Mountain13 Lion13 64-shy‐bit13 Lion13 64-shy‐bit13 Snow13 Leopard13 64-shy‐13 or13 32-shy‐bit)13 You13 will13 also13 be13 provided13 a13 link13 to13 download13 and13 install13 Applersquos13 Xcode13 application13 if13 you13 do13 not13 already13 have13 it13 on13 your13 system13 13 Xcode13 is13 required13 to13 run13 gfortran13 on13 Macs13 As13 of13 version13 4313 for13 Lion13 Xcode13 is13 available13 from13 the13 App13 store13 for13 free13 13 For13 Snow13 Leopard13 Xcode13 is13 on13 your13 installation13 disk13 13 NOTE13 For13 Xcode13 downloaded13 from13 the13 App13 store13 (Lion13 and13 later)13 you13 must13 additionally13 install13 the13 Command13 Line13 Tools13 available13 in13 the13 Xcode13 Preferences13 -shy‐gt13 Downloads13 paneWindows13 users13 need13 to13 pay13 special13 attention13 because13 the13 the13 ldquogccrdquo13 installer13 that13 provides13 necessary13 common13 libraries13 for13 many13 programming13 languages13 does13 not13 by13 default13 include13 gfortran13 13 When13 gcc13 is13 installed13 be13 sure13 to13 choose13 the13 fortran13 option13 to13 include13 gfortran13 as13 shown13 below

RstudioA13 text13 editor13 that13 can13 link13 to13 R13 is13 useful13 for13 saving13 scripts13 13 Both13 the13 Windows13 and13 Mac13 versions13 of13 R13 have13 rudimentary13 text13 editors13 that13 are13 stable13 and13 reliable13 13 Numerous13 other13 free13 and13 paid13 editors13 can13 also13 do13 the13 job13 and13 these13 can13 be13 located13 by13 searching13 the13 internet13 13 We13 prefer13 Rstudio

What This Manual Is NotWe13 assume13 that13 the13 user13 has13 familiarity13 with13 population13 modeling13 and13 R13 and13 thus13 this13 manual13 is13 not13 a13 tutorial13 for13 basic13 concepts13 and13 techniques13 in13 either13 domain13 13 We13 have13 tried13 to13 make13 the13 R13 code13 simple13 regular13 and13 well13 documented13 13 13 13 A13 very13 good13 free13 online13 resource13 for13 learning13 the13 basics13 of13 R13 can13 be13 found13 at13 httpwwwstatmethodsnetindexhtml13 13 We13 recognize13 that13 initial13 use13 of13 a13 new13 software13 package13 can13 be13 complex13 so13

Userrsquos13 Guide13 13 413 13

Click13 the13 expander13 bu6on

Check13 this13 box

please13 feel13 free13 to13 contact13 us13 at13 any13 time13 preferably13 through13 the13 Pmetrics13 forum13 at13 httpwwwlapkorg13 13 or13 directly13 by13 email13 at13 contactlapkorgThis13 manual13 is13 also13 not13 intended13 to13 be13 a13 theoretical13 treatise13 on13 the13 algorithms13 used13 in13 IT2B13 or13 NPAG13 13 For13 that13 the13 user13 is13 directed13 to13 our13 website13 at13 wwwlapkorg

Getting Help and UpdatesThere13 is13 an13 active13 LAPK13 forum13 available13 from13 our13 website13 at13 httpwwwlapkorg13 with13 all13 kinds13 of13 useful13 tips13 and13 help13 with13 Pmetrics13 13 Register13 (separately13 from13 your13 LAPK13 registration)13 and13 feel13 free13 to13 post13 13 Within13 R13 you13 can13 also13 use13 help(ldquocommandrdquo)13 or13 command13 in13 the13 R13 console13 to13 see13 detailed13 help13 Ziles13 for13 any13 Pmetrics13 command13 13 Many13 commands13 have13 examples13 included13 in13 this13 documentation13 and13 you13 can13 execute13 the13 examples13 with13 example(command)13 Note13 that13 here13 quotation13 marks13 are13 unnecessary13 around13 command13 You13 can13 also13 type13 PMmanual()13 to13 launch13 this13 manual13 from13 within13 Pmetrics13 as13 well13 as13 a13 catalogue13 of13 all13 Pmetrics13 functions13 13 Finally13 PMnews()13 will13 display13 the13 Pmetrics13 changelog

Pmetrics13 will13 check13 for13 updates13 automatically13 every13 time13 you13 load13 it13 with13 library(Pmetrics)13 13 If13 an13 update13 is13 available13 it13 will13 provide13 a13 brief13 message13 to13 inform13 you13 13 You13 can13 then13 use13 PMupdate() to13 update13 Pmetrics13 from13 within13 R13 without13 having13 to13 visit13 our13 website13 13 You13 will13 be13 prompted13 for13 your13 LAPK13 user13 email13 address13 and13 password13 13 When13 bugs13 arise13 in13 Pmetrics13 you13 may13 see13 a13 start13 up13 message13 to13 inform13 you13 of13 the13 bug13 and13 a13 patch13 can13 be13 installed13 by13 the13 command13 PMpatch()13 if13 available13 13 Note13 that13 patches13 must13 be13 reinstalled13 with13 this13 command13 every13 time13 you13 launch13 Pmetrics13 until13 the13 bug13 is13 corrected13 in13 the13 next13 versionAs13 of13 version13 113 Pmetrics13 has13 graphical13 user13 interface13 (GUI)13 capability13 for13 many13 functions13 13 Using13 PMcode(ldquofunctionrdquo)13 will13 launch13 the13 GUI13 in13 your13 default13 browser13 13 While13 you13 are13 interacting13 with13 the13 GUI13 R13 is13 ldquolisteningrdquo13 and13 no13 other13 activity13 is13 possible13 13 The13 GUI13 is13 designed13 to13 generate13 Pmetrics13 R13 code13 in13 response13 to13 your13 input13 in13 a13 friendly13 intuitive13 environment13 13 That13 code13 can13 be13 copied13 and13 pasted13 into13 your13 Pmetrics13 R13 script13 13 You13 can13 also13 see13 live13 plot13 previews13 with13 the13 GUI13 13 All13 this13 is13 made13 possible13 with13 the13 lsquoshinyrsquo13 package13 for13 RCurrently13 the13 following13 GUIs13 are13 available13 13 PMcode(ldquoNPrunrdquo) PMcode(ldquoITrunrdquo) PMcode(ldquoplotrdquo)13 13 More13 are13 coming

Pmetrics ComponentsThere13 are13 three13 main13 software13 programs13 that13 Pmetrics13 controlsbull IT2B13 is13 the13 ITerative13 2-shy‐stage13 Bayesian13 parametric13 population13 PK13 modeling13 program13 13 It13 is13 generally13 used13 to13

estimate13 parameter13 ranges13 to13 pass13 to13 NPAG13 13 It13 will13 estimate13 values13 for13 population13 model13 parameters13 under13 the13 assumption13 that13 the13 underlying13 distributions13 of13 those13 values13 are13 normal13 or13 transformed13 to13 normal

bull NPAG13 is13 the13 Non-shy‐parametric13 Adaptive13 Grid13 software13 13 It13 will13 create13 a13 non-shy‐parametric13 population13 model13 consisting13 of13 discrete13 support13 points13 each13 with13 a13 set13 of13 estimates13 for13 all13 parameters13 in13 the13 model13 plus13 an13 associated13 probability13 (weight)13 of13 that13 set13 of13 estimates13 13 There13 can13 be13 at13 most13 one13 point13 for13 each13 subject13 in13 the13 study13 population13 13 There13 is13 no13 need13 for13 any13 assumption13 about13 the13 underlying13 distribution13 of13 model13 parameter13 values

bull The13 simulator13 is13 a13 semi-shy‐parametric13 Monte13 Carlo13 simulation13 software13 program13 that13 can13 use13 the13 output13 of13 IT2B13 or13 NPAG13 to13 build13 randomly13 generated13 response13 proZiles13 (eg13 time-shy‐concentration13 curves)13 for13 a13 given13 population13 model13 parameter13 estimates13 and13 data13 input13 13 Simulation13 from13 a13 non-shy‐parametric13 joint13 density13 model13 ie13 NPAG13 output13 is13 possible13 with13 each13 point13 serving13 as13 the13 mean13 of13 a13 multivariate13 normal13 distribution13 weighted13 according13 to13 the13 weight13 of13 the13 point13 13 The13 covariance13 matrix13 of13 the13 entire13 set13 of13 support13 points13 is13 divided13 equally13 among13 the13 points13 for13 the13 purposes13 of13 simulation

Pmetrics13 has13 groups13 of13 R13 functions13 named13 logically13 to13 run13 each13 of13 these13 programs13 and13 to13 extract13 the13 output13 13 Again13 these13 are13 extensively13 documented13 within13 R13 by13 using13 the13 help(command)13 or13 command13 syntax13 bull ITrun13 ITparse13 ITload13 ITreport13 ERRrunbull NPrun13 NPparse13 NPload13 NPreportbull SIMrun13 SIMparse

Userrsquos13 Guide13 13 513 13

For13 IT2B13 and13 NPAG13 the13 ldquorunrdquo13 functions13 generate13 batch13 Ziles13 which13 when13 executed13 launch13 the13 software13 programs13 to13 do13 the13 analysis13 ERRrun13 is13 a13 special13 implementation13 of13 IT2B13 designed13 to13 estimate13 the13 assay13 error13 polynomial13 coefZicients13 from13 the13 data13 when13 they13 cannot13 be13 calculated13 from13 assay13 validation13 data13 (using13 makeErrorPoly())13 supplied13 by13 the13 analytical13 laboratory13 The13 batch13 Ziles13 contain13 all13 the13 information13 necessary13 to13 complete13 a13 run13 tidy13 the13 output13 into13 a13 datetime13 stamped13 directory13 with13 meaningful13 subdirectories13 extract13 the13 information13 generate13 a13 report13 and13 a13 saved13 Rdata13 Zile13 of13 parsed13 output13 which13 can13 be13 quickly13 and13 easily13 loaded13 into13 R13 13 On13 Mac13 (Unix)13 systems13 the13 batch13 Zile13 will13 automatically13 launch13 in13 a13 Terminal13 window13 13 On13 Windows13 systems13 the13 batch13 Zile13 must13 be13 launched13 manually13 13 In13 both13 cases13 the13 execution13 of13 the13 program13 to13 do13 the13 actual13 model13 parameter13 estimation13 is13 independent13 of13 R13 so13 that13 the13 user13 is13 free13 to13 use13 R13 for13 other13 purposesFor13 the13 Simulator13 the13 ldquorunrdquo13 function13 will13 execute13 the13 program13 directly13 within13 RFor13 all13 programs13 the13 ldquoparserdquo13 functions13 will13 extract13 the13 primary13 output13 from13 the13 program13 into13 meaningful13 R13 data13 objects13 13 For13 IT2B13 and13 NPAG13 this13 is13 done13 automatically13 at13 the13 end13 of13 a13 successful13 run13 and13 the13 objects13 are13 saved13 in13 the13 output13 subdirectory13 as13 IT2BoutRdata13 or13 NPAGoutRdata13 respectivelyFor13 IT2B13 and13 NPAG13 the13 ldquoloadrdquo13 functions13 can13 be13 used13 to13 load13 the13 above13 Rdata13 Ziles13 after13 a13 successful13 run13 13 The13 ldquoreportrdquo13 functions13 are13 automatically13 run13 at13 the13 end13 of13 a13 successful13 run13 and13 these13 will13 generate13 an13 HTML13 page13 with13 summaries13 of13 the13 run13 as13 well13 as13 the13 Rdata13 Ziles13 and13 other13 objects13 13 The13 default13 browser13 will13 be13 automatically13 launched13 for13 viewing13 of13 the13 HTML13 report13 pageWithin13 Pmetrics13 there13 are13 also13 functions13 to13 manipulate13 data13 csv13 Ziles13 and13 process13 and13 plot13 extracted13 databull Manipulate13 data13 csv13 Ziles13 PMreadMatrix13 PMcheck13 PMZixMatrix13 PMwriteMatrix13 PMmatrixRelTime13

PMwrk2csvbull Process13 data13 makeAUC13 makeCov13 makeCycle13 makeFinal13 makeOP13 makeNCA13 makeErrorPolybull Plot13 data13 plotPMcov13 plotPMcycle13 plotPMZinal13 plotPMmatrix13 plotPMop13 plotPMsim13 plotPMdiag13

plotPMptabull Model13 selection13 and13 diagnostics13 PMcompare13 plotPMop13 (with13 residual13 option)13 PMdiag13 PMstepbull Pmetrics13 function13 defaults13 PMwriteDefaultsAgain13 all13 functions13 have13 extensive13 help13 Ziles13 and13 examples13 which13 can13 be13 examined13 in13 R13 by13 using13 the13 help(command)13 or13 command13 syntax13 13

Customizing Pmetrics FunctionsWhen13 Pmetrics13 is13 loaded13 with13 a13 library(Pmetrics)13 command13 it13 will13 also13 load13 the13 Defaults13 package13 13 If13 not13 present13 it13 will13 automatically13 download13 it13 from13 CRAN13 13 This13 package13 allows13 you13 to13 change13 the13 default13 for13 any13 Pmetrics13 function13 argument13 13 See13 Defaults13 for13 more13 help13 but13 some13 key13 functions13 are13 summarized13 here

setDefaults(name) Where13 name13 is13 something13 like13 PMreadMatrix13 and13 is13 a13 list13 of13 arguments13 whose13 default13 you13 wish13 to13 change13 13 So13 if13 you13 want13 PMreadMatrix13 to13 read13 semicolon13 delimited13 Ziles13 by13 default13 instead13 of13 comma13 separated13 Ziles13 use13 setDefaults(PMreadMatrix delim=rdquordquo)

getDefaults()13 or13 getDefaults(name) 13 The13 Zirst13 command13 will13 list13 all13 functions13 that13 have13 alternative13 defaults13 and13 the13 second13 will13 list13 the13 alternatives13 for13 a13 given13 function13 13 unsetDefaults(name)13 13 Restores13 the13 defaults13 to13 normal13 for13 a13 given13 function

The13 above13 functions13 will13 manipulate13 defaults13 for13 a13 single13 session13 in13 R13 13 They13 are13 all13 included13 in13 the13 Defaults13 package13 13 If13 you13 want13 to13 make13 the13 defaults13 durable13 from13 session13 to13 session13 use13 the13 following13 function13 in13 PmetricsPMwriteDefaults()13 13 This13 will13 save13 your13 defaults13 and13 they13 will13 be13 restored13 every13 time13 you13 load13 Pmetrics

Userrsquos13 Guide13 13 613 13

Userrsquos13 Guide13 13 713 13

You13 supply13 these13 files13 Pmetrics13 does13 the13 rest

General WorkflowThe13 general13 Pmetrics13 workZlow13 for13 IT2B13 and13 NPAG13 is13 shown13 in13 the13 following13 diagram

Data13 csv13 file Model13 txt13 file

PreparaCon13 program

Engine13 program

InstrucCon13 file

Output

ITrun()

13 NPrun

()

ITload()13 NPload()

R13 is13 used13 to13 specify13 the13 working13 directory13 containing13 the13 data13 csv13 and13 model13 txt13 Ziles13 Through13 the13 batch13 Zile13 generated13 by13 R13 the13 preparation13 program13 is13 compiled13 and13 executed13 13 The13 instruction13 Zile13 is13 generated13 automatically13 by13 the13 contents13 of13 the13 data13 and13 model13 Ziles13 and13 by13 arguments13 to13 the13 NPrun()13 ITrun()13 or13 ERRrun()13 commands13 The13 batch13 Zile13 will13 then13 compile13 and13 execute13 the13 engine13 Zile13 according13 to13 the13 instructions13 which13 will13 generate13 several13 output13 Ziles13 upon13 completion13 13 Finally13 the13 batch13 Zile13 will13 call13 the13 R13 script13 to13 generate13 the13 summary13 report13 and13 several13 data13 objects13 including13 the13 IT2BoutRdata13 or13 NPAGoutRdata13 Ziles13 which13 can13 be13 loaded13 into13 R13 subsequently13 using13 ITload()13 or13 NPload()Both13 input13 Ziles13 (data13 model)13 are13 text13 Ziles13 which13 can13 be13 edited13 directly

Userrsquos13 Guide13 13 813 13

Pmetrics Input FilesData13 csv13 Files

Pmetrics13 accepts13 input13 as13 a13 spreadsheet13 ldquomatrixrdquo13 format13 It13 is13 designed13 for13 input13 of13 multiple13 records13 in13 a13 concise13 way13 13 Please13 keep13 the13 number13 of13 characters13 in13 the13 Uile13 name13 le13 8Files13 are13 in13 comma-shy‐separated-shy‐values13 (csv)13 format13 13 Examples13 of13 programs13 that13 can13 save13 csv13 Ziles13 are13 any13 text13 editor13 (eg13 TextEdit13 on13 Mac13 Notepad13 on13 Windows)13 or13 spreadsheet13 program13 (eg13 Excel)13 13 Click13 on13 hyperlinked13 items13 to13 see13 an13 explanation13 13

IMPORTANT13 The13 order13 capitalization13 and13 names13 of13 the13 header13 and13 the13 Zirst13 1213 columns13 are13 Zixed13 13 All13 entries13 must13 be13 numeric13 with13 the13 exception13 of13 ID13 and13 ldquordquo13 for13 non-shy‐required13 placeholder13 entries

POPDATA13 DEC13 11ID EVID TIME DUR DOSE ADDL II INPUT OUT OUTEQ C0 C1 C2 C3 COVhellipGH 1 0 0 400 1 GH 0 05 042 1 001 01 0 0GH 0 1 046 1 001 01 0 0GH 0 2 247 1 001 01 0 0GH 4 0 0 150 1 GH 1 35 05 150 1 001 01 0 0GH 0 512 055 1 001 01 0 0GH 0 24 052 1 001 01 0 01423 1 0 1 400 -shy‐1 12 1 1423 1 01 0 100 2 1423 0 1 -shy‐99 1 001 01 0 01423 0 2 038 1 001 01 0 01423 0 2 16 2 005 02 -shy‐011 0002POPDATA13 DEC_1113 13 This13 is13 the13 header13 for13 the13 Zile13 and13 must13 be13 in13 the13 Zirst13 line13 13 It13 identiZies13 the13 versionID13 13 This13 Zield13 must13 be13 preceded13 by13 the13 ldquordquo13 symbol13 to13 conZirm13 that13 this13 is13 the13 header13 row13 It13 can13 be13

numeric13 or13 character13 and13 identiZies13 each13 individual13 13 All13 rows13 must13 contain13 an13 ID13 and13 all13 records13 from13 one13 individual13 must13 be13 contiguous13 13 Any13 subsequent13 row13 that13 begins13 with13 ldquordquo13 will13 be13 ignored13 which13 is13 helpful13 if13 you13 want13 to13 exclude13 data13 from13 the13 analysis13 but13 preserve13 the13 integrity13 of13 the13 original13 dataset13 or13 to13 add13 comment13 lines13 13 IDs13 should13 be13 1113 characters13 or13 less13 but13 may13 be13 any13 alphanumeric13 combination13 13 There13 can13 be13 at13 most13 80013 subjects13 per13 run

EVID13 This13 is13 the13 event13 ID13 Zield13 13 It13 can13 be13 013 113 or13 413 13 Every13 row13 must13 have13 an13 entry13 013 =13 observation13 113 =13 input13 (eg13 dose)13 213 313 are13 currently13 unused13 413 =13 reset13 where13 all13 compartment13 values13 are13 set13 to13 013 and13 the13 time13 counter13 is13 reset13 to13 013 13 This13 is13

useful13 when13 an13 individual13 has13 multiple13 sampling13 episodes13 that13 are13 widely13 spaced13 in13 time13 with13 no13 new13 information13 gathered13 13 This13 is13 a13 dose13 event13 so13 dose13 information13 needs13 to13 be13 complete

TIME13 This13 is13 the13 elapsed13 time13 in13 decimal13 hours13 since13 the13 Zirst13 event13 13 It13 is13 not13 currently13 clock13 time13 (eg13 2130)13 although13 this13 is13 planned13 13 Every13 row13 must13 have13 an13 entry13 and13 within13 a13 given13 ID13 rows13 must13 be13 sorted13 chronologically13 earliest13 to13 latest13 13

DUR13 This13 is13 the13 duration13 of13 an13 infusion13 in13 hours13 13 If13 EVID=113 there13 must13 be13 an13 entry13 otherwise13 it13 is13 ignored13 13 For13 a13 bolus13 (ie13 an13 oral13 dose)13 set13 the13 value13 equal13 to13 0

Userrsquos13 Guide13 13 913 13

DOSE13 This13 is13 the13 dose13 amount13 13 If13 EVID=113 there13 must13 be13 an13 entry13 otherwise13 it13 is13 ignoredADDL13 This13 speciZies13 the13 number13 of13 additional13 doses13 to13 give13 at13 interval13 II13 13 It13 may13 be13 missing13 for13 dose13

events13 (EVID=113 or13 4)13 in13 which13 case13 it13 is13 assumed13 to13 be13 013 13 It13 is13 ignored13 for13 observation13 (EVID=0)13 events13 13 Be13 sure13 to13 adjust13 the13 time13 entry13 for13 the13 subsequent13 row13 if13 necessary13 to13 account13 for13 the13 extra13 doses13 13 If13 set13 to13 -shy‐113 the13 dose13 is13 assumed13 to13 be13 given13 under13 steady-shy‐state13 conditions13 13 ADDL=-shy‐113 can13 only13 be13 used13 for13 the13 Zirst13 dose13 event13 for13 a13 given13 subject13 or13 an13 EVID=413 event13 as13 you13 cannot13 suddenly13 be13 at13 steady13 state13 in13 the13 middle13 of13 dosing13 record13 unless13 all13 compartmentstimes13 are13 reset13 to13 013 (as13 for13 an13 EVID=413 event)

II13 This13 is13 the13 interdose13 interval13 and13 is13 only13 relevant13 if13 ADDL13 is13 not13 equal13 to13 013 in13 which13 case13 it13 cannot13 be13 missing13 13 If13 ADDL=013 or13 is13 missing13 II13 is13 ignored

INPUT13 This13 deZines13 which13 input13 (ie13 drug)13 the13 DOSE13 corresponds13 to13 13 Inputs13 are13 deZined13 in13 the13 model13 Zile

OUT 13 This13 is13 the13 observation13 or13 output13 value13 13 If13 EVID=013 there13 must13 be13 an13 entry13 if13 missing13 this13 must13 be13 coded13 as13 -shy‐9913 13 It13 will13 be13 ignored13 for13 any13 other13 EVID13 and13 therefore13 can13 be13 ldquordquo13 13 There13 can13 be13 at13 most13 15013 observations13 for13 a13 given13 subject

OUTEQ13 This13 is13 the13 output13 equation13 number13 that13 corresponds13 to13 the13 OUT13 value13 13 Output13 equations13 are13 deZined13 in13 the13 model13 Zile

C013 C113 C213 C313 These13 are13 the13 coefZicients13 for13 the13 assay13 error13 polynomial13 for13 that13 observation13 13 Each13 subject13 may13 have13 up13 to13 one13 set13 of13 coefZicients13 per13 output13 equation13 13 If13 more13 than13 one13 set13 is13 detected13 for13 a13 given13 subject13 and13 output13 equation13 the13 last13 set13 will13 be13 used13 13 If13 there13 are13 no13 available13 coefZicients13 these13 cells13 may13 be13 left13 blank13 or13 Zilled13 with13 ldquordquo13 as13 a13 placeholder

COV13 Any13 column13 after13 the13 assay13 error13 coefZicients13 is13 assumed13 to13 be13 a13 covariate13 one13 column13 per13 covariate

Model13 Files

Model13 Ziles13 for13 Pmetrics13 are13 ultimately13 Fortran13 text13 Ziles13 with13 a13 header13 version13 of13 TSMULT13 13 As13 of13 Pmetrics13 version13 03013 we13 have13 adopted13 a13 very13 simple13 user13 format13 that13 Pmetrics13 will13 use13 to13 generate13 the13 Fortran13 code13 automatically13 for13 you13 13 Version13 0413 additionally13 eliminates13 the13 previously13 separate13 instruction13 Zile13 A13 model13 library13 is13 available13 on13 our13 website13 at13 httpwwwlapkorgpmetricsphp13 13 Naming13 your13 model13 files13 The13 default13 model13 Zile13 name13 is13 ldquomodeltxtrdquo13 but13 you13 can13 call13 them13 whatever13 you13 wish13 13 However13 please13 keep13 the13 number13 of13 characters13 in13 the13 model13 Uile13 name13 le13 813 When13 you13 use13 a13 model13 Zile13 in13 NPrun() ITrun ERRrun() or SIMrun()13 Pmetrics13 will13 make13 a13 Fortran13 model13 Zile13 of13 the13 same13 name13 temporarily13 renaming13 your13 Zile13 13 At13 the13 end13 of13 the13 run13 your13 original13 model13 Zile13 will13 be13 in13 the13 inputs13 subfolder13 of13 the13 run13 folder13 and13 the13 generated13 Fortran13 model13 Zile13 will13 be13 called13 ldquomodelforrdquo13 and13 moved13 to13 the13 etc13 subfolder13 of13 the13 run13 folder13 13 If13 your13 model13 is13 called13 ldquomymodeltxtrdquo13 then13 the13 Fortran13 Zile13 will13 be13 ldquomymodelforrdquoYou13 can13 still13 use13 appropriate13 Fortran13 model13 Ziles13 directly13 but13 we13 suggest13 you13 keep13 the13 for13 extension13 for13 all13 Fortran13 Ziles13 to13 avoid13 confusion13 with13 the13 new13 format13 13 If13 you13 use13 a13 for13 Zile13 as13 your13 model13 you13 will13 have13 to13 specify13 its13 name13 explicitly13 in13 the13 NPrun() ITrun ERRrun() or SIMrun()13 command13 since13 the13 default13 model13 name13 again13 is13 ldquomodeltxtrdquo13 13 If13 you13 use13 a13 for13 Zile13 directly13 it13 will13 be13 in13 the13 inputs13 subfolder13 of13 the13 run13 folder13 not13 in13 etc13 since13 you13 did13 not13 use13 the13 simpler13 template13 as13 your13 model13 Zile

Structure13 of13 model13 files13 The13 new13 model13 Zile13 is13 a13 text13 Zile13 with13 1113 blocks13 each13 marked13 by13 13 followed13 by13 a13 header13 tagPRImary13 variablesCOVariatesSECcondary13 variablesBOLus13 inputsINItial13 conditions

Userrsquos13 Guide13 13 1013 13

F13 (bioavailability)LAG13 timeDIFferential13 equationsOUTputsERRorEXTraFor13 each13 header13 only13 the13 capital13 letters13 are13 required13 for13 recognition13 by13 Pmetrics13 The13 blocks13 can13 be13 in13 any13 order13 and13 header13 names13 are13 case-shy‐insensitive13 (ie13 the13 capitalization13 here13 is13 just13 to13 show13 which13 letters13 are13 required)13 Fortran13 is13 also13 case-shy‐insensitive13 so13 in13 variable13 names13 and13 expressions13 case13 is13 ignored13 13 Details13 of13 each13 block13 are13 next13 followed13 by13 a13 complete13 example

Primary13 variables

Primary13 variables13 are13 the13 model13 parameters13 that13 are13 to13 be13 estimated13 by13 Pmetrics13 or13 are13 designated13 as13 Zixed13 parameters13 with13 user13 speciZied13 values13 It13 should13 be13 a13 list13 of13 variable13 names13 one13 name13 to13 a13 line13 Variable13 names13 should13 be13 1113 characters13 or13 fewer13 Some13 variable13 names13 are13 reserved13 for13 use13 by13 Pmetrics13 and13 cannot13 be13 used13 as13 primary13 variable13 names13 13 13 The13 number13 of13 primary13 variables13 must13 be13 between13 213 and13 3213 with13 at13 most13 3013 random13 or13 2013 Uixed13 13 On13 each13 row13 following13 the13 variable13 name13 include13 the13 range13 for13 the13 parameter13 that13 deZines13 the13 search13 space13 13 For13 NPAG13 this13 is13 absolute13 ie13 the13 algorithm13 will13 not13 search13 outside13 this13 range13 13 For13 IT2B13 the13 range13 is13 a13 starting13 range13 13 The13 simulator13 will13 ignore13 the13 ranges13 ExamplePriKE13 013 5V13 00113 100KA13 013 5KCP13 013 5KPC13 013 13 5Tlag113 013 2IC313 013 10000FA113 013 1

Covariates

Covariates13 are13 subject13 speciZic13 data13 such13 as13 body13 weight13 contained13 in13 the13 data13 csv13 Zile13 The13 covariate13 names13 which13 are13 the13 column13 names13 in13 the13 data13 Zile13 can13 be13 included13 here13 for13 use13 in13 secondary13 variable13 equations13 The13 order13 should13 be13 the13 same13 as13 in13 the13 data13 Zile13 and13 although13 the13 names13 do13 not13 have13 to13 be13 the13 same13 we13 strongly13 encourage13 you13 to13 make13 them13 the13 same13 to13 avoid13 confusionCovariates13 are13 applied13 at13 each13 dose13 event13 13 The13 Zirst13 dose13 event13 for13 each13 subject13 must13 have13 a13 value13 for13 every13 covariate13 in13 the13 data13 Zile13 13 By13 default13 missing13 covariate13 values13 for13 subsequent13 dose13 events13 are13 linearly13 interpolated13 between13 existing13 values13 or13 carried13 forward13 if13 the13 Zirst13 value13 is13 the13 only13 non-shy‐missing13 entry13 13 To13 suppress13 interpolation13 and13 carry13 forward13 the13 previous13 value13 in13 a13 piece-shy‐wise13 constant13 fashion13 include13 an13 exclamation13 point13 ()13 in13 any13 declaration13 lineNote13 that13 any13 covariate13 relationship13 to13 any13 parameter13 may13 be13 described13 as13 the13 user13 wishes13 by13 mathematical13 equations13 and13 Fortran13 code13 allowing13 for13 exploration13 of13 complex13 non-shy‐linear13 time-shy‐dependent13 andor13 conditional13 relationshipsExampleCovwtcypIC()

Userrsquos13 Guide13 13 1113 13

where13 IC13 will13 be13 piece-shy‐wise13 constant13 and13 the13 other13 two13 will13 be13 linearly13 interpolated13 for13 missing13 values

Secondary13 variables

Secondary13 variables13 are13 those13 that13 are13 deZined13 by13 equations13 that13 are13 combinations13 of13 primary13 covariates13 and13 other13 secondary13 variables13 If13 using13 other13 secondary13 variables13 deZine13 them13 Zirst13 within13 this13 block13 Equation13 syntax13 must13 be13 Fortran13 It13 is13 permissible13 to13 have13 conditional13 statements13 but13 because13 expressions13 in13 this13 block13 are13 translated13 into13 variable13 declarations13 in13 Fortran13 expressions13 other13 than13 of13 the13 form13 X13 =13 function(Y)13 must13 be13 preZixed13 by13 a13 +13 and13 contain13 only13 variables13 which13 have13 been13 previously13 deZined13 in13 the13 Primary13 Covariate13 or13 Secondary13 blocksExampleSecCL13 =13 Ke13 13 V13 13 wt075+IF(cyp13 GT13 1)13 CL13 =13 CL13 13 cyp

Bolus13 inputs

By13 default13 inputs13 with13 DUR13 (duration)13 of13 013 in13 the13 data13 csv13 Zile13 are13 delivered13 instantaneously13 to13 the13 model13 compartment13 equal13 to13 the13 input13 number13 ie13 input13 113 goes13 to13 compartment13 113 input13 213 goes13 to13 compartment13 213 etc13 This13 can13 be13 overridden13 with13 NBOLUS(input13 number)13 =13 compartment13 numberExampleBolNBCOMP(1)13 =13 2

Ini1al13 condi1ons

By13 default13 all13 model13 compartments13 have13 zero13 amounts13 at13 time13 013 This13 can13 be13 changed13 by13 specifying13 the13 compartment13 amount13 as13 X()13 =13 expression13 where13 13 is13 the13 compartment13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignoredExampleIniX(2)13 =13 ICV13 (ie13 IC13 is13 a13 covariate13 with13 the13 measured13 trough13 concentration13 prior13 to13 an13 observed13 dose)X(3)13 =13 IC313 (ie13 IC313 is13 a13 Zitted13 amount13 in13 this13 unobserved13 compartment)In13 the13 Zirst13 case13 the13 initial13 condition13 for13 compartment13 213 becomes13 the13 value13 of13 the13 IC13 covariate13 (deZined13 in13 Covariate13 block)13 multiplied13 by13 the13 current13 estimate13 of13 V13 during13 each13 iteration13 13 This13 is13 useful13 when13 a13 subject13 has13 been13 taking13 a13 drug13 as13 an13 outpatient13 and13 comes13 in13 to13 the13 lab13 for13 PK13 sampling13 with13 measurement13 of13 a13 concentration13 immediately13 prior13 to13 a13 witnessed13 dose13 which13 is13 in13 turn13 followed13 by13 more13 sampling13 13 In13 this13 case13 IC13 or13 any13 other13 covariate13 can13 be13 set13 to13 the13 initial13 measured13 concentration13 and13 if13 V13 is13 the13 volume13 of13 compartment13 213 the13 initial13 condition13 (amount)13 in13 compartment13 213 will13 now13 be13 set13 to13 the13 measured13 concentration13 of13 drug13 multiplied13 by13 the13 estimated13 volume13 for13 each13 iteration13 until13 convergenceIn13 the13 second13 case13 the13 initial13 condition13 for13 compartment13 313 becomes13 another13 variable13 IC313 deZined13 in13 the13 Primary13 block13 to13 Zit13 in13 the13 model13 given13 the13 observed13 data

F13 (bioavailability)

Specify13 the13 bioavailability13 term13 if13 present13 Use13 the13 form13 FA()13 =13 expression13 where13 13 is13 the13 input13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignored

Userrsquos13 Guide13 13 1213 13

ExampleFFA(1)13 =13 FA1

Lag13 1me

Specify13 the13 lag13 term13 if13 present13 which13 is13 the13 delay13 after13 an13 absorbed13 dose13 before13 observed13 concentrations13 Use13 the13 form13 TLAG()13 =13 expression13 where13 13 is13 the13 input13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignoredExampleLagTLAG(1)13 =13 Tlag1

Differen1al13 equa1ons

Specify13 a13 model13 in13 terms13 of13 ordinary13 differential13 equations13 in13 Fortran13 format13 XP()13 is13 the13 notation13 for13 dX()dt13 where13 13 is13 the13 compartment13 number13 X()13 is13 the13 amount13 in13 the13 compartment13 There13 can13 be13 a13 maximum13 of13 2013 such13 equationsExampleDifXP(1)13 =13 -shy‐KAX(1)XP(2)13 =13 RATEIV(1)13 +13 KAX(1)13 -shy‐13 (KE+KCP)X(2)13 +13 KPCX(3)XP(3)13 =13 KCPX(2)13 -shy‐13 KPCX(3)RATEIV(1)13 is13 the13 notation13 to13 indicate13 an13 infusion13 of13 input13 113 (typically13 drug13 1)13 13 The13 duration13 of13 the13 infusion13 and13 total13 dose13 is13 deZined13 in13 the13 data13 csv13 Zile13 Up13 to13 713 inputs13 are13 currently13 allowed13 13 These13 can13 be13 used13 in13 the13 model13 Zile13 as13 RATEIV(1)13 RATEIV(2)13 etc13 13 The13 compartments13 for13 13 receiving13 the13 inputs13 of13 oral13 (bolus)13 doses13 are13 deZined13 in13 the13 Bolus13 block

Outputs

Output13 equations13 in13 Fortran13 format13 Outputs13 are13 of13 the13 form13 Y()13 =13 expression13 where13 13 is13 the13 output13 equation13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignored13 There13 can13 be13 a13 maximum13 of13 613 outputs13 13 They13 are13 referred13 to13 as13 Y(1)13 Y(2)13 etcExampleOutY(1)13 =13 X(2)V

Error

This13 block13 contains13 all13 the13 information13 Pmetrics13 requires13 for13 the13 structure13 of13 the13 error13 model13 13 In13 Pmetrics13 each13 observation13 is13 weighted13 by13 1error213 13 13 There13 are13 two13 choices13 for13 the13 error13 term

113 13 error13 =13 SD13 13 gamma213 13 error13 =13 (SD213 +13 lamda2)0513 (Note13 that13 lambda13 is13 only13 available13 in13 NPAG13 currently)

where13 SD13 is13 the13 standard13 deviation13 (SD)13 of13 each13 observation13 [obs]13 and13 gamma13 and13 lambda13 are13 terms13 to13 capture13 extra13 process13 noise13 related13 to13 the13 observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 SD13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 The13 13 values13 for13 the13 coefZicients13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13

Userrsquos13 Guide13 13 1313 13

coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly() 13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0In13 the13 multiplicative13 model13 13 gamma13 is13 a13 scalar13 on13 SD13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 Lambda13 is13 an13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 We13 tend13 to13 prefer13 lambda

To13 specify13 the13 model13 in13 this13 block13 the13 Zirst13 line13 needs13 to13 be13 either13 L=[number]13 or13 G=[number]13 for13 a13 lambda13 or13 gamma13 error13 model13 13 The13 [number]13 term13 is13 the13 starting13 value13 for13 lambda13 or13 gamma13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present13 13 For13 gamma13 good13 starting13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality13 13 If13 you13 include13 an13 exclamation13 point13 ()13 in13 the13 declaration13 then13 lambda13 or13 gamma13 will13 be13 Zixed13 and13 not13 estimated13 13 Note13 that13 you13 can13 only13 Zix13 lambda13 currently13 to13 zeroThe13 next13 line(s)13 contain13 the13 values13 for13 C013 C113 C213 and13 C313 separated13 by13 commas13 13 There13 should13 be13 one13 line13 of13 coefZicients13 for13 each13 output13 equation13 13 By13 default13 Pmetrics13 will13 use13 values13 for13 these13 coefZicients13 found13 in13 the13 data13 Zile13 13 If13 none13 are13 present13 or13 if13 the13 model13 declaration13 line13 contains13 an13 exclamation13 point13 ()13 the13 values13 here13 will13 be13 used

Example13 113 estimated13 lambda13 starting13 at13 0413 one13 output13 use13 data13 Zile13 coefZicients13 but13 if13 missing13 use13 010100ErrL=04010100

Example13 213 Zixed13 gamma13 of13 213 two13 outputs13 use13 data13 Zile13 coefZicients13 but13 if13 missing13 use13 01010013 for13 the13 Zirst13 output13 but13 use13 0313 0113 013 013 for13 output13 213 regardless13 of13 what13 is13 in13 the13 data13 ZileErrG=2010100030100

Extra

This13 block13 is13 for13 advanced13 Fortran13 programmers13 only13 13 Occasionally13 for13 very13 complex13 models13 additional13 Fortran13 subroutines13 are13 required13 13 They13 can13 be13 placed13 here13 13 The13 code13 must13 specify13 complete13 Fortran13 subroutines13 which13 can13 be13 called13 from13 other13 blocks13 with13 appropriate13 call13 functions13 13

Reserved13 Names

The13 following13 cannot13 be13 used13 as13 primary13 covariate13 or13 secondary13 variable13 names13 They13 can13 be13 used13 in13 equations13 however

Reserved13 Variable Func1on13 in13 Pmetricsndim internal

t time

Userrsquos13 Guide13 13 1413 13

x array13 of13 compartment13 amounts

xp array13 of13 Zirst13 derivative13 of13 compartment13 amounts

rpar internal

ipar internal

p array13 of13 primary13 parameters

r input13 rates

b input13 boluses

npl internal

numeqt output13 equation13 number

ndrug input13 number

nadd covariate13 number

rateiv intravenous13 input13 for13 inputs13 when13 DURgt013 in13 data13 Ziles

cv covariate13 values13 array

n number13 of13 compartments

nd internal

ni internal

nup internal

nuic internal

np number13 of13 primary13 parameters

nbcomp bolus13 compartment13 array

psym names13 of13 primary13 parameters

fa biovailability

tlag lag13 time

tin internal

tout internal

Complete13 Example

Here13 is13 a13 complete13 example13 of13 a13 model13 Zile13 as13 of13 Pmetrics13 version13 04013 and13 higher

Userrsquos13 Guide13 13 1513 13

NotesBy13 omitting13 a13 Diffeq13 block13 with13 ODEs13 Pmetrics13 understands13 that13 you13 are13 specifying13 the13 model13 to13 be13 solved13 algebraically13 In13 this13 case13 at13 least13 KE13 and13 V13 must13 be13 in13 the13 Primary13 or13 Secondary13 variables13 KA13 KCP13 and13 KPC13 are13 optional13 and13 specify13 absorption13 and13 transfer13 to13 and13 from13 the13 central13 to13 a13 peripheral13 compartment13 respectively

PriKE13 013 5V013 0113 100KA13 013 5Tlag113 013 3Cov13 wt

SecV13 =13 V0wt

LagTLAG(1)13 =13 Tlag1

OutY(1)13 =13 X(2)V

ErrL=04010100

Userrsquos13 Guide13 13 1613 13

Brief13 Fortran13 Tutorial

Much13 more13 detailed13 help13 is13 available13 from13 httpwwwcsmtuedu~sheneCOURSEScs201NOTESfortranhtml

Arithmetic Operator Meaning

+ addition

- subtraction

multiplication

division

exponentiation

Relational Operator Alternative Operator Meaning

lt LT less than

lt= LE less than or equal

gt GT greater than

gt= GE greater than or equal

== EQ equal

= NE not equal

Selective Execution Example

IF (logical-expression) one-statement IF (T gt= 100) CL = 10

IF (logical-expression) THEN statementsEND IF

IF (T gt= 100) THEN CL = 10 V = 10END IF

IF (logical-expression) THEN statements-1ELSE statements-2END IF

IF (T gt= 100) THEN CL = 10ELSE CL = CLEND IF

Userrsquos13 Guide13 13 1713 13

How to use R and PmetricsSeCng13 up13 a13 Pmetrics13 project

When13 beginning13 a13 new13 modeling13 project13 it13 is13 convenient13 to13 use13 the13 command13 PMtree(ldquoproject namerdquo)13 13 This13 command13 will13 set13 up13 a13 new13 directory13 in13 the13 current13 working13 directory13 named13 whatever13 you13 have13 included13 as13 the13 ldquoproject13 namerdquo13 13 For13 example13 a13 directory13 called13 ldquoDrugXrdquo13 will13 be13 created13 by13 PMtree(ldquoDrugXrdquo)13 13 Beneath13 this13 directory13 several13 subdirectories13 will13 be13 also13 created13 Rscript13 Runs13 Sim13 and13 src13 13 The13 Rscript13 subdirectory13 will13 contain13 a13 skeleton13 R13 script13 to13 begin13 Pmetrics13 runs13 in13 the13 new13 project13 13 The13 Runs13 subdirectory13 should13 contain13 all13 Ziles13 required13 for13 a13 run13 (described13 next)13 and13 it13 will13 also13 contain13 the13 resulting13 numerically13 ordered13 run13 directories13 created13 after13 each13 Pmetrics13 NPAG13 or13 IT2B13 run13 13 The13 Sim13 subdirectory13 can13 contain13 any13 Ziles13 related13 to13 simulations13 and13 the13 src13 subdirectory13 should13 contain13 original13 and13 manipulated13 source13 data13 Ziles13 13 Of13 course13 you13 are13 free13 to13 edit13 this13 directory13 tree13 structure13 as13 you13 please13 or13 make13 your13 own13 entirely

GeCng13 the13 required13 files13 to13 run13 Pmetrics

When13 you13 wish13 to13 execute13 a13 Pmetrics13 run13 you13 must13 ensure13 that13 appropriate13 Pmetrics13 model13 txt13 and13 data13 csv13 Ziles13 are13 in13 the13 working13 directory13 ie13 the13 Runs13 subdirectory13 of13 the13 project13 directory13 13 13 13 R13 can13 be13 used13 to13 help13 prepare13 the13 data13 csv13 Zile13 by13 importing13 and13 manipulating13 spreadsheets13 (eg13 readcsv())13 13 The13 Pmetrics13 function13 PMcheck()13 can13 be13 used13 to13 check13 a13 csv13 Zile13 or13 an13 R13 dataframe13 that13 is13 to13 be13 saved13 as13 a13 Pmetrics13 data13 13 csv13 Zile13 for13 errors13 13 13 13 13 13 It13 can13 also13 check13 a13 model13 Zile13 for13 errors13 in13 the13 context13 of13 a13 dataZile13 eg13 covariates13 that13 do13 not13 match13 13 PMfixMatrix()13 attempts13 to13 automatically13 rid13 data13 Ziles13 of13 errors13 13 The13 function13 PMwriteMatrix() 13 can13 be13 used13 to13 write13 the13 R13 data13 object13 in13 the13 correct13 format13 for13 use13 by13 IT2B13 NPAG13 or13 the13 Simulator13 13 You13 can13 also13 download13 sample13 data13 and13 scripts13 from13 the13 Pmetrics13 downloads13 section13 of13 our13 website13 once13 you13 sign13 in13 with13 your13 LAPK13 user13 email13 address13 and13 password13 13 Edit13 prior13 versions13 of13 model13 Ziles13 to13 make13 new13 model13 Ziles

Using13 scripts13 to13 control13 Pmetrics

As13 you13 will13 see13 in13 the13 skeleton13 R13 script13 made13 by13 PMtree() and13 placed13 in13 the13 Rscript13 subdirectory13 if13 this13 is13 a13 Zirst-shy‐time13 run13 the13 R13 commands13 to13 run13 IT2B13 or13 NPAG13 are13 as13 follows13 13 Recall13 that13 the13 ldquordquo13 character13 is13 a13 comment13 character

library(Pmetrics)Run 1 - add your run description heresetwd(ldquoworking directoryrdquo)NPrun() for NPAG or ITrun() for IT2B

The13 Zirst13 line13 will13 load13 the13 Pmetrics13 library13 of13 functions13 13 The13 second13 line13 sets13 the13 working13 directory13 to13 the13 speciZied13 path13 13 The13 third13 line13 generates13 the13 batch13 Zile13 to13 run13 NPAG13 or13 IT2B13 and13 saves13 it13 to13 the13 working13 directory13

NOTE13 13 On13 Mac13 systems13 the13 batch13 Zile13 will13 be13 automatically13 launched13 in13 a13 Terminal13 window13 13 On13 Windows13 systems13 the13 batch13 Zile13 must13 be13 launched13 manually13 by13 double13 clicking13 the13 np_runbat13 or13 it_runbat13 Zile13 in13 the13 working13 directory

ITrun() 13 and13 NPrun()13 both13 return13 the13 full13 path13 of13 the13 output13 directory13 to13 the13 clipboard13 13 By13 default13 runs13 are13 placed13 in13 folders13 numbered13 sequentially13 beginning13 with13 ldquo1rdquoNow13 the13 output13 of13 IT2B13 or13 NPAG13 needs13 to13 be13 loaded13 into13 R13 so13 the13 next13 command13 does13 this

NPload(run_number) or ITload(run_number)

Details13 of13 these13 commands13 and13 what13 is13 loaded13 are13 described13 in13 the13 R13 documentation13 (NPload 13 or13 ITload)13 and13 in13 the13 following13 section13 13 The13 run_number13 should13 be13 included13 within13 the13 parentheses13 to13 be13 appended13 to13 the13 names13

Userrsquos13 Guide13 13 1813 13

of13 loaded13 R13 objects13 allowing13 for13 comparison13 between13 runs13 eg13 NPload(1)13 13 Finally13 at13 this13 point13 other13 Pmetrics13 commands13 can13 be13 added13 to13 the13 script13 to13 process13 the13 data13 such13 as13 the13 following

plot(final1)plot(cycle1)plot(op1type=rdquopoprdquo) or plot(op1$pop1)plot(op1) default is to plot posterior predictions for output 1plot(op1type=rdquopoprdquoresid=T)

Of13 course13 the13 full13 power13 of13 R13 can13 be13 used13 in13 scripts13 to13 analyze13 data13 but13 these13 simple13 statements13 serve13 as13 examplesIf13 you13 do13 not13 use13 the13 PMtree() structure13 we13 suggest13 that13 the13 R13 script13 for13 a13 particular13 project13 be13 saved13 into13 a13 folder13 called13 ldquoRscriptrdquo13 or13 some13 other13 meaningful13 name13 in13 the13 working13 directory13 13 Folders13 are13 not13 be13 moved13 by13 the13 batch13 Zile13 13 Within13 the13 script13 number13 runs13 sequentially13 and13 use13 comments13 liberally13 to13 13 distinguish13 runs13 as13 shown13 below

library(Pmetrics)

Run 1 - Ka Kel V all subjectssetwd(ldquoworking directoryrdquo)NPrun() assumes model=rdquomodeltxtrdquo and data=rdquodatacsvrdquoNPload(1)

Remember13 in13 R13 that13 the13 command13 example(function) will13 provide13 examples13 for13 the13 speciZied13 function13 13 Most13 Pmetrics13 functions13 have13 examples

Pmetrics Data ObjectsAfter13 a13 successful13 IT2B13 or13 NPAG13 run13 an13 R13 dataZile13 is13 saved13 in13 the13 output13 subdirectory13 of13 the13 newly13 created13 numerically13 ordered13 folder13 in13 the13 working13 directory13 13 After13 IT2B13 this13 Zile13 is13 called13 ldquoIT2BoutRdatardquo13 and13 after13 NPAG13 it13 is13 called13 ldquoNPAGoutRdatardquo13 13 As13 mentioned13 in13 the13 previous13 section13 these13 data13 Ziles13 can13 be13 loaded13 by13 ensuring13 that13 the13 Runs13 folder13 is13 set13 as13 the13 working13 directory13 and13 then13 using13 the13 Pmetrics13 commands13 ITload(run_num)13 or13 NPload(run_num)

Both13 commands13 load13 their13 respective13 Rdata13 Ziles13 into13 R13 making13 the13 contained13 objects13 available13 for13 plotting13 and13 other13 analysisObjects13 loaded13 by13 ITload(run_num) and NPload(run_num)

Objects Variables Comments

op13 (class13 PMop13 list) $pop113 $post113 Population13 and13 posterior13 predictions13 for13 each13 output13 equation13 ie13 113 213

13 $id Subject13 identiZication

13 $time Observation13 time13 in13 relative13 decimal13 hours

13 $obs Observation

13 $pred Prediction13 based13 on13 median13 of13 population13 or13 posterior13 parameter13 value13 distributions

Userrsquos13 Guide13 13 1913 13

Objects Variables Comments

13 $block Dosing13 block13 usually13 113 unless13 data13 Zile13 contains13 EVID=413 dose13 reset13 events13 in13 which13 case13 each13 such13 reset13 within13 a13 given13 ID13 will13 increment13 the13 dosing13 block13 by13 113 for13 that13 ID

13 $obsSD Calculated13 standard13 deviation13 (error)13 of13 the13 observation13 based13 on13 the13 assay13 error13 polynomial

13 $d Difference13 between13 pred13 and13 obs

13 $ds Squared13 difference13 between13 pred13 and13 obs

13 $wd $d13 weighted13 by13 the13 $obsSD

13 $wds $ds13 weighted13 by13 the13 $obsSD

Zinal13 (class13 PMZinal13 list) $popPoints (NPAG13 only)13 Dataframe13 of13 the13 Zinal13 cycle13 joint13 population13 density13 of13 grid13 points13 with13 column13 names13 equal13 to13 the13 name13 of13 each13 random13 parameter13 plus13 $prob13 for13 the13 associated13 probability13 of13 that13 point13

$popMean The13 Zinal13 cycle13 mean13 for13 each13 random13 parameter13 distribution

$popSD The13 Zinal13 cycle13 standard13 deviation13 for13 each13 random13 parameter13 distribution

$popCV The13 Zinal13 cycle13 coefZicient13 of13 variation13 for13 each13 random13 parameter13 distribution

$popVar The13 Zinal13 cycle13 variance13 for13 each13 random13 parameter13 distribution

$popCov The13 Zinal13 cycle13 covariance13 matrix13 for13 each13 random13 parameter13 distribution

$popCor The13 Zinal13 cycle13 correlation13 matrix13 for13 each13 random13 parameter13 distribution

$popMedian The13 Zinal13 cycle13 median13 for13 each13 random13 parameter13 distribution

$gridpts (NPAG13 only)13 The13 initial13 number13 of13 support13 points

$ab Matrix13 of13 boundaries13 for13 random13 parameter13 values13 13 For13 NPAG13 this13 is13 speciZied13 by13 the13 user13 prior13 to13 the13 run13 for13 IT2B13 it13 is13 calculated13 as13 a13 user13 speciZied13 multiple13 of13 the13 SD13 for13 the13 parameter13 value13 distribution

Userrsquos13 Guide13 13 2013 13

Objects Variables Comments

cycle13 (class13 PMcycle13 list) $names Vector13 of13 names13 of13 the13 random13 parameters

$ll Matrix13 of13 cycle13 number13 and13 -shy‐2Log-shy‐likelihood13 at13 each13 cycle

$gamlam A13 matrix13 of13 cycle13 number13 and13 gamma13 or13 lambda13 at13 each13 cycle13 (see13 item13 1613 under13 NPAG13 Runs13 below13 for13 a13 discussion13 of13 gamma13 and13 lambda)

$mean A13 matrix13 of13 cycle13 number13 and13 the13 mean13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 mean

$sd A13 matrix13 of13 cycle13 number13 and13 the13 standard13 deviation13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$median A13 matrix13 of13 cycle13 number13 and13 the13 median13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$aic A13 matrix13 of13 cycle13 number13 and13 Akaike13 Information13 Criterion13 at13 each13 cycle

$bic A13 matrix13 of13 cycle13 number13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle

cov13 (class13 PMcov13 dataframe)

$id Subject13 identiZication

$time Time13 for13 each13 covariate13 entry

covariates Covariate13 values13 for13 each13 subject13 at13 each13 time13 extracted13 from13 the13 raw13 data13 Zile

parameters Mean13 median13 or13 mode13 of13 Bayesian13 posterior13 distribution13 for13 each13 random13 parameter13 in13 the13 model13 13 Mode13 summaries13 are13 available13 for13 NPAG13 output13 only13 and13 the13 default13 is13 median13 13 Values13 are13 recycled13 for13 each13 row13 within13 a13 given13 subject13 with13 the13 number13 of13 rows13 driven13 by13 the13 number13 of13 covariate13 entries

Userrsquos13 Guide13 13 2113 13

Objects Variables Comments

pop13 (class13 PMpop13 dataframe)

post13 (class13 PMpost13 dataframe)

NPAG13 only

$id Subject13 identiZication

$pred113 Population13 prior13 (PMpop)13 or13 Bayesian13 posterior13 (PMpost)13 predictions13 for13 each13 output13 equation13 based13 on13 mean13 median13 and13 mode13 as13 speciZied13 by13 the13 user13 and13 with13 frequency13 also13 speciZied13 by13 the13 user13 in13 the13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

$block Same13 as13 for13 PMop13 objects13 above

NPdata13 (class13 NPAG13 list)13 ITdata13 (class13 IT2B13 list

Raw13 data13 used13 to13 make13 the13 above13 objects13 13 Please13 use13 NPparse13 or13 ITparse13 in13 R13 for13 discussion13 of13 the13 data13 contained13 in13 these13 objects

Since13 R13 is13 an13 object13 oriented13 language13 to13 access13 the13 observations13 in13 a13 PMop13 object13 for13 example13 use13 the13 following13 syntax13 op$post1$obsNote13 that13 you13 will13 place13 an13 integer13 within13 the13 parentheses13 of13 the13 loading13 functions13 eg13 NPload(1)13 which13 will13 sufZix13 all13 the13 above13 objects13 with13 that13 integer13 eg13 op113 Zinal113 NPdata113 13 This13 allows13 several13 models13 to13 be13 loaded13 into13 R13 simultaneously13 each13 with13 a13 unique13 sufZix13 and13 which13 can13 be13 compared13 with13 the13 PMcompare()13 command13 (see13 Model13 Diagnostics13 below)

Making New Pmetrics ObjectsOnce13 you13 have13 loaded13 the13 raw13 (NPdata13 or13 ITdata)13 or13 processed13 (op13 Uinal13 cycle13 pop13 post)13 data13 objects13 described13 above13 with13 NPload(run_num)13 or13 ITload(run_num)13 should13 you13 wish13 to13 remake13 the13 processed13 objects13 with13 parameters13 other13 than13 the13 defaults13 you13 can13 easily13 do13 so13 with13 the13 make 13 family13 of13 commands13 13 For13 example13 the13 default13 for13 PMop13 observed13 vs13 predicted13 objects13 is13 to13 use13 the13 prediction13 based13 on13 the13 median13 of13 the13 population13 or13 posterior13 distribution13 13 If13 you13 wish13 to13 use13 the13 mean13 of13 the13 distribution13 remake13 the13 PMop13 object13 using makeOP()13 13 If13 you13 wish13 to13 see13 all13 the13 cycle13 information13 in13 a13 PMcycle13 object13 not13 omitting13 the13 Zirst13 1013 of13 cycles13 by13 default13 remake13 it13 using13 makeCycle()13 13

For13 all13 of13 the13 following13 commands13 the13 data13 input13 is13 either13 NPdata13 or13 ITdata13 with13 additional13 function13 arguments13 speciZic13 to13 each13 command13 13 Accessing13 the13 help13 for13 each13 function13 in13 R13 will13 provide13 further13 details13 on13 the13 arguments13 defaults13 and13 output13 of13 each13 command

Userrsquos13 Guide13 13 2213 13

Command Description R13 help

makeAUC Make13 a13 dataframe13 of13 class13 PMauc13 containing13 subject13 ID13 and13 AUC13 from13 a13 variety13 of13 inputs13 including13 objects13 of13 PMop13 PMsim13 or13 a13 suitable13 dataframe

makeAUC

makeCov Generate13 a13 dataframe13 of13 class13 PMcov13 with13 subject-shy‐speciZic13 covariates13 extracted13 from13 the13 data13 csv13 Zile13 This13 object13 can13 be13 plotted13 and13 used13 to13 test13 for13 covariates13 which13 are13 signiZicantly13 associated13 with13 model13 parameters13 13

makeCov

makeCycle Create13 a13 PMcycle13 object13 described13 in13 the13 previous13 section makeCycle

makeFinal Create13 a13 PMZinal13 object13 described13 in13 the13 previous13 section makeFinal

makeOP Create13 a13 PMop13 object13 described13 in13 the13 previous13 section makeOP

makeNCA Create13 a13 dataframe13 (class13 PMnca)13 with13 the13 output13 of13 a13 non-shy‐compartmental13 analysis13 using13 PMpost13 and13 NPAG13 data13 objects13 as13 input13 13 The13 PMnca13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull auc13 Area13 under13 the13 time-shy‐observation13 curve13 using13 the13

trapezoidal13 approximation13 from13 time13 013 until13 the13 second13 dose13 or13 if13 only13 one13 dose13 until13 the13 last13 observation

bull aumc13 Area13 under13 the13 Zirst13 moment13 curvebull k13 Slope13 by13 least-shy‐squares13 linear13 regression13 of13 the13 Zinal13

613 log-shy‐transformed13 observations13 vs13 timebull auclast13 Area13 under13 the13 curve13 from13 the13 time13 of13 the13

last13 observation13 to13 inZinity13 calculated13 as13 [Final13 obs]kbull aumclast13 Area13 under13 the13 Zirst13 moment13 curve13 from13

the13 time13 of13 the13 last13 observation13 to13 inZinitybull aucinf13 Area13 under13 the13 curve13 from13 time13 013 to13 inZinity13

caluculated13 as13 auc13 +13 auclastbull aumcinf13 Area13 under13 the13 Zirst13 moment13 curve13 from13

time13 013 to13 inZinitybull mrt13 Mean13 residence13 time13 calculated13 as13 1kbull cmax13 Maximum13 predicted13 concentration13 after13 the13

Zirst13 dosebull tmax13 Time13 to13 cmaxbull cl13 Clearance13 calculated13 as13 doseaucinfbull vdss13 Volume13 of13 distribution13 at13 steady13 state13

calculated13 as13 clmrtbull thalf13 Half13 life13 of13 elimination13 calculated13 as13 ln(2)kbull dose13 First13 dose13 amount13 for13 each13 subject

makeNCA

Userrsquos13 Guide13 13 2313 13

Command Description R13 help

makeErrorPoly This13 function13 plots13 Zirst13 second13 and13 third13 order13 polynomial13 functions13 Zitted13 to13 pairs13 of13 observations13 and13 associated13 standard13 deviations13 for13 a13 given13 output13 assay13 In13 this13 way13 the13 standard13 deviation13 associated13 with13 any13 observation13 may13 be13 calculated13 and13 used13 to13 appropriately13 weight13 that13 observation13 in13 the13 model13 building13 process13 Observations13 are13 weighted13 by13 the13 reciprocal13 of13 the13 variance13 or13 squared13 standard13 deviation13 13 Output13 of13 the13 function13 is13 a13 plot13 of13 the13 measured13 observations13 and13 Zitted13 polynomial13 curves13 and13 a13 list13 with13 the13 Zirst13 second13 and13 third13 order13 coefZicients

makeErrorPoly

makePTA This13 function13 performs13 a13 Probability13 of13 Target13 Attainment13 analysis13 for13 a13 set13 of13 simulated13 doses13 and13 time-shy‐concentration13 proZiles13 13 Targets13 (eg13 Minimum13 Inhibitory13 Concentrations)13 the13 type13 of13 target13 attainment13 (ie13 time13 above13 target13 Cmaxtarget13 13 AUCtarget13 Cmintarget13 or13 Cxtarget13 where13 x13 is13 any13 time13 point)13 and13 the13 success13 threshold13 (eg13 time13 gt13 0713 or13 Cmaxtarget13 gt13 10)13 can13 all13 be13 speciZied13 13 Output13 is13 a13 list13 (class13 PMpta)13 with13 two13 objectsbull Results13 a13 413 dimensional13 array13 with13 dimension13 size13 of13

[number13 of13 doses13 number13 of13 targets13 number13 of13 simulated13 proZiles13 1]13 which13 gives13 the13 target13 attainment13 (eg13 Cmaxtarget)13 for13 each13 dose13 target13 and13 proZile

bull Outcome13 For13 each13 dose13 and13 target13 a13 summary13 of13 the13 target13 attainment13 for13 all13 the13 proZiles13 including13 mean13 standard13 deviation13 and13 proportion13 above13 the13 success13 threshold

PMpta13 objects13 can13 be13 summarized13 with13 summary(x)13 and13 plotted13 with13 plot(x)13

makePTA

Userrsquos13 Guide13 13 2413 13

Command Description R13 help

makePopmakePost(NPAG13 only)

These13 functions13 create13 dataframes13 of13 class13 PMpop13 and13 PMpost13 respectively13 13 The13 PMpop13 or13 PMpost13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull time13 Times13 for13 predicted13 concentrations13 13 These13

times13 are13 not13 necessarily13 at13 observed13 times13 but13 at13 a13 frequency13 speciZied13 in13 the13 NPAG13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

bull pred113 Predictions13 for13 output13 113 13 For13 PMpop13 objects13 predictions13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 population13 prior13 distribution13 13 For13 PMpost13 objects13 they13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject

bull pred213 pred313 etc13 If13 additional13 outputs13 exist13 they13 will13 each13 be13 columns13 in13 the13 dataframe13 just13 as13 for13 pred113 13

makePopmakePost

NPAG RunsIn13 the13 past13 users13 had13 to13 run13 NPAG13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 NPrun()13 13 However13 if13 NPrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable

1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 NPAG13 creates13 a13 temporary13 instruction13 Zile13 in13 case13 something13 happens13 so13 that13 instructions13 entered13 to13 date13 can13

be13 recovered13 13 Accept13 the13 default13 by13 choosing13 113 13 You13 can13 save13 with13 a13 meaningful13 Zilename13 later13 13 If13 it13 already13 exists13 you13 will13 be13 asked13 if13 you13 wish13 to13 overwrite13 the13 Zile13 which13 is13 usually13 the13 thing13 to13 do

Userrsquos13 Guide13 13 2513 13

8 If13 you13 have13 previously13 run13 IT2B13 you13 can13 automatically13 import13 the13 suggested13 parameter13 ranges13 13 Choose13 113 to13 do13 this13 and13 013 to13 run13 NPAG13 without13 a13 previous13 IT2B13 run81 If13 you13 choose13 option13 113 you13 must13 specify13 the13 name13 of13 a13 FROMxxxx13 Zile13 typically13 FROM000113 that13 you13 can13

Zind13 in13 an13 output13 directory13 after13 a13 successful13 IT2B13 run13 13 Note13 that13 the13 program13 will13 then13 assume13 that13 you13 are13 using13 the13 same13 wrk13 Ziles13 that13 IT2B13 made13 from13 your13 data13 csv13 Zile13 13 It13 is13 strongly13 recommended13 to13 override13 this13 and13 specify13 a13 data13 csv13 Zile13 13 At13 this13 point13 you13 will13 jump13 to13 1013 below13 and13 continue13 on13 however13 your13 answers13 will13 often13 be13 supplied13 by13 the13 instructions13 contained13 in13 the13 FROMxxxx13 Zile13 and13 you13 need13 merely13 conZirm13 them

9 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13 have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 NPrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis91 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13

for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

10 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 NPAG13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

11 Enter13 the13 name13 of13 your13 csv13 Zile13 now12 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile13 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset131 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects132 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry14 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset15 Enter13 the13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo 13 followed13 by13

return16 Select13 how13 you13 would13 like13 to13 model13 assay13 (observation)13 error13 for13 each13 output13 equation13 13 You13 have13 four13 choices13 13

In13 all13 four13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0161 Error13 model13 113 (SD)13 13 Choose13 this13 option13 if13 you13 have13 already13 run13 IT2B13 and13 multiplied13 your13 assay13 error13

polynomial13 by13 gamma13 (see13 next13 option13 for13 a13 description13 of13 gamma)162 Error13 model13 213 (SD13 13 gamma)13 13 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13

observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 If13 you13 choose13 this13 option13 you13 then13 can13 specify13 the13 starting13 value13 of13 gamma13 13 Good13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality

163 Error13 model13 313 (SD213 +13 lamda2)0513 13 Lamda13 is13 an13 alternative13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present

Userrsquos13 Guide13 13 2613 13

164 Error13 model13 413 SD13 =13 gamma13 13 This13 model13 is13 rarely13 used13 and13 is13 equivalent13 to13 specifying13 a13 model13 with13 C013 only13 ie13 a13 constant13 error13 regardless13 of13 concentration

17 Once13 you13 select13 the13 assay13 error13 model13 for13 each13 output13 equation13 you13 are13 then13 offered13 four13 more13 options13 on13 which13 assay13 error13 polynomial13 coefZicients13 to13 use13 13 Choices13 113 and13 213 are13 the13 most13 commonly13 used171 Choice13 113 The13 default13 13 Use13 coefZicients13 in13 the13 subject13 record13 (C013 C113 C213 C313 in13 the13 data13 csv13 Zile)13 and13 if13

missing13 use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 (item13 1813 below)172 Choice13 213 Use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 for13 all13 subjects13 regardless13 of13 what13 is13 in13 the13

data13 csv13 Zile173 Choice13 313 13 To13 multiply13 data13 csv13 values13 and13 default13 entered13 values13 by13 a13 Zixed13 gamma13 and13 use13 them13 13 174 Choice13 013 Specify13 coefZicients13 on13 a13 subject13 by13 subject13 basis13 either13 those13 in13 the13 data13 csv13 Zile13 already13 the13

default13 values13 entered13 into13 the13 program13 or13 other13 values18 For13 each13 output13 equation13 after13 you13 have13 selected13 the13 option13 in13 item13 1713 you13 will13 be13 prompted13 to13 supply13 the13

required13 information13 including13 the13 general13 default13 values13 for13 missing13 or13 overridden13 values13 in13 the13 data13 csv13 Zile19 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13

usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13

20 Enter13 the13 grid13 point13 index13 13 This13 number13 corresponds13 to13 the13 number13 of13 grid13 (support)13 points13 which13 will13 initially13 Zill13 the13 model13 parameter13 space13 13 The13 larger13 the13 number13 of13 random13 parameters13 to13 be13 estimated13 the13 more13 points13 are13 required13 13 The13 program13 will13 make13 a13 suggestion13 based13 on13 the13 number13 of13 random13 parameters13 in13 the13 model13 13 The13 more13 you13 choose13 the13 slower13 the13 run13 will13 be13 but13 results13 may13 improve13 13 It13 is13 reasonable13 to13 choose13 fewer13 points13 early13 in13 model13 exploration13 and13 increase13 in13 later13 phases13 or13 if13 poor13 model13 Zits13 or13 lack13 of13 convergence13 are13 noted13 The13 choices13 are13 113 to13 713 corresponding13 respectively13 to13 212913 500313 1000713 2001113 4000913 and13 8002113 points13 13 If13 you13 choose13 713 you13 then13 have13 an13 additional13 choice13 to13 select13 one13 or13 more13 multiples13 of13 8002113 points

21 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 013 or13 greater13 13 If13 you13 enter13 an13 integer13 greater13 than13 013 the13 engine13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13 If13 you13 enter13 013 this13 is13 the13 way13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 an13 independent13 data13 set13 and13 a13 non-shy‐uniform13 prior13 must13 be13 speciZied13 (see13 3013 below)13 13 This13 means13 that13 the13 engine13 will13 only13 calculate13 the13 individual13 Bayesian13 posteriors13 for13 the13 new13 subjects13 using13 the13 population13 joint13 density13 from13 a13 previous13 run13 as13 a13 Bayesian13 prior

22 Information13 about13 convergence13 criteria13 13 Answer13 113 or13 some13 other13 keystroke13 plus13 Return13 to13 acknowledge13 that13 you13 have13 read13 it

23 In13 order13 to13 predict13 concentrations13 from13 a13 non-shy‐parametric13 distribution13 you13 have13 the13 option13 to13 use13 the13 1)13 mean13 2)13 median13 or13 3)13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject13 13 We13 typically13 use13 the13 median13 Zirst13 and13 then13 the13 mean13 in13 a13 separate13 run13 and13 compare13 the13 differences13 13

24 Select13 the13 time13 interval13 to13 generate13 predicted13 concentrations13 13 Additionally13 there13 will13 also13 be13 predictions13 made13 at13 the13 time13 of13 each13 observation13 13 In13 general13 for13 most13 models13 predictions13 every13 1213 minutes13 provide13 sufZicient13 granularity13 13 Smaller13 values13 can13 result13 in13 very13 large13 Ziles13 for13 big13 populations

25 Select13 the13 default13 MIC13 to13 be13 used13 for13 AUCMIC13 ratio13 reporting13 13 This13 should13 generally13 be13 set13 to13 the13 default13 of13 113 by13 choosing13 113 13 You13 can13 always13 extract13 the13 AUC13 later13 and13 divide13 it13 by13 any13 MIC13 you13 choose

26 Enter13 the13 value13 in13 hours13 that13 you13 want13 for13 calculations13 of13 AUCs13 from13 predicted13 concentration13 proZiles13 13 The13 default13 is13 2413 hours13 which13 you13 can13 accept13 by13 entering13 113 or13 013 if13 you13 want13 to13 specify13 a13 different13 interval

27 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

28 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

Userrsquos13 Guide13 13 2713 13

29 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

30 For13 the13 prior13 density13 choose13 113 if13 it13 is13 to13 be13 uniform13 13 This13 means13 that13 the13 initial13 grid13 points13 will13 be13 evenly13 distributed13 with13 equal13 probability13 within13 the13 boundaries13 speciZied13 (in13 1513 above)13 13 If13 you13 choose13 013 you13 will13 be13 prompted13 for13 the13 name13 of13 a13 Zile13 that13 contains13 the13 prior13 density13 13 This13 will13 be13 DEN000113 unless13 you13 have13 changed13 its13 name13 13 It13 will13 be13 found13 in13 the13 output13 directory13 of13 a13 prior13 NPAG13 run13 13 The13 model13 used13 to13 generate13 the13 DEN000113 Zile13 must13 be13 exactly13 the13 same13 as13 the13 current13 model13 including13 parameter13 boundaries13 13 However13 this13 option13 is13 useful13 to13 specify13 a13 non-shy‐uniform13 density13 for13 two13 reasons13 13 The13 Zirst13 is13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 a13 new13 set13 of13 subjects13 13 Do13 this13 in13 combination13 with13 setting13 the13 number13 of13 cycles13 to13 013 (see13 2113 above)13 13 The13 second13 use13 for13 a13 non-shy‐uniform13 prior13 is13 to13 continue13 a13 previous13 run13 13 For13 example13 if13 you13 only13 set13 the13 number13 of13 cycles13 to13 5013 to13 get13 a13 rough13 idea13 of13 model13 Zit13 you13 may13 continue13 where13 you13 left13 off13 by13 specifying13 the13 DEN000113 Zile13 from13 the13 50-shy‐cycle13 run13 and13 continuing13 with13 as13 many13 additional13 cycles13 as13 you13 specify13 in13 item13 2113 13 So13 in13 the13 example13 if13 you13 specify13 10013 cycles13 in13 2113 the13 total13 number13 of13 cycles13 will13 be13 5013 +13 10013 =13 150

31 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 NPrun(instr=ldquoyourfilerdquo)13 option13 and13 including13 ldquoyourZilerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

32 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 NPAG13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 NPAG13 analysis

33 The13 NPAG13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

IT2B RunsIn13 the13 past13 users13 had13 to13 run13 IT2B13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 ITrun()13 13 However13 if13 ITrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13

have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 ITrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis

Userrsquos13 Guide13 13 2813 13

71 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13 for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

8 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 IT2B13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

9 Enter13 the13 name13 of13 your13 csv13 Zile13 now10 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile11 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset111 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects112 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry12 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset13 Enter13 the13 initial13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo13 followed13

by13 return14 The13 estimated13 mean13 for13 each13 parameter13 value13 distribution13 during13 the13 Zirst13 iteration13 will13 be13 the13 median13 of13 the13

range13 speciZied13 in13 1313 13 You13 now13 have13 the13 option13 to13 specify13 the13 standard13 deviation13 for13 the13 parameter13 value13 distribution13 which13 by13 default13 is13 half13 of13 the13 range13 in13 1313 13 Choose13 113 to13 accept13 this13 (the13 usual13 answer)13 or13 013 to13 change13 it13 to13 something13 else13 expressed13 as13 a13 multiple13 of13 the13 range

15 In13 IT2B13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 You13 can13 now13 choose13 113 if13 every13 subject13 has13 the13 same13 coefZicients13 or13 013 to13 use13 a13 unique13 set13 of13 coefZicients13 for13 each13 subject13 13 The13 Zirst13 case13 is13 the13 more13 usual13 when13 all13 13 samples13 from13 all13 subjects13 are13 analyzed13 in13 the13 same13 lab13 13 If13 13 samples13 are13 analyzed13 in13 different13 labs13 and13 you13 have13 the13 assay13 data13 from13 each13 lab13 then13 you13 would13 enter13 013 13 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 (see13 151313 below)13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0151 If13 you13 choose13 113 (one13 set13 of13 coefZicients13 for13 all13 subjects)13 you13 will13 then13 be13 presented13 with13 313 additional13

choices1511 Choice13 113 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13 observation13

including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 and13 to13 Zix13 gamma13 to13 1

1512 Choice13 213 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 but13 to13 estimate13 gamma13 based13 on13 the13 data13 13 This13 is13 the13 usual13 option

1513 Choice13 313 Choose13 this13 option13 if13 you13 wish13 to13 estimate13 the13 assay13 error13 coefZicients13 based13 on13 your13 data13 for13 use13 in13 future13 runs13 13 Although13 you13 can13 access13 this13 option13 by13 using13 either13 ITrun()13 or13 ERRrun()13 in13 R13 the13 instruction13 Ziles13 that13 you13 save13 and13 the13 generated13 output13 Ziles13 will13 be13 different13 13 Therefore13 we13 recommend13 that13 if13 you13 intend13 to13 choose13 this13 option13 use13 ERRrun()13 in13 R13 which13 will13 generate13 an13 ASS000113 Zile13 that13 contains13 the13 estimates13 for13 C013 C113 C213 and13 C313 13 You13 can13 then13 include13 this13 Zile13 in13 the13 working13 directory13 (along13 with13 a13 model13 txt13 Zile13 and13 a13 data13 csv13 Zile)13 to13 do13 an13 IT2B13 run13 supplying13 the13 Zile13 name13 in13 16113 below

Userrsquos13 Guide13 13 2913 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

Table of ContentsIntroduc1on13 3

Ci1ng13 Pmetrics13 3Disclaimer13 3

System13 Requirements13 and13 Installa1on13 3What13 This13 Manual13 Is13 Not13 4GeCng13 Help13 and13 Updates13 5

Pmetrics13 Components13 5Customizing13 Pmetrics13 Func1ons13 6

General13 Workflow13 8Pmetrics13 Input13 Files13 9

Data13 csv13 Files13 9Model13 Files13 10

How13 to13 use13 R13 and13 Pmetrics13 18Pmetrics13 Data13 Objects13 19

Making13 New13 Pmetrics13 Objects13 22NPAG13 Runs13 25

IT2B13 Runs13 28Simulator13 Runs13 31

PloCng13 31Examples13 of13 Pmetrics13 plots13 33

Model13 Diagnos1cs13 36Internal13 Valida1on13 36External13 Valida1on13 37

References13 38

Userrsquos13 Guide13 13 213 13

IntroductionThank13 you13 for13 your13 interest13 in13 Pmetrics13 13 This13 guide13 provides13 instructions13 and13 examples13 to13 assist13 users13 of13 the13 Pmetrics13 R13 package13 by13 the13 Laboratory13 of13 Applied13 Pharmacokinetics13 at13 the13 University13 of13 Southern13 California13 13 Please13 see13 our13 website13 at13 httpwwwlapkorg13 for13 more13 informationHere13 are13 some13 tips13 for13 using13 this13 guidebull Items13 that13 are13 hyperlinked13 can13 be13 selected13 to13 jump13 rapidly13 to13 relevant13 sections13 13 bull At13 the13 bottom13 of13 every13 page13 the13 text13 ldquoUserrsquos13 Guiderdquo13 can13 be13 selected13 to13 jump13 immediately13 to13 the13 table13 of13

contentsbull Items13 in13 courier13 font13 correspond13 to13 R13 commands

Citing PmetricsPlease13 help13 us13 maintain13 our13 funding13 to13 provide13 Pmetrics13 as13 a13 free13 research13 tool13 to13 the13 pharmacometric13 community13 13 If13 you13 use13 Pmetrics13 in13 a13 publication13 you13 can13 cite13 it13 as13 below13 13 In13 R13 you13 can13 always13 type13 citation(ldquoPmetricsrdquo) to13 get13 this13 same13 referenceNeely13 MN13 van13 Guilder13 MG13 Yamada13 WM13 Schumitzky13 A13 Jelliffe13 RW13 Accurate13 Detection13 of13 Outliers13 and13 Subpopulations13 With13 Pmetrics13 a13 Nonparametric13 and13 Parametric13 Pharmacometric13 Modeling13 and13 Simulation13 Package13 for13 R13 Ther13 Drug13 Monit13 201213 34467ndash47613

DisclaimerYou13 the13 user13 assume13 all13 responsibility13 for13 acting13 on13 the13 results13 obtained13 from13 Pmetrics13 13 The13 USC13 Laboratory13 of13 Applied13 Pharmacokinetics13 members13 and13 consultants13 to13 the13 Laboratory13 of13 Applied13 Pharmacokinetics13 and13 the13 University13 of13 Southern13 California13 and13 its13 employees13 assume13 no13 liability13 whatsoever13 13 Your13 use13 of13 the13 package13 constitutes13 your13 agreement13 to13 this13 provision13

System Requirements and InstallationThere13 are13 three13 required13 software13 components13 which13 must13 be13 installed13 on13 your13 system13 in13 this13 order13

1 R2 The13 Pmetrics13 package13 for13 R3 gfortran13 or13 some13 other13 Fortran13 compiler

13 A13 fourth13 highly13 recommended13 but13 optional13 component13 is13 Rstudio13 a13 user-shy‐friendly13 wrapper13 for13 R13 It13 can13 be13 installed13 any13 time13 after13 installing13 R13 (ie13 step13 113 above)13 All13 components13 have13 versions13 for13 Mac13 and13 Windows13 environments13 and13 32-shy‐13 and13 64-shy‐13 bit13 processors13 13 All13 are13 free13 of13 charge13 13

RR13 is13 a13 free13 software13 environment13 for13 statistical13 computing13 and13 graphics13 which13 can13 be13 obtained13 from13 httpwwwR-shy‐projectorg13 13 Pmetrics13 is13 a13 library13 for13 R

PmetricsIf13 you13 are13 reading13 this13 manual13 then13 you13 have13 likely13 visited13 our13 website13 at13 httpwwwlapkorg13 where13 you13 can13 select13 the13 software13 tab13 and13 download13 our13 products13 including13 Pmetrics

Userrsquos13 Guide13 13 313 13

Pmetrics13 is13 distributed13 as13 a13 package13 source13 Zile13 archive13 (tgz13 for13 Mac13 zip13 for13 Windows)13 13 Do13 not13 open13 the13 archive13 13 To13 install13 Pmetrics13 from13 the13 R13 console13 use13 the13 command13 installpackages(filechoose())13 and13 navigate13 when13 prompted13 to13 the13 folder13 in13 which13 you13 placed13 the13 Pmetrics13 package13 archive13 (zip13 or13 tgz)13 Zile13 13 Pmetrics13 will13 need13 the13 following13 R13 packages13 for13 some13 functions13 chron13 Defaults13 and13 R2HTML13 13 However13 you13 do13 not13 have13 to13 install13 these13 if13 you13 do13 not13 already13 have13 them13 in13 your13 R13 library13 13 They13 should13 automatically13 be13 downloaded13 and13 installed13 the13 Zirst13 time13 you13 use13 a13 Pmetrics13 function13 that13 requires13 them13 but13 if13 something13 goes13 awry13 (such13 as13 no13 internet13 connection13 or13 busy13 server)13 you13 can13 do13 this13 manually

FortranIn13 order13 to13 run13 Pmetrics13 a13 Fortran13 compiler13 is13 required13 13 After13 you13 have13 installed13 Pmetrics13 the13 Zirst13 time13 you13 load13 Pmetrics13 into13 R13 with13 the13 function13 library(Pmetrics)13 the13 program13 will13 ask13 you13 which13 Fortran13 compiler13 you13 are13 using13 13 If13 you13 have13 no13 compiler13 you13 will13 have13 the13 option13 to13 automatically13 link13 you13 to13 the13 OS-shy‐speciZic13 page13 of13 our13 website13 with13 explicit13 instructions13 and13 a13 link13 to13 download13 and13 install13 gfortran13 on13 your13 system13 13 Details13 of13 this13 procedure13 follow13 but13 are13 not13 relevant13 if13 you13 already13 have13 a13 compiler13 installedFor13 Mac13 users13 the13 correct13 version13 of13 gfortran13 will13 be13 downloaded13 for13 your13 system13 (Mountain13 Lion13 64-shy‐bit13 Lion13 64-shy‐bit13 Snow13 Leopard13 64-shy‐13 or13 32-shy‐bit)13 You13 will13 also13 be13 provided13 a13 link13 to13 download13 and13 install13 Applersquos13 Xcode13 application13 if13 you13 do13 not13 already13 have13 it13 on13 your13 system13 13 Xcode13 is13 required13 to13 run13 gfortran13 on13 Macs13 As13 of13 version13 4313 for13 Lion13 Xcode13 is13 available13 from13 the13 App13 store13 for13 free13 13 For13 Snow13 Leopard13 Xcode13 is13 on13 your13 installation13 disk13 13 NOTE13 For13 Xcode13 downloaded13 from13 the13 App13 store13 (Lion13 and13 later)13 you13 must13 additionally13 install13 the13 Command13 Line13 Tools13 available13 in13 the13 Xcode13 Preferences13 -shy‐gt13 Downloads13 paneWindows13 users13 need13 to13 pay13 special13 attention13 because13 the13 the13 ldquogccrdquo13 installer13 that13 provides13 necessary13 common13 libraries13 for13 many13 programming13 languages13 does13 not13 by13 default13 include13 gfortran13 13 When13 gcc13 is13 installed13 be13 sure13 to13 choose13 the13 fortran13 option13 to13 include13 gfortran13 as13 shown13 below

RstudioA13 text13 editor13 that13 can13 link13 to13 R13 is13 useful13 for13 saving13 scripts13 13 Both13 the13 Windows13 and13 Mac13 versions13 of13 R13 have13 rudimentary13 text13 editors13 that13 are13 stable13 and13 reliable13 13 Numerous13 other13 free13 and13 paid13 editors13 can13 also13 do13 the13 job13 and13 these13 can13 be13 located13 by13 searching13 the13 internet13 13 We13 prefer13 Rstudio

What This Manual Is NotWe13 assume13 that13 the13 user13 has13 familiarity13 with13 population13 modeling13 and13 R13 and13 thus13 this13 manual13 is13 not13 a13 tutorial13 for13 basic13 concepts13 and13 techniques13 in13 either13 domain13 13 We13 have13 tried13 to13 make13 the13 R13 code13 simple13 regular13 and13 well13 documented13 13 13 13 A13 very13 good13 free13 online13 resource13 for13 learning13 the13 basics13 of13 R13 can13 be13 found13 at13 httpwwwstatmethodsnetindexhtml13 13 We13 recognize13 that13 initial13 use13 of13 a13 new13 software13 package13 can13 be13 complex13 so13

Userrsquos13 Guide13 13 413 13

Click13 the13 expander13 bu6on

Check13 this13 box

please13 feel13 free13 to13 contact13 us13 at13 any13 time13 preferably13 through13 the13 Pmetrics13 forum13 at13 httpwwwlapkorg13 13 or13 directly13 by13 email13 at13 contactlapkorgThis13 manual13 is13 also13 not13 intended13 to13 be13 a13 theoretical13 treatise13 on13 the13 algorithms13 used13 in13 IT2B13 or13 NPAG13 13 For13 that13 the13 user13 is13 directed13 to13 our13 website13 at13 wwwlapkorg

Getting Help and UpdatesThere13 is13 an13 active13 LAPK13 forum13 available13 from13 our13 website13 at13 httpwwwlapkorg13 with13 all13 kinds13 of13 useful13 tips13 and13 help13 with13 Pmetrics13 13 Register13 (separately13 from13 your13 LAPK13 registration)13 and13 feel13 free13 to13 post13 13 Within13 R13 you13 can13 also13 use13 help(ldquocommandrdquo)13 or13 command13 in13 the13 R13 console13 to13 see13 detailed13 help13 Ziles13 for13 any13 Pmetrics13 command13 13 Many13 commands13 have13 examples13 included13 in13 this13 documentation13 and13 you13 can13 execute13 the13 examples13 with13 example(command)13 Note13 that13 here13 quotation13 marks13 are13 unnecessary13 around13 command13 You13 can13 also13 type13 PMmanual()13 to13 launch13 this13 manual13 from13 within13 Pmetrics13 as13 well13 as13 a13 catalogue13 of13 all13 Pmetrics13 functions13 13 Finally13 PMnews()13 will13 display13 the13 Pmetrics13 changelog

Pmetrics13 will13 check13 for13 updates13 automatically13 every13 time13 you13 load13 it13 with13 library(Pmetrics)13 13 If13 an13 update13 is13 available13 it13 will13 provide13 a13 brief13 message13 to13 inform13 you13 13 You13 can13 then13 use13 PMupdate() to13 update13 Pmetrics13 from13 within13 R13 without13 having13 to13 visit13 our13 website13 13 You13 will13 be13 prompted13 for13 your13 LAPK13 user13 email13 address13 and13 password13 13 When13 bugs13 arise13 in13 Pmetrics13 you13 may13 see13 a13 start13 up13 message13 to13 inform13 you13 of13 the13 bug13 and13 a13 patch13 can13 be13 installed13 by13 the13 command13 PMpatch()13 if13 available13 13 Note13 that13 patches13 must13 be13 reinstalled13 with13 this13 command13 every13 time13 you13 launch13 Pmetrics13 until13 the13 bug13 is13 corrected13 in13 the13 next13 versionAs13 of13 version13 113 Pmetrics13 has13 graphical13 user13 interface13 (GUI)13 capability13 for13 many13 functions13 13 Using13 PMcode(ldquofunctionrdquo)13 will13 launch13 the13 GUI13 in13 your13 default13 browser13 13 While13 you13 are13 interacting13 with13 the13 GUI13 R13 is13 ldquolisteningrdquo13 and13 no13 other13 activity13 is13 possible13 13 The13 GUI13 is13 designed13 to13 generate13 Pmetrics13 R13 code13 in13 response13 to13 your13 input13 in13 a13 friendly13 intuitive13 environment13 13 That13 code13 can13 be13 copied13 and13 pasted13 into13 your13 Pmetrics13 R13 script13 13 You13 can13 also13 see13 live13 plot13 previews13 with13 the13 GUI13 13 All13 this13 is13 made13 possible13 with13 the13 lsquoshinyrsquo13 package13 for13 RCurrently13 the13 following13 GUIs13 are13 available13 13 PMcode(ldquoNPrunrdquo) PMcode(ldquoITrunrdquo) PMcode(ldquoplotrdquo)13 13 More13 are13 coming

Pmetrics ComponentsThere13 are13 three13 main13 software13 programs13 that13 Pmetrics13 controlsbull IT2B13 is13 the13 ITerative13 2-shy‐stage13 Bayesian13 parametric13 population13 PK13 modeling13 program13 13 It13 is13 generally13 used13 to13

estimate13 parameter13 ranges13 to13 pass13 to13 NPAG13 13 It13 will13 estimate13 values13 for13 population13 model13 parameters13 under13 the13 assumption13 that13 the13 underlying13 distributions13 of13 those13 values13 are13 normal13 or13 transformed13 to13 normal

bull NPAG13 is13 the13 Non-shy‐parametric13 Adaptive13 Grid13 software13 13 It13 will13 create13 a13 non-shy‐parametric13 population13 model13 consisting13 of13 discrete13 support13 points13 each13 with13 a13 set13 of13 estimates13 for13 all13 parameters13 in13 the13 model13 plus13 an13 associated13 probability13 (weight)13 of13 that13 set13 of13 estimates13 13 There13 can13 be13 at13 most13 one13 point13 for13 each13 subject13 in13 the13 study13 population13 13 There13 is13 no13 need13 for13 any13 assumption13 about13 the13 underlying13 distribution13 of13 model13 parameter13 values

bull The13 simulator13 is13 a13 semi-shy‐parametric13 Monte13 Carlo13 simulation13 software13 program13 that13 can13 use13 the13 output13 of13 IT2B13 or13 NPAG13 to13 build13 randomly13 generated13 response13 proZiles13 (eg13 time-shy‐concentration13 curves)13 for13 a13 given13 population13 model13 parameter13 estimates13 and13 data13 input13 13 Simulation13 from13 a13 non-shy‐parametric13 joint13 density13 model13 ie13 NPAG13 output13 is13 possible13 with13 each13 point13 serving13 as13 the13 mean13 of13 a13 multivariate13 normal13 distribution13 weighted13 according13 to13 the13 weight13 of13 the13 point13 13 The13 covariance13 matrix13 of13 the13 entire13 set13 of13 support13 points13 is13 divided13 equally13 among13 the13 points13 for13 the13 purposes13 of13 simulation

Pmetrics13 has13 groups13 of13 R13 functions13 named13 logically13 to13 run13 each13 of13 these13 programs13 and13 to13 extract13 the13 output13 13 Again13 these13 are13 extensively13 documented13 within13 R13 by13 using13 the13 help(command)13 or13 command13 syntax13 bull ITrun13 ITparse13 ITload13 ITreport13 ERRrunbull NPrun13 NPparse13 NPload13 NPreportbull SIMrun13 SIMparse

Userrsquos13 Guide13 13 513 13

For13 IT2B13 and13 NPAG13 the13 ldquorunrdquo13 functions13 generate13 batch13 Ziles13 which13 when13 executed13 launch13 the13 software13 programs13 to13 do13 the13 analysis13 ERRrun13 is13 a13 special13 implementation13 of13 IT2B13 designed13 to13 estimate13 the13 assay13 error13 polynomial13 coefZicients13 from13 the13 data13 when13 they13 cannot13 be13 calculated13 from13 assay13 validation13 data13 (using13 makeErrorPoly())13 supplied13 by13 the13 analytical13 laboratory13 The13 batch13 Ziles13 contain13 all13 the13 information13 necessary13 to13 complete13 a13 run13 tidy13 the13 output13 into13 a13 datetime13 stamped13 directory13 with13 meaningful13 subdirectories13 extract13 the13 information13 generate13 a13 report13 and13 a13 saved13 Rdata13 Zile13 of13 parsed13 output13 which13 can13 be13 quickly13 and13 easily13 loaded13 into13 R13 13 On13 Mac13 (Unix)13 systems13 the13 batch13 Zile13 will13 automatically13 launch13 in13 a13 Terminal13 window13 13 On13 Windows13 systems13 the13 batch13 Zile13 must13 be13 launched13 manually13 13 In13 both13 cases13 the13 execution13 of13 the13 program13 to13 do13 the13 actual13 model13 parameter13 estimation13 is13 independent13 of13 R13 so13 that13 the13 user13 is13 free13 to13 use13 R13 for13 other13 purposesFor13 the13 Simulator13 the13 ldquorunrdquo13 function13 will13 execute13 the13 program13 directly13 within13 RFor13 all13 programs13 the13 ldquoparserdquo13 functions13 will13 extract13 the13 primary13 output13 from13 the13 program13 into13 meaningful13 R13 data13 objects13 13 For13 IT2B13 and13 NPAG13 this13 is13 done13 automatically13 at13 the13 end13 of13 a13 successful13 run13 and13 the13 objects13 are13 saved13 in13 the13 output13 subdirectory13 as13 IT2BoutRdata13 or13 NPAGoutRdata13 respectivelyFor13 IT2B13 and13 NPAG13 the13 ldquoloadrdquo13 functions13 can13 be13 used13 to13 load13 the13 above13 Rdata13 Ziles13 after13 a13 successful13 run13 13 The13 ldquoreportrdquo13 functions13 are13 automatically13 run13 at13 the13 end13 of13 a13 successful13 run13 and13 these13 will13 generate13 an13 HTML13 page13 with13 summaries13 of13 the13 run13 as13 well13 as13 the13 Rdata13 Ziles13 and13 other13 objects13 13 The13 default13 browser13 will13 be13 automatically13 launched13 for13 viewing13 of13 the13 HTML13 report13 pageWithin13 Pmetrics13 there13 are13 also13 functions13 to13 manipulate13 data13 csv13 Ziles13 and13 process13 and13 plot13 extracted13 databull Manipulate13 data13 csv13 Ziles13 PMreadMatrix13 PMcheck13 PMZixMatrix13 PMwriteMatrix13 PMmatrixRelTime13

PMwrk2csvbull Process13 data13 makeAUC13 makeCov13 makeCycle13 makeFinal13 makeOP13 makeNCA13 makeErrorPolybull Plot13 data13 plotPMcov13 plotPMcycle13 plotPMZinal13 plotPMmatrix13 plotPMop13 plotPMsim13 plotPMdiag13

plotPMptabull Model13 selection13 and13 diagnostics13 PMcompare13 plotPMop13 (with13 residual13 option)13 PMdiag13 PMstepbull Pmetrics13 function13 defaults13 PMwriteDefaultsAgain13 all13 functions13 have13 extensive13 help13 Ziles13 and13 examples13 which13 can13 be13 examined13 in13 R13 by13 using13 the13 help(command)13 or13 command13 syntax13 13

Customizing Pmetrics FunctionsWhen13 Pmetrics13 is13 loaded13 with13 a13 library(Pmetrics)13 command13 it13 will13 also13 load13 the13 Defaults13 package13 13 If13 not13 present13 it13 will13 automatically13 download13 it13 from13 CRAN13 13 This13 package13 allows13 you13 to13 change13 the13 default13 for13 any13 Pmetrics13 function13 argument13 13 See13 Defaults13 for13 more13 help13 but13 some13 key13 functions13 are13 summarized13 here

setDefaults(name) Where13 name13 is13 something13 like13 PMreadMatrix13 and13 is13 a13 list13 of13 arguments13 whose13 default13 you13 wish13 to13 change13 13 So13 if13 you13 want13 PMreadMatrix13 to13 read13 semicolon13 delimited13 Ziles13 by13 default13 instead13 of13 comma13 separated13 Ziles13 use13 setDefaults(PMreadMatrix delim=rdquordquo)

getDefaults()13 or13 getDefaults(name) 13 The13 Zirst13 command13 will13 list13 all13 functions13 that13 have13 alternative13 defaults13 and13 the13 second13 will13 list13 the13 alternatives13 for13 a13 given13 function13 13 unsetDefaults(name)13 13 Restores13 the13 defaults13 to13 normal13 for13 a13 given13 function

The13 above13 functions13 will13 manipulate13 defaults13 for13 a13 single13 session13 in13 R13 13 They13 are13 all13 included13 in13 the13 Defaults13 package13 13 If13 you13 want13 to13 make13 the13 defaults13 durable13 from13 session13 to13 session13 use13 the13 following13 function13 in13 PmetricsPMwriteDefaults()13 13 This13 will13 save13 your13 defaults13 and13 they13 will13 be13 restored13 every13 time13 you13 load13 Pmetrics

Userrsquos13 Guide13 13 613 13

Userrsquos13 Guide13 13 713 13

You13 supply13 these13 files13 Pmetrics13 does13 the13 rest

General WorkflowThe13 general13 Pmetrics13 workZlow13 for13 IT2B13 and13 NPAG13 is13 shown13 in13 the13 following13 diagram

Data13 csv13 file Model13 txt13 file

PreparaCon13 program

Engine13 program

InstrucCon13 file

Output

ITrun()

13 NPrun

()

ITload()13 NPload()

R13 is13 used13 to13 specify13 the13 working13 directory13 containing13 the13 data13 csv13 and13 model13 txt13 Ziles13 Through13 the13 batch13 Zile13 generated13 by13 R13 the13 preparation13 program13 is13 compiled13 and13 executed13 13 The13 instruction13 Zile13 is13 generated13 automatically13 by13 the13 contents13 of13 the13 data13 and13 model13 Ziles13 and13 by13 arguments13 to13 the13 NPrun()13 ITrun()13 or13 ERRrun()13 commands13 The13 batch13 Zile13 will13 then13 compile13 and13 execute13 the13 engine13 Zile13 according13 to13 the13 instructions13 which13 will13 generate13 several13 output13 Ziles13 upon13 completion13 13 Finally13 the13 batch13 Zile13 will13 call13 the13 R13 script13 to13 generate13 the13 summary13 report13 and13 several13 data13 objects13 including13 the13 IT2BoutRdata13 or13 NPAGoutRdata13 Ziles13 which13 can13 be13 loaded13 into13 R13 subsequently13 using13 ITload()13 or13 NPload()Both13 input13 Ziles13 (data13 model)13 are13 text13 Ziles13 which13 can13 be13 edited13 directly

Userrsquos13 Guide13 13 813 13

Pmetrics Input FilesData13 csv13 Files

Pmetrics13 accepts13 input13 as13 a13 spreadsheet13 ldquomatrixrdquo13 format13 It13 is13 designed13 for13 input13 of13 multiple13 records13 in13 a13 concise13 way13 13 Please13 keep13 the13 number13 of13 characters13 in13 the13 Uile13 name13 le13 8Files13 are13 in13 comma-shy‐separated-shy‐values13 (csv)13 format13 13 Examples13 of13 programs13 that13 can13 save13 csv13 Ziles13 are13 any13 text13 editor13 (eg13 TextEdit13 on13 Mac13 Notepad13 on13 Windows)13 or13 spreadsheet13 program13 (eg13 Excel)13 13 Click13 on13 hyperlinked13 items13 to13 see13 an13 explanation13 13

IMPORTANT13 The13 order13 capitalization13 and13 names13 of13 the13 header13 and13 the13 Zirst13 1213 columns13 are13 Zixed13 13 All13 entries13 must13 be13 numeric13 with13 the13 exception13 of13 ID13 and13 ldquordquo13 for13 non-shy‐required13 placeholder13 entries

POPDATA13 DEC13 11ID EVID TIME DUR DOSE ADDL II INPUT OUT OUTEQ C0 C1 C2 C3 COVhellipGH 1 0 0 400 1 GH 0 05 042 1 001 01 0 0GH 0 1 046 1 001 01 0 0GH 0 2 247 1 001 01 0 0GH 4 0 0 150 1 GH 1 35 05 150 1 001 01 0 0GH 0 512 055 1 001 01 0 0GH 0 24 052 1 001 01 0 01423 1 0 1 400 -shy‐1 12 1 1423 1 01 0 100 2 1423 0 1 -shy‐99 1 001 01 0 01423 0 2 038 1 001 01 0 01423 0 2 16 2 005 02 -shy‐011 0002POPDATA13 DEC_1113 13 This13 is13 the13 header13 for13 the13 Zile13 and13 must13 be13 in13 the13 Zirst13 line13 13 It13 identiZies13 the13 versionID13 13 This13 Zield13 must13 be13 preceded13 by13 the13 ldquordquo13 symbol13 to13 conZirm13 that13 this13 is13 the13 header13 row13 It13 can13 be13

numeric13 or13 character13 and13 identiZies13 each13 individual13 13 All13 rows13 must13 contain13 an13 ID13 and13 all13 records13 from13 one13 individual13 must13 be13 contiguous13 13 Any13 subsequent13 row13 that13 begins13 with13 ldquordquo13 will13 be13 ignored13 which13 is13 helpful13 if13 you13 want13 to13 exclude13 data13 from13 the13 analysis13 but13 preserve13 the13 integrity13 of13 the13 original13 dataset13 or13 to13 add13 comment13 lines13 13 IDs13 should13 be13 1113 characters13 or13 less13 but13 may13 be13 any13 alphanumeric13 combination13 13 There13 can13 be13 at13 most13 80013 subjects13 per13 run

EVID13 This13 is13 the13 event13 ID13 Zield13 13 It13 can13 be13 013 113 or13 413 13 Every13 row13 must13 have13 an13 entry13 013 =13 observation13 113 =13 input13 (eg13 dose)13 213 313 are13 currently13 unused13 413 =13 reset13 where13 all13 compartment13 values13 are13 set13 to13 013 and13 the13 time13 counter13 is13 reset13 to13 013 13 This13 is13

useful13 when13 an13 individual13 has13 multiple13 sampling13 episodes13 that13 are13 widely13 spaced13 in13 time13 with13 no13 new13 information13 gathered13 13 This13 is13 a13 dose13 event13 so13 dose13 information13 needs13 to13 be13 complete

TIME13 This13 is13 the13 elapsed13 time13 in13 decimal13 hours13 since13 the13 Zirst13 event13 13 It13 is13 not13 currently13 clock13 time13 (eg13 2130)13 although13 this13 is13 planned13 13 Every13 row13 must13 have13 an13 entry13 and13 within13 a13 given13 ID13 rows13 must13 be13 sorted13 chronologically13 earliest13 to13 latest13 13

DUR13 This13 is13 the13 duration13 of13 an13 infusion13 in13 hours13 13 If13 EVID=113 there13 must13 be13 an13 entry13 otherwise13 it13 is13 ignored13 13 For13 a13 bolus13 (ie13 an13 oral13 dose)13 set13 the13 value13 equal13 to13 0

Userrsquos13 Guide13 13 913 13

DOSE13 This13 is13 the13 dose13 amount13 13 If13 EVID=113 there13 must13 be13 an13 entry13 otherwise13 it13 is13 ignoredADDL13 This13 speciZies13 the13 number13 of13 additional13 doses13 to13 give13 at13 interval13 II13 13 It13 may13 be13 missing13 for13 dose13

events13 (EVID=113 or13 4)13 in13 which13 case13 it13 is13 assumed13 to13 be13 013 13 It13 is13 ignored13 for13 observation13 (EVID=0)13 events13 13 Be13 sure13 to13 adjust13 the13 time13 entry13 for13 the13 subsequent13 row13 if13 necessary13 to13 account13 for13 the13 extra13 doses13 13 If13 set13 to13 -shy‐113 the13 dose13 is13 assumed13 to13 be13 given13 under13 steady-shy‐state13 conditions13 13 ADDL=-shy‐113 can13 only13 be13 used13 for13 the13 Zirst13 dose13 event13 for13 a13 given13 subject13 or13 an13 EVID=413 event13 as13 you13 cannot13 suddenly13 be13 at13 steady13 state13 in13 the13 middle13 of13 dosing13 record13 unless13 all13 compartmentstimes13 are13 reset13 to13 013 (as13 for13 an13 EVID=413 event)

II13 This13 is13 the13 interdose13 interval13 and13 is13 only13 relevant13 if13 ADDL13 is13 not13 equal13 to13 013 in13 which13 case13 it13 cannot13 be13 missing13 13 If13 ADDL=013 or13 is13 missing13 II13 is13 ignored

INPUT13 This13 deZines13 which13 input13 (ie13 drug)13 the13 DOSE13 corresponds13 to13 13 Inputs13 are13 deZined13 in13 the13 model13 Zile

OUT 13 This13 is13 the13 observation13 or13 output13 value13 13 If13 EVID=013 there13 must13 be13 an13 entry13 if13 missing13 this13 must13 be13 coded13 as13 -shy‐9913 13 It13 will13 be13 ignored13 for13 any13 other13 EVID13 and13 therefore13 can13 be13 ldquordquo13 13 There13 can13 be13 at13 most13 15013 observations13 for13 a13 given13 subject

OUTEQ13 This13 is13 the13 output13 equation13 number13 that13 corresponds13 to13 the13 OUT13 value13 13 Output13 equations13 are13 deZined13 in13 the13 model13 Zile

C013 C113 C213 C313 These13 are13 the13 coefZicients13 for13 the13 assay13 error13 polynomial13 for13 that13 observation13 13 Each13 subject13 may13 have13 up13 to13 one13 set13 of13 coefZicients13 per13 output13 equation13 13 If13 more13 than13 one13 set13 is13 detected13 for13 a13 given13 subject13 and13 output13 equation13 the13 last13 set13 will13 be13 used13 13 If13 there13 are13 no13 available13 coefZicients13 these13 cells13 may13 be13 left13 blank13 or13 Zilled13 with13 ldquordquo13 as13 a13 placeholder

COV13 Any13 column13 after13 the13 assay13 error13 coefZicients13 is13 assumed13 to13 be13 a13 covariate13 one13 column13 per13 covariate

Model13 Files

Model13 Ziles13 for13 Pmetrics13 are13 ultimately13 Fortran13 text13 Ziles13 with13 a13 header13 version13 of13 TSMULT13 13 As13 of13 Pmetrics13 version13 03013 we13 have13 adopted13 a13 very13 simple13 user13 format13 that13 Pmetrics13 will13 use13 to13 generate13 the13 Fortran13 code13 automatically13 for13 you13 13 Version13 0413 additionally13 eliminates13 the13 previously13 separate13 instruction13 Zile13 A13 model13 library13 is13 available13 on13 our13 website13 at13 httpwwwlapkorgpmetricsphp13 13 Naming13 your13 model13 files13 The13 default13 model13 Zile13 name13 is13 ldquomodeltxtrdquo13 but13 you13 can13 call13 them13 whatever13 you13 wish13 13 However13 please13 keep13 the13 number13 of13 characters13 in13 the13 model13 Uile13 name13 le13 813 When13 you13 use13 a13 model13 Zile13 in13 NPrun() ITrun ERRrun() or SIMrun()13 Pmetrics13 will13 make13 a13 Fortran13 model13 Zile13 of13 the13 same13 name13 temporarily13 renaming13 your13 Zile13 13 At13 the13 end13 of13 the13 run13 your13 original13 model13 Zile13 will13 be13 in13 the13 inputs13 subfolder13 of13 the13 run13 folder13 and13 the13 generated13 Fortran13 model13 Zile13 will13 be13 called13 ldquomodelforrdquo13 and13 moved13 to13 the13 etc13 subfolder13 of13 the13 run13 folder13 13 If13 your13 model13 is13 called13 ldquomymodeltxtrdquo13 then13 the13 Fortran13 Zile13 will13 be13 ldquomymodelforrdquoYou13 can13 still13 use13 appropriate13 Fortran13 model13 Ziles13 directly13 but13 we13 suggest13 you13 keep13 the13 for13 extension13 for13 all13 Fortran13 Ziles13 to13 avoid13 confusion13 with13 the13 new13 format13 13 If13 you13 use13 a13 for13 Zile13 as13 your13 model13 you13 will13 have13 to13 specify13 its13 name13 explicitly13 in13 the13 NPrun() ITrun ERRrun() or SIMrun()13 command13 since13 the13 default13 model13 name13 again13 is13 ldquomodeltxtrdquo13 13 If13 you13 use13 a13 for13 Zile13 directly13 it13 will13 be13 in13 the13 inputs13 subfolder13 of13 the13 run13 folder13 not13 in13 etc13 since13 you13 did13 not13 use13 the13 simpler13 template13 as13 your13 model13 Zile

Structure13 of13 model13 files13 The13 new13 model13 Zile13 is13 a13 text13 Zile13 with13 1113 blocks13 each13 marked13 by13 13 followed13 by13 a13 header13 tagPRImary13 variablesCOVariatesSECcondary13 variablesBOLus13 inputsINItial13 conditions

Userrsquos13 Guide13 13 1013 13

F13 (bioavailability)LAG13 timeDIFferential13 equationsOUTputsERRorEXTraFor13 each13 header13 only13 the13 capital13 letters13 are13 required13 for13 recognition13 by13 Pmetrics13 The13 blocks13 can13 be13 in13 any13 order13 and13 header13 names13 are13 case-shy‐insensitive13 (ie13 the13 capitalization13 here13 is13 just13 to13 show13 which13 letters13 are13 required)13 Fortran13 is13 also13 case-shy‐insensitive13 so13 in13 variable13 names13 and13 expressions13 case13 is13 ignored13 13 Details13 of13 each13 block13 are13 next13 followed13 by13 a13 complete13 example

Primary13 variables

Primary13 variables13 are13 the13 model13 parameters13 that13 are13 to13 be13 estimated13 by13 Pmetrics13 or13 are13 designated13 as13 Zixed13 parameters13 with13 user13 speciZied13 values13 It13 should13 be13 a13 list13 of13 variable13 names13 one13 name13 to13 a13 line13 Variable13 names13 should13 be13 1113 characters13 or13 fewer13 Some13 variable13 names13 are13 reserved13 for13 use13 by13 Pmetrics13 and13 cannot13 be13 used13 as13 primary13 variable13 names13 13 13 The13 number13 of13 primary13 variables13 must13 be13 between13 213 and13 3213 with13 at13 most13 3013 random13 or13 2013 Uixed13 13 On13 each13 row13 following13 the13 variable13 name13 include13 the13 range13 for13 the13 parameter13 that13 deZines13 the13 search13 space13 13 For13 NPAG13 this13 is13 absolute13 ie13 the13 algorithm13 will13 not13 search13 outside13 this13 range13 13 For13 IT2B13 the13 range13 is13 a13 starting13 range13 13 The13 simulator13 will13 ignore13 the13 ranges13 ExamplePriKE13 013 5V13 00113 100KA13 013 5KCP13 013 5KPC13 013 13 5Tlag113 013 2IC313 013 10000FA113 013 1

Covariates

Covariates13 are13 subject13 speciZic13 data13 such13 as13 body13 weight13 contained13 in13 the13 data13 csv13 Zile13 The13 covariate13 names13 which13 are13 the13 column13 names13 in13 the13 data13 Zile13 can13 be13 included13 here13 for13 use13 in13 secondary13 variable13 equations13 The13 order13 should13 be13 the13 same13 as13 in13 the13 data13 Zile13 and13 although13 the13 names13 do13 not13 have13 to13 be13 the13 same13 we13 strongly13 encourage13 you13 to13 make13 them13 the13 same13 to13 avoid13 confusionCovariates13 are13 applied13 at13 each13 dose13 event13 13 The13 Zirst13 dose13 event13 for13 each13 subject13 must13 have13 a13 value13 for13 every13 covariate13 in13 the13 data13 Zile13 13 By13 default13 missing13 covariate13 values13 for13 subsequent13 dose13 events13 are13 linearly13 interpolated13 between13 existing13 values13 or13 carried13 forward13 if13 the13 Zirst13 value13 is13 the13 only13 non-shy‐missing13 entry13 13 To13 suppress13 interpolation13 and13 carry13 forward13 the13 previous13 value13 in13 a13 piece-shy‐wise13 constant13 fashion13 include13 an13 exclamation13 point13 ()13 in13 any13 declaration13 lineNote13 that13 any13 covariate13 relationship13 to13 any13 parameter13 may13 be13 described13 as13 the13 user13 wishes13 by13 mathematical13 equations13 and13 Fortran13 code13 allowing13 for13 exploration13 of13 complex13 non-shy‐linear13 time-shy‐dependent13 andor13 conditional13 relationshipsExampleCovwtcypIC()

Userrsquos13 Guide13 13 1113 13

where13 IC13 will13 be13 piece-shy‐wise13 constant13 and13 the13 other13 two13 will13 be13 linearly13 interpolated13 for13 missing13 values

Secondary13 variables

Secondary13 variables13 are13 those13 that13 are13 deZined13 by13 equations13 that13 are13 combinations13 of13 primary13 covariates13 and13 other13 secondary13 variables13 If13 using13 other13 secondary13 variables13 deZine13 them13 Zirst13 within13 this13 block13 Equation13 syntax13 must13 be13 Fortran13 It13 is13 permissible13 to13 have13 conditional13 statements13 but13 because13 expressions13 in13 this13 block13 are13 translated13 into13 variable13 declarations13 in13 Fortran13 expressions13 other13 than13 of13 the13 form13 X13 =13 function(Y)13 must13 be13 preZixed13 by13 a13 +13 and13 contain13 only13 variables13 which13 have13 been13 previously13 deZined13 in13 the13 Primary13 Covariate13 or13 Secondary13 blocksExampleSecCL13 =13 Ke13 13 V13 13 wt075+IF(cyp13 GT13 1)13 CL13 =13 CL13 13 cyp

Bolus13 inputs

By13 default13 inputs13 with13 DUR13 (duration)13 of13 013 in13 the13 data13 csv13 Zile13 are13 delivered13 instantaneously13 to13 the13 model13 compartment13 equal13 to13 the13 input13 number13 ie13 input13 113 goes13 to13 compartment13 113 input13 213 goes13 to13 compartment13 213 etc13 This13 can13 be13 overridden13 with13 NBOLUS(input13 number)13 =13 compartment13 numberExampleBolNBCOMP(1)13 =13 2

Ini1al13 condi1ons

By13 default13 all13 model13 compartments13 have13 zero13 amounts13 at13 time13 013 This13 can13 be13 changed13 by13 specifying13 the13 compartment13 amount13 as13 X()13 =13 expression13 where13 13 is13 the13 compartment13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignoredExampleIniX(2)13 =13 ICV13 (ie13 IC13 is13 a13 covariate13 with13 the13 measured13 trough13 concentration13 prior13 to13 an13 observed13 dose)X(3)13 =13 IC313 (ie13 IC313 is13 a13 Zitted13 amount13 in13 this13 unobserved13 compartment)In13 the13 Zirst13 case13 the13 initial13 condition13 for13 compartment13 213 becomes13 the13 value13 of13 the13 IC13 covariate13 (deZined13 in13 Covariate13 block)13 multiplied13 by13 the13 current13 estimate13 of13 V13 during13 each13 iteration13 13 This13 is13 useful13 when13 a13 subject13 has13 been13 taking13 a13 drug13 as13 an13 outpatient13 and13 comes13 in13 to13 the13 lab13 for13 PK13 sampling13 with13 measurement13 of13 a13 concentration13 immediately13 prior13 to13 a13 witnessed13 dose13 which13 is13 in13 turn13 followed13 by13 more13 sampling13 13 In13 this13 case13 IC13 or13 any13 other13 covariate13 can13 be13 set13 to13 the13 initial13 measured13 concentration13 and13 if13 V13 is13 the13 volume13 of13 compartment13 213 the13 initial13 condition13 (amount)13 in13 compartment13 213 will13 now13 be13 set13 to13 the13 measured13 concentration13 of13 drug13 multiplied13 by13 the13 estimated13 volume13 for13 each13 iteration13 until13 convergenceIn13 the13 second13 case13 the13 initial13 condition13 for13 compartment13 313 becomes13 another13 variable13 IC313 deZined13 in13 the13 Primary13 block13 to13 Zit13 in13 the13 model13 given13 the13 observed13 data

F13 (bioavailability)

Specify13 the13 bioavailability13 term13 if13 present13 Use13 the13 form13 FA()13 =13 expression13 where13 13 is13 the13 input13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignored

Userrsquos13 Guide13 13 1213 13

ExampleFFA(1)13 =13 FA1

Lag13 1me

Specify13 the13 lag13 term13 if13 present13 which13 is13 the13 delay13 after13 an13 absorbed13 dose13 before13 observed13 concentrations13 Use13 the13 form13 TLAG()13 =13 expression13 where13 13 is13 the13 input13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignoredExampleLagTLAG(1)13 =13 Tlag1

Differen1al13 equa1ons

Specify13 a13 model13 in13 terms13 of13 ordinary13 differential13 equations13 in13 Fortran13 format13 XP()13 is13 the13 notation13 for13 dX()dt13 where13 13 is13 the13 compartment13 number13 X()13 is13 the13 amount13 in13 the13 compartment13 There13 can13 be13 a13 maximum13 of13 2013 such13 equationsExampleDifXP(1)13 =13 -shy‐KAX(1)XP(2)13 =13 RATEIV(1)13 +13 KAX(1)13 -shy‐13 (KE+KCP)X(2)13 +13 KPCX(3)XP(3)13 =13 KCPX(2)13 -shy‐13 KPCX(3)RATEIV(1)13 is13 the13 notation13 to13 indicate13 an13 infusion13 of13 input13 113 (typically13 drug13 1)13 13 The13 duration13 of13 the13 infusion13 and13 total13 dose13 is13 deZined13 in13 the13 data13 csv13 Zile13 Up13 to13 713 inputs13 are13 currently13 allowed13 13 These13 can13 be13 used13 in13 the13 model13 Zile13 as13 RATEIV(1)13 RATEIV(2)13 etc13 13 The13 compartments13 for13 13 receiving13 the13 inputs13 of13 oral13 (bolus)13 doses13 are13 deZined13 in13 the13 Bolus13 block

Outputs

Output13 equations13 in13 Fortran13 format13 Outputs13 are13 of13 the13 form13 Y()13 =13 expression13 where13 13 is13 the13 output13 equation13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignored13 There13 can13 be13 a13 maximum13 of13 613 outputs13 13 They13 are13 referred13 to13 as13 Y(1)13 Y(2)13 etcExampleOutY(1)13 =13 X(2)V

Error

This13 block13 contains13 all13 the13 information13 Pmetrics13 requires13 for13 the13 structure13 of13 the13 error13 model13 13 In13 Pmetrics13 each13 observation13 is13 weighted13 by13 1error213 13 13 There13 are13 two13 choices13 for13 the13 error13 term

113 13 error13 =13 SD13 13 gamma213 13 error13 =13 (SD213 +13 lamda2)0513 (Note13 that13 lambda13 is13 only13 available13 in13 NPAG13 currently)

where13 SD13 is13 the13 standard13 deviation13 (SD)13 of13 each13 observation13 [obs]13 and13 gamma13 and13 lambda13 are13 terms13 to13 capture13 extra13 process13 noise13 related13 to13 the13 observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 SD13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 The13 13 values13 for13 the13 coefZicients13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13

Userrsquos13 Guide13 13 1313 13

coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly() 13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0In13 the13 multiplicative13 model13 13 gamma13 is13 a13 scalar13 on13 SD13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 Lambda13 is13 an13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 We13 tend13 to13 prefer13 lambda

To13 specify13 the13 model13 in13 this13 block13 the13 Zirst13 line13 needs13 to13 be13 either13 L=[number]13 or13 G=[number]13 for13 a13 lambda13 or13 gamma13 error13 model13 13 The13 [number]13 term13 is13 the13 starting13 value13 for13 lambda13 or13 gamma13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present13 13 For13 gamma13 good13 starting13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality13 13 If13 you13 include13 an13 exclamation13 point13 ()13 in13 the13 declaration13 then13 lambda13 or13 gamma13 will13 be13 Zixed13 and13 not13 estimated13 13 Note13 that13 you13 can13 only13 Zix13 lambda13 currently13 to13 zeroThe13 next13 line(s)13 contain13 the13 values13 for13 C013 C113 C213 and13 C313 separated13 by13 commas13 13 There13 should13 be13 one13 line13 of13 coefZicients13 for13 each13 output13 equation13 13 By13 default13 Pmetrics13 will13 use13 values13 for13 these13 coefZicients13 found13 in13 the13 data13 Zile13 13 If13 none13 are13 present13 or13 if13 the13 model13 declaration13 line13 contains13 an13 exclamation13 point13 ()13 the13 values13 here13 will13 be13 used

Example13 113 estimated13 lambda13 starting13 at13 0413 one13 output13 use13 data13 Zile13 coefZicients13 but13 if13 missing13 use13 010100ErrL=04010100

Example13 213 Zixed13 gamma13 of13 213 two13 outputs13 use13 data13 Zile13 coefZicients13 but13 if13 missing13 use13 01010013 for13 the13 Zirst13 output13 but13 use13 0313 0113 013 013 for13 output13 213 regardless13 of13 what13 is13 in13 the13 data13 ZileErrG=2010100030100

Extra

This13 block13 is13 for13 advanced13 Fortran13 programmers13 only13 13 Occasionally13 for13 very13 complex13 models13 additional13 Fortran13 subroutines13 are13 required13 13 They13 can13 be13 placed13 here13 13 The13 code13 must13 specify13 complete13 Fortran13 subroutines13 which13 can13 be13 called13 from13 other13 blocks13 with13 appropriate13 call13 functions13 13

Reserved13 Names

The13 following13 cannot13 be13 used13 as13 primary13 covariate13 or13 secondary13 variable13 names13 They13 can13 be13 used13 in13 equations13 however

Reserved13 Variable Func1on13 in13 Pmetricsndim internal

t time

Userrsquos13 Guide13 13 1413 13

x array13 of13 compartment13 amounts

xp array13 of13 Zirst13 derivative13 of13 compartment13 amounts

rpar internal

ipar internal

p array13 of13 primary13 parameters

r input13 rates

b input13 boluses

npl internal

numeqt output13 equation13 number

ndrug input13 number

nadd covariate13 number

rateiv intravenous13 input13 for13 inputs13 when13 DURgt013 in13 data13 Ziles

cv covariate13 values13 array

n number13 of13 compartments

nd internal

ni internal

nup internal

nuic internal

np number13 of13 primary13 parameters

nbcomp bolus13 compartment13 array

psym names13 of13 primary13 parameters

fa biovailability

tlag lag13 time

tin internal

tout internal

Complete13 Example

Here13 is13 a13 complete13 example13 of13 a13 model13 Zile13 as13 of13 Pmetrics13 version13 04013 and13 higher

Userrsquos13 Guide13 13 1513 13

NotesBy13 omitting13 a13 Diffeq13 block13 with13 ODEs13 Pmetrics13 understands13 that13 you13 are13 specifying13 the13 model13 to13 be13 solved13 algebraically13 In13 this13 case13 at13 least13 KE13 and13 V13 must13 be13 in13 the13 Primary13 or13 Secondary13 variables13 KA13 KCP13 and13 KPC13 are13 optional13 and13 specify13 absorption13 and13 transfer13 to13 and13 from13 the13 central13 to13 a13 peripheral13 compartment13 respectively

PriKE13 013 5V013 0113 100KA13 013 5Tlag113 013 3Cov13 wt

SecV13 =13 V0wt

LagTLAG(1)13 =13 Tlag1

OutY(1)13 =13 X(2)V

ErrL=04010100

Userrsquos13 Guide13 13 1613 13

Brief13 Fortran13 Tutorial

Much13 more13 detailed13 help13 is13 available13 from13 httpwwwcsmtuedu~sheneCOURSEScs201NOTESfortranhtml

Arithmetic Operator Meaning

+ addition

- subtraction

multiplication

division

exponentiation

Relational Operator Alternative Operator Meaning

lt LT less than

lt= LE less than or equal

gt GT greater than

gt= GE greater than or equal

== EQ equal

= NE not equal

Selective Execution Example

IF (logical-expression) one-statement IF (T gt= 100) CL = 10

IF (logical-expression) THEN statementsEND IF

IF (T gt= 100) THEN CL = 10 V = 10END IF

IF (logical-expression) THEN statements-1ELSE statements-2END IF

IF (T gt= 100) THEN CL = 10ELSE CL = CLEND IF

Userrsquos13 Guide13 13 1713 13

How to use R and PmetricsSeCng13 up13 a13 Pmetrics13 project

When13 beginning13 a13 new13 modeling13 project13 it13 is13 convenient13 to13 use13 the13 command13 PMtree(ldquoproject namerdquo)13 13 This13 command13 will13 set13 up13 a13 new13 directory13 in13 the13 current13 working13 directory13 named13 whatever13 you13 have13 included13 as13 the13 ldquoproject13 namerdquo13 13 For13 example13 a13 directory13 called13 ldquoDrugXrdquo13 will13 be13 created13 by13 PMtree(ldquoDrugXrdquo)13 13 Beneath13 this13 directory13 several13 subdirectories13 will13 be13 also13 created13 Rscript13 Runs13 Sim13 and13 src13 13 The13 Rscript13 subdirectory13 will13 contain13 a13 skeleton13 R13 script13 to13 begin13 Pmetrics13 runs13 in13 the13 new13 project13 13 The13 Runs13 subdirectory13 should13 contain13 all13 Ziles13 required13 for13 a13 run13 (described13 next)13 and13 it13 will13 also13 contain13 the13 resulting13 numerically13 ordered13 run13 directories13 created13 after13 each13 Pmetrics13 NPAG13 or13 IT2B13 run13 13 The13 Sim13 subdirectory13 can13 contain13 any13 Ziles13 related13 to13 simulations13 and13 the13 src13 subdirectory13 should13 contain13 original13 and13 manipulated13 source13 data13 Ziles13 13 Of13 course13 you13 are13 free13 to13 edit13 this13 directory13 tree13 structure13 as13 you13 please13 or13 make13 your13 own13 entirely

GeCng13 the13 required13 files13 to13 run13 Pmetrics

When13 you13 wish13 to13 execute13 a13 Pmetrics13 run13 you13 must13 ensure13 that13 appropriate13 Pmetrics13 model13 txt13 and13 data13 csv13 Ziles13 are13 in13 the13 working13 directory13 ie13 the13 Runs13 subdirectory13 of13 the13 project13 directory13 13 13 13 R13 can13 be13 used13 to13 help13 prepare13 the13 data13 csv13 Zile13 by13 importing13 and13 manipulating13 spreadsheets13 (eg13 readcsv())13 13 The13 Pmetrics13 function13 PMcheck()13 can13 be13 used13 to13 check13 a13 csv13 Zile13 or13 an13 R13 dataframe13 that13 is13 to13 be13 saved13 as13 a13 Pmetrics13 data13 13 csv13 Zile13 for13 errors13 13 13 13 13 13 It13 can13 also13 check13 a13 model13 Zile13 for13 errors13 in13 the13 context13 of13 a13 dataZile13 eg13 covariates13 that13 do13 not13 match13 13 PMfixMatrix()13 attempts13 to13 automatically13 rid13 data13 Ziles13 of13 errors13 13 The13 function13 PMwriteMatrix() 13 can13 be13 used13 to13 write13 the13 R13 data13 object13 in13 the13 correct13 format13 for13 use13 by13 IT2B13 NPAG13 or13 the13 Simulator13 13 You13 can13 also13 download13 sample13 data13 and13 scripts13 from13 the13 Pmetrics13 downloads13 section13 of13 our13 website13 once13 you13 sign13 in13 with13 your13 LAPK13 user13 email13 address13 and13 password13 13 Edit13 prior13 versions13 of13 model13 Ziles13 to13 make13 new13 model13 Ziles

Using13 scripts13 to13 control13 Pmetrics

As13 you13 will13 see13 in13 the13 skeleton13 R13 script13 made13 by13 PMtree() and13 placed13 in13 the13 Rscript13 subdirectory13 if13 this13 is13 a13 Zirst-shy‐time13 run13 the13 R13 commands13 to13 run13 IT2B13 or13 NPAG13 are13 as13 follows13 13 Recall13 that13 the13 ldquordquo13 character13 is13 a13 comment13 character

library(Pmetrics)Run 1 - add your run description heresetwd(ldquoworking directoryrdquo)NPrun() for NPAG or ITrun() for IT2B

The13 Zirst13 line13 will13 load13 the13 Pmetrics13 library13 of13 functions13 13 The13 second13 line13 sets13 the13 working13 directory13 to13 the13 speciZied13 path13 13 The13 third13 line13 generates13 the13 batch13 Zile13 to13 run13 NPAG13 or13 IT2B13 and13 saves13 it13 to13 the13 working13 directory13

NOTE13 13 On13 Mac13 systems13 the13 batch13 Zile13 will13 be13 automatically13 launched13 in13 a13 Terminal13 window13 13 On13 Windows13 systems13 the13 batch13 Zile13 must13 be13 launched13 manually13 by13 double13 clicking13 the13 np_runbat13 or13 it_runbat13 Zile13 in13 the13 working13 directory

ITrun() 13 and13 NPrun()13 both13 return13 the13 full13 path13 of13 the13 output13 directory13 to13 the13 clipboard13 13 By13 default13 runs13 are13 placed13 in13 folders13 numbered13 sequentially13 beginning13 with13 ldquo1rdquoNow13 the13 output13 of13 IT2B13 or13 NPAG13 needs13 to13 be13 loaded13 into13 R13 so13 the13 next13 command13 does13 this

NPload(run_number) or ITload(run_number)

Details13 of13 these13 commands13 and13 what13 is13 loaded13 are13 described13 in13 the13 R13 documentation13 (NPload 13 or13 ITload)13 and13 in13 the13 following13 section13 13 The13 run_number13 should13 be13 included13 within13 the13 parentheses13 to13 be13 appended13 to13 the13 names13

Userrsquos13 Guide13 13 1813 13

of13 loaded13 R13 objects13 allowing13 for13 comparison13 between13 runs13 eg13 NPload(1)13 13 Finally13 at13 this13 point13 other13 Pmetrics13 commands13 can13 be13 added13 to13 the13 script13 to13 process13 the13 data13 such13 as13 the13 following

plot(final1)plot(cycle1)plot(op1type=rdquopoprdquo) or plot(op1$pop1)plot(op1) default is to plot posterior predictions for output 1plot(op1type=rdquopoprdquoresid=T)

Of13 course13 the13 full13 power13 of13 R13 can13 be13 used13 in13 scripts13 to13 analyze13 data13 but13 these13 simple13 statements13 serve13 as13 examplesIf13 you13 do13 not13 use13 the13 PMtree() structure13 we13 suggest13 that13 the13 R13 script13 for13 a13 particular13 project13 be13 saved13 into13 a13 folder13 called13 ldquoRscriptrdquo13 or13 some13 other13 meaningful13 name13 in13 the13 working13 directory13 13 Folders13 are13 not13 be13 moved13 by13 the13 batch13 Zile13 13 Within13 the13 script13 number13 runs13 sequentially13 and13 use13 comments13 liberally13 to13 13 distinguish13 runs13 as13 shown13 below

library(Pmetrics)

Run 1 - Ka Kel V all subjectssetwd(ldquoworking directoryrdquo)NPrun() assumes model=rdquomodeltxtrdquo and data=rdquodatacsvrdquoNPload(1)

Remember13 in13 R13 that13 the13 command13 example(function) will13 provide13 examples13 for13 the13 speciZied13 function13 13 Most13 Pmetrics13 functions13 have13 examples

Pmetrics Data ObjectsAfter13 a13 successful13 IT2B13 or13 NPAG13 run13 an13 R13 dataZile13 is13 saved13 in13 the13 output13 subdirectory13 of13 the13 newly13 created13 numerically13 ordered13 folder13 in13 the13 working13 directory13 13 After13 IT2B13 this13 Zile13 is13 called13 ldquoIT2BoutRdatardquo13 and13 after13 NPAG13 it13 is13 called13 ldquoNPAGoutRdatardquo13 13 As13 mentioned13 in13 the13 previous13 section13 these13 data13 Ziles13 can13 be13 loaded13 by13 ensuring13 that13 the13 Runs13 folder13 is13 set13 as13 the13 working13 directory13 and13 then13 using13 the13 Pmetrics13 commands13 ITload(run_num)13 or13 NPload(run_num)

Both13 commands13 load13 their13 respective13 Rdata13 Ziles13 into13 R13 making13 the13 contained13 objects13 available13 for13 plotting13 and13 other13 analysisObjects13 loaded13 by13 ITload(run_num) and NPload(run_num)

Objects Variables Comments

op13 (class13 PMop13 list) $pop113 $post113 Population13 and13 posterior13 predictions13 for13 each13 output13 equation13 ie13 113 213

13 $id Subject13 identiZication

13 $time Observation13 time13 in13 relative13 decimal13 hours

13 $obs Observation

13 $pred Prediction13 based13 on13 median13 of13 population13 or13 posterior13 parameter13 value13 distributions

Userrsquos13 Guide13 13 1913 13

Objects Variables Comments

13 $block Dosing13 block13 usually13 113 unless13 data13 Zile13 contains13 EVID=413 dose13 reset13 events13 in13 which13 case13 each13 such13 reset13 within13 a13 given13 ID13 will13 increment13 the13 dosing13 block13 by13 113 for13 that13 ID

13 $obsSD Calculated13 standard13 deviation13 (error)13 of13 the13 observation13 based13 on13 the13 assay13 error13 polynomial

13 $d Difference13 between13 pred13 and13 obs

13 $ds Squared13 difference13 between13 pred13 and13 obs

13 $wd $d13 weighted13 by13 the13 $obsSD

13 $wds $ds13 weighted13 by13 the13 $obsSD

Zinal13 (class13 PMZinal13 list) $popPoints (NPAG13 only)13 Dataframe13 of13 the13 Zinal13 cycle13 joint13 population13 density13 of13 grid13 points13 with13 column13 names13 equal13 to13 the13 name13 of13 each13 random13 parameter13 plus13 $prob13 for13 the13 associated13 probability13 of13 that13 point13

$popMean The13 Zinal13 cycle13 mean13 for13 each13 random13 parameter13 distribution

$popSD The13 Zinal13 cycle13 standard13 deviation13 for13 each13 random13 parameter13 distribution

$popCV The13 Zinal13 cycle13 coefZicient13 of13 variation13 for13 each13 random13 parameter13 distribution

$popVar The13 Zinal13 cycle13 variance13 for13 each13 random13 parameter13 distribution

$popCov The13 Zinal13 cycle13 covariance13 matrix13 for13 each13 random13 parameter13 distribution

$popCor The13 Zinal13 cycle13 correlation13 matrix13 for13 each13 random13 parameter13 distribution

$popMedian The13 Zinal13 cycle13 median13 for13 each13 random13 parameter13 distribution

$gridpts (NPAG13 only)13 The13 initial13 number13 of13 support13 points

$ab Matrix13 of13 boundaries13 for13 random13 parameter13 values13 13 For13 NPAG13 this13 is13 speciZied13 by13 the13 user13 prior13 to13 the13 run13 for13 IT2B13 it13 is13 calculated13 as13 a13 user13 speciZied13 multiple13 of13 the13 SD13 for13 the13 parameter13 value13 distribution

Userrsquos13 Guide13 13 2013 13

Objects Variables Comments

cycle13 (class13 PMcycle13 list) $names Vector13 of13 names13 of13 the13 random13 parameters

$ll Matrix13 of13 cycle13 number13 and13 -shy‐2Log-shy‐likelihood13 at13 each13 cycle

$gamlam A13 matrix13 of13 cycle13 number13 and13 gamma13 or13 lambda13 at13 each13 cycle13 (see13 item13 1613 under13 NPAG13 Runs13 below13 for13 a13 discussion13 of13 gamma13 and13 lambda)

$mean A13 matrix13 of13 cycle13 number13 and13 the13 mean13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 mean

$sd A13 matrix13 of13 cycle13 number13 and13 the13 standard13 deviation13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$median A13 matrix13 of13 cycle13 number13 and13 the13 median13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$aic A13 matrix13 of13 cycle13 number13 and13 Akaike13 Information13 Criterion13 at13 each13 cycle

$bic A13 matrix13 of13 cycle13 number13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle

cov13 (class13 PMcov13 dataframe)

$id Subject13 identiZication

$time Time13 for13 each13 covariate13 entry

covariates Covariate13 values13 for13 each13 subject13 at13 each13 time13 extracted13 from13 the13 raw13 data13 Zile

parameters Mean13 median13 or13 mode13 of13 Bayesian13 posterior13 distribution13 for13 each13 random13 parameter13 in13 the13 model13 13 Mode13 summaries13 are13 available13 for13 NPAG13 output13 only13 and13 the13 default13 is13 median13 13 Values13 are13 recycled13 for13 each13 row13 within13 a13 given13 subject13 with13 the13 number13 of13 rows13 driven13 by13 the13 number13 of13 covariate13 entries

Userrsquos13 Guide13 13 2113 13

Objects Variables Comments

pop13 (class13 PMpop13 dataframe)

post13 (class13 PMpost13 dataframe)

NPAG13 only

$id Subject13 identiZication

$pred113 Population13 prior13 (PMpop)13 or13 Bayesian13 posterior13 (PMpost)13 predictions13 for13 each13 output13 equation13 based13 on13 mean13 median13 and13 mode13 as13 speciZied13 by13 the13 user13 and13 with13 frequency13 also13 speciZied13 by13 the13 user13 in13 the13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

$block Same13 as13 for13 PMop13 objects13 above

NPdata13 (class13 NPAG13 list)13 ITdata13 (class13 IT2B13 list

Raw13 data13 used13 to13 make13 the13 above13 objects13 13 Please13 use13 NPparse13 or13 ITparse13 in13 R13 for13 discussion13 of13 the13 data13 contained13 in13 these13 objects

Since13 R13 is13 an13 object13 oriented13 language13 to13 access13 the13 observations13 in13 a13 PMop13 object13 for13 example13 use13 the13 following13 syntax13 op$post1$obsNote13 that13 you13 will13 place13 an13 integer13 within13 the13 parentheses13 of13 the13 loading13 functions13 eg13 NPload(1)13 which13 will13 sufZix13 all13 the13 above13 objects13 with13 that13 integer13 eg13 op113 Zinal113 NPdata113 13 This13 allows13 several13 models13 to13 be13 loaded13 into13 R13 simultaneously13 each13 with13 a13 unique13 sufZix13 and13 which13 can13 be13 compared13 with13 the13 PMcompare()13 command13 (see13 Model13 Diagnostics13 below)

Making New Pmetrics ObjectsOnce13 you13 have13 loaded13 the13 raw13 (NPdata13 or13 ITdata)13 or13 processed13 (op13 Uinal13 cycle13 pop13 post)13 data13 objects13 described13 above13 with13 NPload(run_num)13 or13 ITload(run_num)13 should13 you13 wish13 to13 remake13 the13 processed13 objects13 with13 parameters13 other13 than13 the13 defaults13 you13 can13 easily13 do13 so13 with13 the13 make 13 family13 of13 commands13 13 For13 example13 the13 default13 for13 PMop13 observed13 vs13 predicted13 objects13 is13 to13 use13 the13 prediction13 based13 on13 the13 median13 of13 the13 population13 or13 posterior13 distribution13 13 If13 you13 wish13 to13 use13 the13 mean13 of13 the13 distribution13 remake13 the13 PMop13 object13 using makeOP()13 13 If13 you13 wish13 to13 see13 all13 the13 cycle13 information13 in13 a13 PMcycle13 object13 not13 omitting13 the13 Zirst13 1013 of13 cycles13 by13 default13 remake13 it13 using13 makeCycle()13 13

For13 all13 of13 the13 following13 commands13 the13 data13 input13 is13 either13 NPdata13 or13 ITdata13 with13 additional13 function13 arguments13 speciZic13 to13 each13 command13 13 Accessing13 the13 help13 for13 each13 function13 in13 R13 will13 provide13 further13 details13 on13 the13 arguments13 defaults13 and13 output13 of13 each13 command

Userrsquos13 Guide13 13 2213 13

Command Description R13 help

makeAUC Make13 a13 dataframe13 of13 class13 PMauc13 containing13 subject13 ID13 and13 AUC13 from13 a13 variety13 of13 inputs13 including13 objects13 of13 PMop13 PMsim13 or13 a13 suitable13 dataframe

makeAUC

makeCov Generate13 a13 dataframe13 of13 class13 PMcov13 with13 subject-shy‐speciZic13 covariates13 extracted13 from13 the13 data13 csv13 Zile13 This13 object13 can13 be13 plotted13 and13 used13 to13 test13 for13 covariates13 which13 are13 signiZicantly13 associated13 with13 model13 parameters13 13

makeCov

makeCycle Create13 a13 PMcycle13 object13 described13 in13 the13 previous13 section makeCycle

makeFinal Create13 a13 PMZinal13 object13 described13 in13 the13 previous13 section makeFinal

makeOP Create13 a13 PMop13 object13 described13 in13 the13 previous13 section makeOP

makeNCA Create13 a13 dataframe13 (class13 PMnca)13 with13 the13 output13 of13 a13 non-shy‐compartmental13 analysis13 using13 PMpost13 and13 NPAG13 data13 objects13 as13 input13 13 The13 PMnca13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull auc13 Area13 under13 the13 time-shy‐observation13 curve13 using13 the13

trapezoidal13 approximation13 from13 time13 013 until13 the13 second13 dose13 or13 if13 only13 one13 dose13 until13 the13 last13 observation

bull aumc13 Area13 under13 the13 Zirst13 moment13 curvebull k13 Slope13 by13 least-shy‐squares13 linear13 regression13 of13 the13 Zinal13

613 log-shy‐transformed13 observations13 vs13 timebull auclast13 Area13 under13 the13 curve13 from13 the13 time13 of13 the13

last13 observation13 to13 inZinity13 calculated13 as13 [Final13 obs]kbull aumclast13 Area13 under13 the13 Zirst13 moment13 curve13 from13

the13 time13 of13 the13 last13 observation13 to13 inZinitybull aucinf13 Area13 under13 the13 curve13 from13 time13 013 to13 inZinity13

caluculated13 as13 auc13 +13 auclastbull aumcinf13 Area13 under13 the13 Zirst13 moment13 curve13 from13

time13 013 to13 inZinitybull mrt13 Mean13 residence13 time13 calculated13 as13 1kbull cmax13 Maximum13 predicted13 concentration13 after13 the13

Zirst13 dosebull tmax13 Time13 to13 cmaxbull cl13 Clearance13 calculated13 as13 doseaucinfbull vdss13 Volume13 of13 distribution13 at13 steady13 state13

calculated13 as13 clmrtbull thalf13 Half13 life13 of13 elimination13 calculated13 as13 ln(2)kbull dose13 First13 dose13 amount13 for13 each13 subject

makeNCA

Userrsquos13 Guide13 13 2313 13

Command Description R13 help

makeErrorPoly This13 function13 plots13 Zirst13 second13 and13 third13 order13 polynomial13 functions13 Zitted13 to13 pairs13 of13 observations13 and13 associated13 standard13 deviations13 for13 a13 given13 output13 assay13 In13 this13 way13 the13 standard13 deviation13 associated13 with13 any13 observation13 may13 be13 calculated13 and13 used13 to13 appropriately13 weight13 that13 observation13 in13 the13 model13 building13 process13 Observations13 are13 weighted13 by13 the13 reciprocal13 of13 the13 variance13 or13 squared13 standard13 deviation13 13 Output13 of13 the13 function13 is13 a13 plot13 of13 the13 measured13 observations13 and13 Zitted13 polynomial13 curves13 and13 a13 list13 with13 the13 Zirst13 second13 and13 third13 order13 coefZicients

makeErrorPoly

makePTA This13 function13 performs13 a13 Probability13 of13 Target13 Attainment13 analysis13 for13 a13 set13 of13 simulated13 doses13 and13 time-shy‐concentration13 proZiles13 13 Targets13 (eg13 Minimum13 Inhibitory13 Concentrations)13 the13 type13 of13 target13 attainment13 (ie13 time13 above13 target13 Cmaxtarget13 13 AUCtarget13 Cmintarget13 or13 Cxtarget13 where13 x13 is13 any13 time13 point)13 and13 the13 success13 threshold13 (eg13 time13 gt13 0713 or13 Cmaxtarget13 gt13 10)13 can13 all13 be13 speciZied13 13 Output13 is13 a13 list13 (class13 PMpta)13 with13 two13 objectsbull Results13 a13 413 dimensional13 array13 with13 dimension13 size13 of13

[number13 of13 doses13 number13 of13 targets13 number13 of13 simulated13 proZiles13 1]13 which13 gives13 the13 target13 attainment13 (eg13 Cmaxtarget)13 for13 each13 dose13 target13 and13 proZile

bull Outcome13 For13 each13 dose13 and13 target13 a13 summary13 of13 the13 target13 attainment13 for13 all13 the13 proZiles13 including13 mean13 standard13 deviation13 and13 proportion13 above13 the13 success13 threshold

PMpta13 objects13 can13 be13 summarized13 with13 summary(x)13 and13 plotted13 with13 plot(x)13

makePTA

Userrsquos13 Guide13 13 2413 13

Command Description R13 help

makePopmakePost(NPAG13 only)

These13 functions13 create13 dataframes13 of13 class13 PMpop13 and13 PMpost13 respectively13 13 The13 PMpop13 or13 PMpost13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull time13 Times13 for13 predicted13 concentrations13 13 These13

times13 are13 not13 necessarily13 at13 observed13 times13 but13 at13 a13 frequency13 speciZied13 in13 the13 NPAG13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

bull pred113 Predictions13 for13 output13 113 13 For13 PMpop13 objects13 predictions13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 population13 prior13 distribution13 13 For13 PMpost13 objects13 they13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject

bull pred213 pred313 etc13 If13 additional13 outputs13 exist13 they13 will13 each13 be13 columns13 in13 the13 dataframe13 just13 as13 for13 pred113 13

makePopmakePost

NPAG RunsIn13 the13 past13 users13 had13 to13 run13 NPAG13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 NPrun()13 13 However13 if13 NPrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable

1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 NPAG13 creates13 a13 temporary13 instruction13 Zile13 in13 case13 something13 happens13 so13 that13 instructions13 entered13 to13 date13 can13

be13 recovered13 13 Accept13 the13 default13 by13 choosing13 113 13 You13 can13 save13 with13 a13 meaningful13 Zilename13 later13 13 If13 it13 already13 exists13 you13 will13 be13 asked13 if13 you13 wish13 to13 overwrite13 the13 Zile13 which13 is13 usually13 the13 thing13 to13 do

Userrsquos13 Guide13 13 2513 13

8 If13 you13 have13 previously13 run13 IT2B13 you13 can13 automatically13 import13 the13 suggested13 parameter13 ranges13 13 Choose13 113 to13 do13 this13 and13 013 to13 run13 NPAG13 without13 a13 previous13 IT2B13 run81 If13 you13 choose13 option13 113 you13 must13 specify13 the13 name13 of13 a13 FROMxxxx13 Zile13 typically13 FROM000113 that13 you13 can13

Zind13 in13 an13 output13 directory13 after13 a13 successful13 IT2B13 run13 13 Note13 that13 the13 program13 will13 then13 assume13 that13 you13 are13 using13 the13 same13 wrk13 Ziles13 that13 IT2B13 made13 from13 your13 data13 csv13 Zile13 13 It13 is13 strongly13 recommended13 to13 override13 this13 and13 specify13 a13 data13 csv13 Zile13 13 At13 this13 point13 you13 will13 jump13 to13 1013 below13 and13 continue13 on13 however13 your13 answers13 will13 often13 be13 supplied13 by13 the13 instructions13 contained13 in13 the13 FROMxxxx13 Zile13 and13 you13 need13 merely13 conZirm13 them

9 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13 have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 NPrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis91 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13

for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

10 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 NPAG13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

11 Enter13 the13 name13 of13 your13 csv13 Zile13 now12 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile13 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset131 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects132 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry14 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset15 Enter13 the13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo 13 followed13 by13

return16 Select13 how13 you13 would13 like13 to13 model13 assay13 (observation)13 error13 for13 each13 output13 equation13 13 You13 have13 four13 choices13 13

In13 all13 four13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0161 Error13 model13 113 (SD)13 13 Choose13 this13 option13 if13 you13 have13 already13 run13 IT2B13 and13 multiplied13 your13 assay13 error13

polynomial13 by13 gamma13 (see13 next13 option13 for13 a13 description13 of13 gamma)162 Error13 model13 213 (SD13 13 gamma)13 13 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13

observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 If13 you13 choose13 this13 option13 you13 then13 can13 specify13 the13 starting13 value13 of13 gamma13 13 Good13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality

163 Error13 model13 313 (SD213 +13 lamda2)0513 13 Lamda13 is13 an13 alternative13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present

Userrsquos13 Guide13 13 2613 13

164 Error13 model13 413 SD13 =13 gamma13 13 This13 model13 is13 rarely13 used13 and13 is13 equivalent13 to13 specifying13 a13 model13 with13 C013 only13 ie13 a13 constant13 error13 regardless13 of13 concentration

17 Once13 you13 select13 the13 assay13 error13 model13 for13 each13 output13 equation13 you13 are13 then13 offered13 four13 more13 options13 on13 which13 assay13 error13 polynomial13 coefZicients13 to13 use13 13 Choices13 113 and13 213 are13 the13 most13 commonly13 used171 Choice13 113 The13 default13 13 Use13 coefZicients13 in13 the13 subject13 record13 (C013 C113 C213 C313 in13 the13 data13 csv13 Zile)13 and13 if13

missing13 use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 (item13 1813 below)172 Choice13 213 Use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 for13 all13 subjects13 regardless13 of13 what13 is13 in13 the13

data13 csv13 Zile173 Choice13 313 13 To13 multiply13 data13 csv13 values13 and13 default13 entered13 values13 by13 a13 Zixed13 gamma13 and13 use13 them13 13 174 Choice13 013 Specify13 coefZicients13 on13 a13 subject13 by13 subject13 basis13 either13 those13 in13 the13 data13 csv13 Zile13 already13 the13

default13 values13 entered13 into13 the13 program13 or13 other13 values18 For13 each13 output13 equation13 after13 you13 have13 selected13 the13 option13 in13 item13 1713 you13 will13 be13 prompted13 to13 supply13 the13

required13 information13 including13 the13 general13 default13 values13 for13 missing13 or13 overridden13 values13 in13 the13 data13 csv13 Zile19 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13

usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13

20 Enter13 the13 grid13 point13 index13 13 This13 number13 corresponds13 to13 the13 number13 of13 grid13 (support)13 points13 which13 will13 initially13 Zill13 the13 model13 parameter13 space13 13 The13 larger13 the13 number13 of13 random13 parameters13 to13 be13 estimated13 the13 more13 points13 are13 required13 13 The13 program13 will13 make13 a13 suggestion13 based13 on13 the13 number13 of13 random13 parameters13 in13 the13 model13 13 The13 more13 you13 choose13 the13 slower13 the13 run13 will13 be13 but13 results13 may13 improve13 13 It13 is13 reasonable13 to13 choose13 fewer13 points13 early13 in13 model13 exploration13 and13 increase13 in13 later13 phases13 or13 if13 poor13 model13 Zits13 or13 lack13 of13 convergence13 are13 noted13 The13 choices13 are13 113 to13 713 corresponding13 respectively13 to13 212913 500313 1000713 2001113 4000913 and13 8002113 points13 13 If13 you13 choose13 713 you13 then13 have13 an13 additional13 choice13 to13 select13 one13 or13 more13 multiples13 of13 8002113 points

21 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 013 or13 greater13 13 If13 you13 enter13 an13 integer13 greater13 than13 013 the13 engine13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13 If13 you13 enter13 013 this13 is13 the13 way13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 an13 independent13 data13 set13 and13 a13 non-shy‐uniform13 prior13 must13 be13 speciZied13 (see13 3013 below)13 13 This13 means13 that13 the13 engine13 will13 only13 calculate13 the13 individual13 Bayesian13 posteriors13 for13 the13 new13 subjects13 using13 the13 population13 joint13 density13 from13 a13 previous13 run13 as13 a13 Bayesian13 prior

22 Information13 about13 convergence13 criteria13 13 Answer13 113 or13 some13 other13 keystroke13 plus13 Return13 to13 acknowledge13 that13 you13 have13 read13 it

23 In13 order13 to13 predict13 concentrations13 from13 a13 non-shy‐parametric13 distribution13 you13 have13 the13 option13 to13 use13 the13 1)13 mean13 2)13 median13 or13 3)13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject13 13 We13 typically13 use13 the13 median13 Zirst13 and13 then13 the13 mean13 in13 a13 separate13 run13 and13 compare13 the13 differences13 13

24 Select13 the13 time13 interval13 to13 generate13 predicted13 concentrations13 13 Additionally13 there13 will13 also13 be13 predictions13 made13 at13 the13 time13 of13 each13 observation13 13 In13 general13 for13 most13 models13 predictions13 every13 1213 minutes13 provide13 sufZicient13 granularity13 13 Smaller13 values13 can13 result13 in13 very13 large13 Ziles13 for13 big13 populations

25 Select13 the13 default13 MIC13 to13 be13 used13 for13 AUCMIC13 ratio13 reporting13 13 This13 should13 generally13 be13 set13 to13 the13 default13 of13 113 by13 choosing13 113 13 You13 can13 always13 extract13 the13 AUC13 later13 and13 divide13 it13 by13 any13 MIC13 you13 choose

26 Enter13 the13 value13 in13 hours13 that13 you13 want13 for13 calculations13 of13 AUCs13 from13 predicted13 concentration13 proZiles13 13 The13 default13 is13 2413 hours13 which13 you13 can13 accept13 by13 entering13 113 or13 013 if13 you13 want13 to13 specify13 a13 different13 interval

27 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

28 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

Userrsquos13 Guide13 13 2713 13

29 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

30 For13 the13 prior13 density13 choose13 113 if13 it13 is13 to13 be13 uniform13 13 This13 means13 that13 the13 initial13 grid13 points13 will13 be13 evenly13 distributed13 with13 equal13 probability13 within13 the13 boundaries13 speciZied13 (in13 1513 above)13 13 If13 you13 choose13 013 you13 will13 be13 prompted13 for13 the13 name13 of13 a13 Zile13 that13 contains13 the13 prior13 density13 13 This13 will13 be13 DEN000113 unless13 you13 have13 changed13 its13 name13 13 It13 will13 be13 found13 in13 the13 output13 directory13 of13 a13 prior13 NPAG13 run13 13 The13 model13 used13 to13 generate13 the13 DEN000113 Zile13 must13 be13 exactly13 the13 same13 as13 the13 current13 model13 including13 parameter13 boundaries13 13 However13 this13 option13 is13 useful13 to13 specify13 a13 non-shy‐uniform13 density13 for13 two13 reasons13 13 The13 Zirst13 is13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 a13 new13 set13 of13 subjects13 13 Do13 this13 in13 combination13 with13 setting13 the13 number13 of13 cycles13 to13 013 (see13 2113 above)13 13 The13 second13 use13 for13 a13 non-shy‐uniform13 prior13 is13 to13 continue13 a13 previous13 run13 13 For13 example13 if13 you13 only13 set13 the13 number13 of13 cycles13 to13 5013 to13 get13 a13 rough13 idea13 of13 model13 Zit13 you13 may13 continue13 where13 you13 left13 off13 by13 specifying13 the13 DEN000113 Zile13 from13 the13 50-shy‐cycle13 run13 and13 continuing13 with13 as13 many13 additional13 cycles13 as13 you13 specify13 in13 item13 2113 13 So13 in13 the13 example13 if13 you13 specify13 10013 cycles13 in13 2113 the13 total13 number13 of13 cycles13 will13 be13 5013 +13 10013 =13 150

31 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 NPrun(instr=ldquoyourfilerdquo)13 option13 and13 including13 ldquoyourZilerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

32 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 NPAG13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 NPAG13 analysis

33 The13 NPAG13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

IT2B RunsIn13 the13 past13 users13 had13 to13 run13 IT2B13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 ITrun()13 13 However13 if13 ITrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13

have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 ITrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis

Userrsquos13 Guide13 13 2813 13

71 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13 for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

8 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 IT2B13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

9 Enter13 the13 name13 of13 your13 csv13 Zile13 now10 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile11 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset111 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects112 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry12 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset13 Enter13 the13 initial13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo13 followed13

by13 return14 The13 estimated13 mean13 for13 each13 parameter13 value13 distribution13 during13 the13 Zirst13 iteration13 will13 be13 the13 median13 of13 the13

range13 speciZied13 in13 1313 13 You13 now13 have13 the13 option13 to13 specify13 the13 standard13 deviation13 for13 the13 parameter13 value13 distribution13 which13 by13 default13 is13 half13 of13 the13 range13 in13 1313 13 Choose13 113 to13 accept13 this13 (the13 usual13 answer)13 or13 013 to13 change13 it13 to13 something13 else13 expressed13 as13 a13 multiple13 of13 the13 range

15 In13 IT2B13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 You13 can13 now13 choose13 113 if13 every13 subject13 has13 the13 same13 coefZicients13 or13 013 to13 use13 a13 unique13 set13 of13 coefZicients13 for13 each13 subject13 13 The13 Zirst13 case13 is13 the13 more13 usual13 when13 all13 13 samples13 from13 all13 subjects13 are13 analyzed13 in13 the13 same13 lab13 13 If13 13 samples13 are13 analyzed13 in13 different13 labs13 and13 you13 have13 the13 assay13 data13 from13 each13 lab13 then13 you13 would13 enter13 013 13 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 (see13 151313 below)13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0151 If13 you13 choose13 113 (one13 set13 of13 coefZicients13 for13 all13 subjects)13 you13 will13 then13 be13 presented13 with13 313 additional13

choices1511 Choice13 113 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13 observation13

including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 and13 to13 Zix13 gamma13 to13 1

1512 Choice13 213 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 but13 to13 estimate13 gamma13 based13 on13 the13 data13 13 This13 is13 the13 usual13 option

1513 Choice13 313 Choose13 this13 option13 if13 you13 wish13 to13 estimate13 the13 assay13 error13 coefZicients13 based13 on13 your13 data13 for13 use13 in13 future13 runs13 13 Although13 you13 can13 access13 this13 option13 by13 using13 either13 ITrun()13 or13 ERRrun()13 in13 R13 the13 instruction13 Ziles13 that13 you13 save13 and13 the13 generated13 output13 Ziles13 will13 be13 different13 13 Therefore13 we13 recommend13 that13 if13 you13 intend13 to13 choose13 this13 option13 use13 ERRrun()13 in13 R13 which13 will13 generate13 an13 ASS000113 Zile13 that13 contains13 the13 estimates13 for13 C013 C113 C213 and13 C313 13 You13 can13 then13 include13 this13 Zile13 in13 the13 working13 directory13 (along13 with13 a13 model13 txt13 Zile13 and13 a13 data13 csv13 Zile)13 to13 do13 an13 IT2B13 run13 supplying13 the13 Zile13 name13 in13 16113 below

Userrsquos13 Guide13 13 2913 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

IntroductionThank13 you13 for13 your13 interest13 in13 Pmetrics13 13 This13 guide13 provides13 instructions13 and13 examples13 to13 assist13 users13 of13 the13 Pmetrics13 R13 package13 by13 the13 Laboratory13 of13 Applied13 Pharmacokinetics13 at13 the13 University13 of13 Southern13 California13 13 Please13 see13 our13 website13 at13 httpwwwlapkorg13 for13 more13 informationHere13 are13 some13 tips13 for13 using13 this13 guidebull Items13 that13 are13 hyperlinked13 can13 be13 selected13 to13 jump13 rapidly13 to13 relevant13 sections13 13 bull At13 the13 bottom13 of13 every13 page13 the13 text13 ldquoUserrsquos13 Guiderdquo13 can13 be13 selected13 to13 jump13 immediately13 to13 the13 table13 of13

contentsbull Items13 in13 courier13 font13 correspond13 to13 R13 commands

Citing PmetricsPlease13 help13 us13 maintain13 our13 funding13 to13 provide13 Pmetrics13 as13 a13 free13 research13 tool13 to13 the13 pharmacometric13 community13 13 If13 you13 use13 Pmetrics13 in13 a13 publication13 you13 can13 cite13 it13 as13 below13 13 In13 R13 you13 can13 always13 type13 citation(ldquoPmetricsrdquo) to13 get13 this13 same13 referenceNeely13 MN13 van13 Guilder13 MG13 Yamada13 WM13 Schumitzky13 A13 Jelliffe13 RW13 Accurate13 Detection13 of13 Outliers13 and13 Subpopulations13 With13 Pmetrics13 a13 Nonparametric13 and13 Parametric13 Pharmacometric13 Modeling13 and13 Simulation13 Package13 for13 R13 Ther13 Drug13 Monit13 201213 34467ndash47613

DisclaimerYou13 the13 user13 assume13 all13 responsibility13 for13 acting13 on13 the13 results13 obtained13 from13 Pmetrics13 13 The13 USC13 Laboratory13 of13 Applied13 Pharmacokinetics13 members13 and13 consultants13 to13 the13 Laboratory13 of13 Applied13 Pharmacokinetics13 and13 the13 University13 of13 Southern13 California13 and13 its13 employees13 assume13 no13 liability13 whatsoever13 13 Your13 use13 of13 the13 package13 constitutes13 your13 agreement13 to13 this13 provision13

System Requirements and InstallationThere13 are13 three13 required13 software13 components13 which13 must13 be13 installed13 on13 your13 system13 in13 this13 order13

1 R2 The13 Pmetrics13 package13 for13 R3 gfortran13 or13 some13 other13 Fortran13 compiler

13 A13 fourth13 highly13 recommended13 but13 optional13 component13 is13 Rstudio13 a13 user-shy‐friendly13 wrapper13 for13 R13 It13 can13 be13 installed13 any13 time13 after13 installing13 R13 (ie13 step13 113 above)13 All13 components13 have13 versions13 for13 Mac13 and13 Windows13 environments13 and13 32-shy‐13 and13 64-shy‐13 bit13 processors13 13 All13 are13 free13 of13 charge13 13

RR13 is13 a13 free13 software13 environment13 for13 statistical13 computing13 and13 graphics13 which13 can13 be13 obtained13 from13 httpwwwR-shy‐projectorg13 13 Pmetrics13 is13 a13 library13 for13 R

PmetricsIf13 you13 are13 reading13 this13 manual13 then13 you13 have13 likely13 visited13 our13 website13 at13 httpwwwlapkorg13 where13 you13 can13 select13 the13 software13 tab13 and13 download13 our13 products13 including13 Pmetrics

Userrsquos13 Guide13 13 313 13

Pmetrics13 is13 distributed13 as13 a13 package13 source13 Zile13 archive13 (tgz13 for13 Mac13 zip13 for13 Windows)13 13 Do13 not13 open13 the13 archive13 13 To13 install13 Pmetrics13 from13 the13 R13 console13 use13 the13 command13 installpackages(filechoose())13 and13 navigate13 when13 prompted13 to13 the13 folder13 in13 which13 you13 placed13 the13 Pmetrics13 package13 archive13 (zip13 or13 tgz)13 Zile13 13 Pmetrics13 will13 need13 the13 following13 R13 packages13 for13 some13 functions13 chron13 Defaults13 and13 R2HTML13 13 However13 you13 do13 not13 have13 to13 install13 these13 if13 you13 do13 not13 already13 have13 them13 in13 your13 R13 library13 13 They13 should13 automatically13 be13 downloaded13 and13 installed13 the13 Zirst13 time13 you13 use13 a13 Pmetrics13 function13 that13 requires13 them13 but13 if13 something13 goes13 awry13 (such13 as13 no13 internet13 connection13 or13 busy13 server)13 you13 can13 do13 this13 manually

FortranIn13 order13 to13 run13 Pmetrics13 a13 Fortran13 compiler13 is13 required13 13 After13 you13 have13 installed13 Pmetrics13 the13 Zirst13 time13 you13 load13 Pmetrics13 into13 R13 with13 the13 function13 library(Pmetrics)13 the13 program13 will13 ask13 you13 which13 Fortran13 compiler13 you13 are13 using13 13 If13 you13 have13 no13 compiler13 you13 will13 have13 the13 option13 to13 automatically13 link13 you13 to13 the13 OS-shy‐speciZic13 page13 of13 our13 website13 with13 explicit13 instructions13 and13 a13 link13 to13 download13 and13 install13 gfortran13 on13 your13 system13 13 Details13 of13 this13 procedure13 follow13 but13 are13 not13 relevant13 if13 you13 already13 have13 a13 compiler13 installedFor13 Mac13 users13 the13 correct13 version13 of13 gfortran13 will13 be13 downloaded13 for13 your13 system13 (Mountain13 Lion13 64-shy‐bit13 Lion13 64-shy‐bit13 Snow13 Leopard13 64-shy‐13 or13 32-shy‐bit)13 You13 will13 also13 be13 provided13 a13 link13 to13 download13 and13 install13 Applersquos13 Xcode13 application13 if13 you13 do13 not13 already13 have13 it13 on13 your13 system13 13 Xcode13 is13 required13 to13 run13 gfortran13 on13 Macs13 As13 of13 version13 4313 for13 Lion13 Xcode13 is13 available13 from13 the13 App13 store13 for13 free13 13 For13 Snow13 Leopard13 Xcode13 is13 on13 your13 installation13 disk13 13 NOTE13 For13 Xcode13 downloaded13 from13 the13 App13 store13 (Lion13 and13 later)13 you13 must13 additionally13 install13 the13 Command13 Line13 Tools13 available13 in13 the13 Xcode13 Preferences13 -shy‐gt13 Downloads13 paneWindows13 users13 need13 to13 pay13 special13 attention13 because13 the13 the13 ldquogccrdquo13 installer13 that13 provides13 necessary13 common13 libraries13 for13 many13 programming13 languages13 does13 not13 by13 default13 include13 gfortran13 13 When13 gcc13 is13 installed13 be13 sure13 to13 choose13 the13 fortran13 option13 to13 include13 gfortran13 as13 shown13 below

RstudioA13 text13 editor13 that13 can13 link13 to13 R13 is13 useful13 for13 saving13 scripts13 13 Both13 the13 Windows13 and13 Mac13 versions13 of13 R13 have13 rudimentary13 text13 editors13 that13 are13 stable13 and13 reliable13 13 Numerous13 other13 free13 and13 paid13 editors13 can13 also13 do13 the13 job13 and13 these13 can13 be13 located13 by13 searching13 the13 internet13 13 We13 prefer13 Rstudio

What This Manual Is NotWe13 assume13 that13 the13 user13 has13 familiarity13 with13 population13 modeling13 and13 R13 and13 thus13 this13 manual13 is13 not13 a13 tutorial13 for13 basic13 concepts13 and13 techniques13 in13 either13 domain13 13 We13 have13 tried13 to13 make13 the13 R13 code13 simple13 regular13 and13 well13 documented13 13 13 13 A13 very13 good13 free13 online13 resource13 for13 learning13 the13 basics13 of13 R13 can13 be13 found13 at13 httpwwwstatmethodsnetindexhtml13 13 We13 recognize13 that13 initial13 use13 of13 a13 new13 software13 package13 can13 be13 complex13 so13

Userrsquos13 Guide13 13 413 13

Click13 the13 expander13 bu6on

Check13 this13 box

please13 feel13 free13 to13 contact13 us13 at13 any13 time13 preferably13 through13 the13 Pmetrics13 forum13 at13 httpwwwlapkorg13 13 or13 directly13 by13 email13 at13 contactlapkorgThis13 manual13 is13 also13 not13 intended13 to13 be13 a13 theoretical13 treatise13 on13 the13 algorithms13 used13 in13 IT2B13 or13 NPAG13 13 For13 that13 the13 user13 is13 directed13 to13 our13 website13 at13 wwwlapkorg

Getting Help and UpdatesThere13 is13 an13 active13 LAPK13 forum13 available13 from13 our13 website13 at13 httpwwwlapkorg13 with13 all13 kinds13 of13 useful13 tips13 and13 help13 with13 Pmetrics13 13 Register13 (separately13 from13 your13 LAPK13 registration)13 and13 feel13 free13 to13 post13 13 Within13 R13 you13 can13 also13 use13 help(ldquocommandrdquo)13 or13 command13 in13 the13 R13 console13 to13 see13 detailed13 help13 Ziles13 for13 any13 Pmetrics13 command13 13 Many13 commands13 have13 examples13 included13 in13 this13 documentation13 and13 you13 can13 execute13 the13 examples13 with13 example(command)13 Note13 that13 here13 quotation13 marks13 are13 unnecessary13 around13 command13 You13 can13 also13 type13 PMmanual()13 to13 launch13 this13 manual13 from13 within13 Pmetrics13 as13 well13 as13 a13 catalogue13 of13 all13 Pmetrics13 functions13 13 Finally13 PMnews()13 will13 display13 the13 Pmetrics13 changelog

Pmetrics13 will13 check13 for13 updates13 automatically13 every13 time13 you13 load13 it13 with13 library(Pmetrics)13 13 If13 an13 update13 is13 available13 it13 will13 provide13 a13 brief13 message13 to13 inform13 you13 13 You13 can13 then13 use13 PMupdate() to13 update13 Pmetrics13 from13 within13 R13 without13 having13 to13 visit13 our13 website13 13 You13 will13 be13 prompted13 for13 your13 LAPK13 user13 email13 address13 and13 password13 13 When13 bugs13 arise13 in13 Pmetrics13 you13 may13 see13 a13 start13 up13 message13 to13 inform13 you13 of13 the13 bug13 and13 a13 patch13 can13 be13 installed13 by13 the13 command13 PMpatch()13 if13 available13 13 Note13 that13 patches13 must13 be13 reinstalled13 with13 this13 command13 every13 time13 you13 launch13 Pmetrics13 until13 the13 bug13 is13 corrected13 in13 the13 next13 versionAs13 of13 version13 113 Pmetrics13 has13 graphical13 user13 interface13 (GUI)13 capability13 for13 many13 functions13 13 Using13 PMcode(ldquofunctionrdquo)13 will13 launch13 the13 GUI13 in13 your13 default13 browser13 13 While13 you13 are13 interacting13 with13 the13 GUI13 R13 is13 ldquolisteningrdquo13 and13 no13 other13 activity13 is13 possible13 13 The13 GUI13 is13 designed13 to13 generate13 Pmetrics13 R13 code13 in13 response13 to13 your13 input13 in13 a13 friendly13 intuitive13 environment13 13 That13 code13 can13 be13 copied13 and13 pasted13 into13 your13 Pmetrics13 R13 script13 13 You13 can13 also13 see13 live13 plot13 previews13 with13 the13 GUI13 13 All13 this13 is13 made13 possible13 with13 the13 lsquoshinyrsquo13 package13 for13 RCurrently13 the13 following13 GUIs13 are13 available13 13 PMcode(ldquoNPrunrdquo) PMcode(ldquoITrunrdquo) PMcode(ldquoplotrdquo)13 13 More13 are13 coming

Pmetrics ComponentsThere13 are13 three13 main13 software13 programs13 that13 Pmetrics13 controlsbull IT2B13 is13 the13 ITerative13 2-shy‐stage13 Bayesian13 parametric13 population13 PK13 modeling13 program13 13 It13 is13 generally13 used13 to13

estimate13 parameter13 ranges13 to13 pass13 to13 NPAG13 13 It13 will13 estimate13 values13 for13 population13 model13 parameters13 under13 the13 assumption13 that13 the13 underlying13 distributions13 of13 those13 values13 are13 normal13 or13 transformed13 to13 normal

bull NPAG13 is13 the13 Non-shy‐parametric13 Adaptive13 Grid13 software13 13 It13 will13 create13 a13 non-shy‐parametric13 population13 model13 consisting13 of13 discrete13 support13 points13 each13 with13 a13 set13 of13 estimates13 for13 all13 parameters13 in13 the13 model13 plus13 an13 associated13 probability13 (weight)13 of13 that13 set13 of13 estimates13 13 There13 can13 be13 at13 most13 one13 point13 for13 each13 subject13 in13 the13 study13 population13 13 There13 is13 no13 need13 for13 any13 assumption13 about13 the13 underlying13 distribution13 of13 model13 parameter13 values

bull The13 simulator13 is13 a13 semi-shy‐parametric13 Monte13 Carlo13 simulation13 software13 program13 that13 can13 use13 the13 output13 of13 IT2B13 or13 NPAG13 to13 build13 randomly13 generated13 response13 proZiles13 (eg13 time-shy‐concentration13 curves)13 for13 a13 given13 population13 model13 parameter13 estimates13 and13 data13 input13 13 Simulation13 from13 a13 non-shy‐parametric13 joint13 density13 model13 ie13 NPAG13 output13 is13 possible13 with13 each13 point13 serving13 as13 the13 mean13 of13 a13 multivariate13 normal13 distribution13 weighted13 according13 to13 the13 weight13 of13 the13 point13 13 The13 covariance13 matrix13 of13 the13 entire13 set13 of13 support13 points13 is13 divided13 equally13 among13 the13 points13 for13 the13 purposes13 of13 simulation

Pmetrics13 has13 groups13 of13 R13 functions13 named13 logically13 to13 run13 each13 of13 these13 programs13 and13 to13 extract13 the13 output13 13 Again13 these13 are13 extensively13 documented13 within13 R13 by13 using13 the13 help(command)13 or13 command13 syntax13 bull ITrun13 ITparse13 ITload13 ITreport13 ERRrunbull NPrun13 NPparse13 NPload13 NPreportbull SIMrun13 SIMparse

Userrsquos13 Guide13 13 513 13

For13 IT2B13 and13 NPAG13 the13 ldquorunrdquo13 functions13 generate13 batch13 Ziles13 which13 when13 executed13 launch13 the13 software13 programs13 to13 do13 the13 analysis13 ERRrun13 is13 a13 special13 implementation13 of13 IT2B13 designed13 to13 estimate13 the13 assay13 error13 polynomial13 coefZicients13 from13 the13 data13 when13 they13 cannot13 be13 calculated13 from13 assay13 validation13 data13 (using13 makeErrorPoly())13 supplied13 by13 the13 analytical13 laboratory13 The13 batch13 Ziles13 contain13 all13 the13 information13 necessary13 to13 complete13 a13 run13 tidy13 the13 output13 into13 a13 datetime13 stamped13 directory13 with13 meaningful13 subdirectories13 extract13 the13 information13 generate13 a13 report13 and13 a13 saved13 Rdata13 Zile13 of13 parsed13 output13 which13 can13 be13 quickly13 and13 easily13 loaded13 into13 R13 13 On13 Mac13 (Unix)13 systems13 the13 batch13 Zile13 will13 automatically13 launch13 in13 a13 Terminal13 window13 13 On13 Windows13 systems13 the13 batch13 Zile13 must13 be13 launched13 manually13 13 In13 both13 cases13 the13 execution13 of13 the13 program13 to13 do13 the13 actual13 model13 parameter13 estimation13 is13 independent13 of13 R13 so13 that13 the13 user13 is13 free13 to13 use13 R13 for13 other13 purposesFor13 the13 Simulator13 the13 ldquorunrdquo13 function13 will13 execute13 the13 program13 directly13 within13 RFor13 all13 programs13 the13 ldquoparserdquo13 functions13 will13 extract13 the13 primary13 output13 from13 the13 program13 into13 meaningful13 R13 data13 objects13 13 For13 IT2B13 and13 NPAG13 this13 is13 done13 automatically13 at13 the13 end13 of13 a13 successful13 run13 and13 the13 objects13 are13 saved13 in13 the13 output13 subdirectory13 as13 IT2BoutRdata13 or13 NPAGoutRdata13 respectivelyFor13 IT2B13 and13 NPAG13 the13 ldquoloadrdquo13 functions13 can13 be13 used13 to13 load13 the13 above13 Rdata13 Ziles13 after13 a13 successful13 run13 13 The13 ldquoreportrdquo13 functions13 are13 automatically13 run13 at13 the13 end13 of13 a13 successful13 run13 and13 these13 will13 generate13 an13 HTML13 page13 with13 summaries13 of13 the13 run13 as13 well13 as13 the13 Rdata13 Ziles13 and13 other13 objects13 13 The13 default13 browser13 will13 be13 automatically13 launched13 for13 viewing13 of13 the13 HTML13 report13 pageWithin13 Pmetrics13 there13 are13 also13 functions13 to13 manipulate13 data13 csv13 Ziles13 and13 process13 and13 plot13 extracted13 databull Manipulate13 data13 csv13 Ziles13 PMreadMatrix13 PMcheck13 PMZixMatrix13 PMwriteMatrix13 PMmatrixRelTime13

PMwrk2csvbull Process13 data13 makeAUC13 makeCov13 makeCycle13 makeFinal13 makeOP13 makeNCA13 makeErrorPolybull Plot13 data13 plotPMcov13 plotPMcycle13 plotPMZinal13 plotPMmatrix13 plotPMop13 plotPMsim13 plotPMdiag13

plotPMptabull Model13 selection13 and13 diagnostics13 PMcompare13 plotPMop13 (with13 residual13 option)13 PMdiag13 PMstepbull Pmetrics13 function13 defaults13 PMwriteDefaultsAgain13 all13 functions13 have13 extensive13 help13 Ziles13 and13 examples13 which13 can13 be13 examined13 in13 R13 by13 using13 the13 help(command)13 or13 command13 syntax13 13

Customizing Pmetrics FunctionsWhen13 Pmetrics13 is13 loaded13 with13 a13 library(Pmetrics)13 command13 it13 will13 also13 load13 the13 Defaults13 package13 13 If13 not13 present13 it13 will13 automatically13 download13 it13 from13 CRAN13 13 This13 package13 allows13 you13 to13 change13 the13 default13 for13 any13 Pmetrics13 function13 argument13 13 See13 Defaults13 for13 more13 help13 but13 some13 key13 functions13 are13 summarized13 here

setDefaults(name) Where13 name13 is13 something13 like13 PMreadMatrix13 and13 is13 a13 list13 of13 arguments13 whose13 default13 you13 wish13 to13 change13 13 So13 if13 you13 want13 PMreadMatrix13 to13 read13 semicolon13 delimited13 Ziles13 by13 default13 instead13 of13 comma13 separated13 Ziles13 use13 setDefaults(PMreadMatrix delim=rdquordquo)

getDefaults()13 or13 getDefaults(name) 13 The13 Zirst13 command13 will13 list13 all13 functions13 that13 have13 alternative13 defaults13 and13 the13 second13 will13 list13 the13 alternatives13 for13 a13 given13 function13 13 unsetDefaults(name)13 13 Restores13 the13 defaults13 to13 normal13 for13 a13 given13 function

The13 above13 functions13 will13 manipulate13 defaults13 for13 a13 single13 session13 in13 R13 13 They13 are13 all13 included13 in13 the13 Defaults13 package13 13 If13 you13 want13 to13 make13 the13 defaults13 durable13 from13 session13 to13 session13 use13 the13 following13 function13 in13 PmetricsPMwriteDefaults()13 13 This13 will13 save13 your13 defaults13 and13 they13 will13 be13 restored13 every13 time13 you13 load13 Pmetrics

Userrsquos13 Guide13 13 613 13

Userrsquos13 Guide13 13 713 13

You13 supply13 these13 files13 Pmetrics13 does13 the13 rest

General WorkflowThe13 general13 Pmetrics13 workZlow13 for13 IT2B13 and13 NPAG13 is13 shown13 in13 the13 following13 diagram

Data13 csv13 file Model13 txt13 file

PreparaCon13 program

Engine13 program

InstrucCon13 file

Output

ITrun()

13 NPrun

()

ITload()13 NPload()

R13 is13 used13 to13 specify13 the13 working13 directory13 containing13 the13 data13 csv13 and13 model13 txt13 Ziles13 Through13 the13 batch13 Zile13 generated13 by13 R13 the13 preparation13 program13 is13 compiled13 and13 executed13 13 The13 instruction13 Zile13 is13 generated13 automatically13 by13 the13 contents13 of13 the13 data13 and13 model13 Ziles13 and13 by13 arguments13 to13 the13 NPrun()13 ITrun()13 or13 ERRrun()13 commands13 The13 batch13 Zile13 will13 then13 compile13 and13 execute13 the13 engine13 Zile13 according13 to13 the13 instructions13 which13 will13 generate13 several13 output13 Ziles13 upon13 completion13 13 Finally13 the13 batch13 Zile13 will13 call13 the13 R13 script13 to13 generate13 the13 summary13 report13 and13 several13 data13 objects13 including13 the13 IT2BoutRdata13 or13 NPAGoutRdata13 Ziles13 which13 can13 be13 loaded13 into13 R13 subsequently13 using13 ITload()13 or13 NPload()Both13 input13 Ziles13 (data13 model)13 are13 text13 Ziles13 which13 can13 be13 edited13 directly

Userrsquos13 Guide13 13 813 13

Pmetrics Input FilesData13 csv13 Files

Pmetrics13 accepts13 input13 as13 a13 spreadsheet13 ldquomatrixrdquo13 format13 It13 is13 designed13 for13 input13 of13 multiple13 records13 in13 a13 concise13 way13 13 Please13 keep13 the13 number13 of13 characters13 in13 the13 Uile13 name13 le13 8Files13 are13 in13 comma-shy‐separated-shy‐values13 (csv)13 format13 13 Examples13 of13 programs13 that13 can13 save13 csv13 Ziles13 are13 any13 text13 editor13 (eg13 TextEdit13 on13 Mac13 Notepad13 on13 Windows)13 or13 spreadsheet13 program13 (eg13 Excel)13 13 Click13 on13 hyperlinked13 items13 to13 see13 an13 explanation13 13

IMPORTANT13 The13 order13 capitalization13 and13 names13 of13 the13 header13 and13 the13 Zirst13 1213 columns13 are13 Zixed13 13 All13 entries13 must13 be13 numeric13 with13 the13 exception13 of13 ID13 and13 ldquordquo13 for13 non-shy‐required13 placeholder13 entries

POPDATA13 DEC13 11ID EVID TIME DUR DOSE ADDL II INPUT OUT OUTEQ C0 C1 C2 C3 COVhellipGH 1 0 0 400 1 GH 0 05 042 1 001 01 0 0GH 0 1 046 1 001 01 0 0GH 0 2 247 1 001 01 0 0GH 4 0 0 150 1 GH 1 35 05 150 1 001 01 0 0GH 0 512 055 1 001 01 0 0GH 0 24 052 1 001 01 0 01423 1 0 1 400 -shy‐1 12 1 1423 1 01 0 100 2 1423 0 1 -shy‐99 1 001 01 0 01423 0 2 038 1 001 01 0 01423 0 2 16 2 005 02 -shy‐011 0002POPDATA13 DEC_1113 13 This13 is13 the13 header13 for13 the13 Zile13 and13 must13 be13 in13 the13 Zirst13 line13 13 It13 identiZies13 the13 versionID13 13 This13 Zield13 must13 be13 preceded13 by13 the13 ldquordquo13 symbol13 to13 conZirm13 that13 this13 is13 the13 header13 row13 It13 can13 be13

numeric13 or13 character13 and13 identiZies13 each13 individual13 13 All13 rows13 must13 contain13 an13 ID13 and13 all13 records13 from13 one13 individual13 must13 be13 contiguous13 13 Any13 subsequent13 row13 that13 begins13 with13 ldquordquo13 will13 be13 ignored13 which13 is13 helpful13 if13 you13 want13 to13 exclude13 data13 from13 the13 analysis13 but13 preserve13 the13 integrity13 of13 the13 original13 dataset13 or13 to13 add13 comment13 lines13 13 IDs13 should13 be13 1113 characters13 or13 less13 but13 may13 be13 any13 alphanumeric13 combination13 13 There13 can13 be13 at13 most13 80013 subjects13 per13 run

EVID13 This13 is13 the13 event13 ID13 Zield13 13 It13 can13 be13 013 113 or13 413 13 Every13 row13 must13 have13 an13 entry13 013 =13 observation13 113 =13 input13 (eg13 dose)13 213 313 are13 currently13 unused13 413 =13 reset13 where13 all13 compartment13 values13 are13 set13 to13 013 and13 the13 time13 counter13 is13 reset13 to13 013 13 This13 is13

useful13 when13 an13 individual13 has13 multiple13 sampling13 episodes13 that13 are13 widely13 spaced13 in13 time13 with13 no13 new13 information13 gathered13 13 This13 is13 a13 dose13 event13 so13 dose13 information13 needs13 to13 be13 complete

TIME13 This13 is13 the13 elapsed13 time13 in13 decimal13 hours13 since13 the13 Zirst13 event13 13 It13 is13 not13 currently13 clock13 time13 (eg13 2130)13 although13 this13 is13 planned13 13 Every13 row13 must13 have13 an13 entry13 and13 within13 a13 given13 ID13 rows13 must13 be13 sorted13 chronologically13 earliest13 to13 latest13 13

DUR13 This13 is13 the13 duration13 of13 an13 infusion13 in13 hours13 13 If13 EVID=113 there13 must13 be13 an13 entry13 otherwise13 it13 is13 ignored13 13 For13 a13 bolus13 (ie13 an13 oral13 dose)13 set13 the13 value13 equal13 to13 0

Userrsquos13 Guide13 13 913 13

DOSE13 This13 is13 the13 dose13 amount13 13 If13 EVID=113 there13 must13 be13 an13 entry13 otherwise13 it13 is13 ignoredADDL13 This13 speciZies13 the13 number13 of13 additional13 doses13 to13 give13 at13 interval13 II13 13 It13 may13 be13 missing13 for13 dose13

events13 (EVID=113 or13 4)13 in13 which13 case13 it13 is13 assumed13 to13 be13 013 13 It13 is13 ignored13 for13 observation13 (EVID=0)13 events13 13 Be13 sure13 to13 adjust13 the13 time13 entry13 for13 the13 subsequent13 row13 if13 necessary13 to13 account13 for13 the13 extra13 doses13 13 If13 set13 to13 -shy‐113 the13 dose13 is13 assumed13 to13 be13 given13 under13 steady-shy‐state13 conditions13 13 ADDL=-shy‐113 can13 only13 be13 used13 for13 the13 Zirst13 dose13 event13 for13 a13 given13 subject13 or13 an13 EVID=413 event13 as13 you13 cannot13 suddenly13 be13 at13 steady13 state13 in13 the13 middle13 of13 dosing13 record13 unless13 all13 compartmentstimes13 are13 reset13 to13 013 (as13 for13 an13 EVID=413 event)

II13 This13 is13 the13 interdose13 interval13 and13 is13 only13 relevant13 if13 ADDL13 is13 not13 equal13 to13 013 in13 which13 case13 it13 cannot13 be13 missing13 13 If13 ADDL=013 or13 is13 missing13 II13 is13 ignored

INPUT13 This13 deZines13 which13 input13 (ie13 drug)13 the13 DOSE13 corresponds13 to13 13 Inputs13 are13 deZined13 in13 the13 model13 Zile

OUT 13 This13 is13 the13 observation13 or13 output13 value13 13 If13 EVID=013 there13 must13 be13 an13 entry13 if13 missing13 this13 must13 be13 coded13 as13 -shy‐9913 13 It13 will13 be13 ignored13 for13 any13 other13 EVID13 and13 therefore13 can13 be13 ldquordquo13 13 There13 can13 be13 at13 most13 15013 observations13 for13 a13 given13 subject

OUTEQ13 This13 is13 the13 output13 equation13 number13 that13 corresponds13 to13 the13 OUT13 value13 13 Output13 equations13 are13 deZined13 in13 the13 model13 Zile

C013 C113 C213 C313 These13 are13 the13 coefZicients13 for13 the13 assay13 error13 polynomial13 for13 that13 observation13 13 Each13 subject13 may13 have13 up13 to13 one13 set13 of13 coefZicients13 per13 output13 equation13 13 If13 more13 than13 one13 set13 is13 detected13 for13 a13 given13 subject13 and13 output13 equation13 the13 last13 set13 will13 be13 used13 13 If13 there13 are13 no13 available13 coefZicients13 these13 cells13 may13 be13 left13 blank13 or13 Zilled13 with13 ldquordquo13 as13 a13 placeholder

COV13 Any13 column13 after13 the13 assay13 error13 coefZicients13 is13 assumed13 to13 be13 a13 covariate13 one13 column13 per13 covariate

Model13 Files

Model13 Ziles13 for13 Pmetrics13 are13 ultimately13 Fortran13 text13 Ziles13 with13 a13 header13 version13 of13 TSMULT13 13 As13 of13 Pmetrics13 version13 03013 we13 have13 adopted13 a13 very13 simple13 user13 format13 that13 Pmetrics13 will13 use13 to13 generate13 the13 Fortran13 code13 automatically13 for13 you13 13 Version13 0413 additionally13 eliminates13 the13 previously13 separate13 instruction13 Zile13 A13 model13 library13 is13 available13 on13 our13 website13 at13 httpwwwlapkorgpmetricsphp13 13 Naming13 your13 model13 files13 The13 default13 model13 Zile13 name13 is13 ldquomodeltxtrdquo13 but13 you13 can13 call13 them13 whatever13 you13 wish13 13 However13 please13 keep13 the13 number13 of13 characters13 in13 the13 model13 Uile13 name13 le13 813 When13 you13 use13 a13 model13 Zile13 in13 NPrun() ITrun ERRrun() or SIMrun()13 Pmetrics13 will13 make13 a13 Fortran13 model13 Zile13 of13 the13 same13 name13 temporarily13 renaming13 your13 Zile13 13 At13 the13 end13 of13 the13 run13 your13 original13 model13 Zile13 will13 be13 in13 the13 inputs13 subfolder13 of13 the13 run13 folder13 and13 the13 generated13 Fortran13 model13 Zile13 will13 be13 called13 ldquomodelforrdquo13 and13 moved13 to13 the13 etc13 subfolder13 of13 the13 run13 folder13 13 If13 your13 model13 is13 called13 ldquomymodeltxtrdquo13 then13 the13 Fortran13 Zile13 will13 be13 ldquomymodelforrdquoYou13 can13 still13 use13 appropriate13 Fortran13 model13 Ziles13 directly13 but13 we13 suggest13 you13 keep13 the13 for13 extension13 for13 all13 Fortran13 Ziles13 to13 avoid13 confusion13 with13 the13 new13 format13 13 If13 you13 use13 a13 for13 Zile13 as13 your13 model13 you13 will13 have13 to13 specify13 its13 name13 explicitly13 in13 the13 NPrun() ITrun ERRrun() or SIMrun()13 command13 since13 the13 default13 model13 name13 again13 is13 ldquomodeltxtrdquo13 13 If13 you13 use13 a13 for13 Zile13 directly13 it13 will13 be13 in13 the13 inputs13 subfolder13 of13 the13 run13 folder13 not13 in13 etc13 since13 you13 did13 not13 use13 the13 simpler13 template13 as13 your13 model13 Zile

Structure13 of13 model13 files13 The13 new13 model13 Zile13 is13 a13 text13 Zile13 with13 1113 blocks13 each13 marked13 by13 13 followed13 by13 a13 header13 tagPRImary13 variablesCOVariatesSECcondary13 variablesBOLus13 inputsINItial13 conditions

Userrsquos13 Guide13 13 1013 13

F13 (bioavailability)LAG13 timeDIFferential13 equationsOUTputsERRorEXTraFor13 each13 header13 only13 the13 capital13 letters13 are13 required13 for13 recognition13 by13 Pmetrics13 The13 blocks13 can13 be13 in13 any13 order13 and13 header13 names13 are13 case-shy‐insensitive13 (ie13 the13 capitalization13 here13 is13 just13 to13 show13 which13 letters13 are13 required)13 Fortran13 is13 also13 case-shy‐insensitive13 so13 in13 variable13 names13 and13 expressions13 case13 is13 ignored13 13 Details13 of13 each13 block13 are13 next13 followed13 by13 a13 complete13 example

Primary13 variables

Primary13 variables13 are13 the13 model13 parameters13 that13 are13 to13 be13 estimated13 by13 Pmetrics13 or13 are13 designated13 as13 Zixed13 parameters13 with13 user13 speciZied13 values13 It13 should13 be13 a13 list13 of13 variable13 names13 one13 name13 to13 a13 line13 Variable13 names13 should13 be13 1113 characters13 or13 fewer13 Some13 variable13 names13 are13 reserved13 for13 use13 by13 Pmetrics13 and13 cannot13 be13 used13 as13 primary13 variable13 names13 13 13 The13 number13 of13 primary13 variables13 must13 be13 between13 213 and13 3213 with13 at13 most13 3013 random13 or13 2013 Uixed13 13 On13 each13 row13 following13 the13 variable13 name13 include13 the13 range13 for13 the13 parameter13 that13 deZines13 the13 search13 space13 13 For13 NPAG13 this13 is13 absolute13 ie13 the13 algorithm13 will13 not13 search13 outside13 this13 range13 13 For13 IT2B13 the13 range13 is13 a13 starting13 range13 13 The13 simulator13 will13 ignore13 the13 ranges13 ExamplePriKE13 013 5V13 00113 100KA13 013 5KCP13 013 5KPC13 013 13 5Tlag113 013 2IC313 013 10000FA113 013 1

Covariates

Covariates13 are13 subject13 speciZic13 data13 such13 as13 body13 weight13 contained13 in13 the13 data13 csv13 Zile13 The13 covariate13 names13 which13 are13 the13 column13 names13 in13 the13 data13 Zile13 can13 be13 included13 here13 for13 use13 in13 secondary13 variable13 equations13 The13 order13 should13 be13 the13 same13 as13 in13 the13 data13 Zile13 and13 although13 the13 names13 do13 not13 have13 to13 be13 the13 same13 we13 strongly13 encourage13 you13 to13 make13 them13 the13 same13 to13 avoid13 confusionCovariates13 are13 applied13 at13 each13 dose13 event13 13 The13 Zirst13 dose13 event13 for13 each13 subject13 must13 have13 a13 value13 for13 every13 covariate13 in13 the13 data13 Zile13 13 By13 default13 missing13 covariate13 values13 for13 subsequent13 dose13 events13 are13 linearly13 interpolated13 between13 existing13 values13 or13 carried13 forward13 if13 the13 Zirst13 value13 is13 the13 only13 non-shy‐missing13 entry13 13 To13 suppress13 interpolation13 and13 carry13 forward13 the13 previous13 value13 in13 a13 piece-shy‐wise13 constant13 fashion13 include13 an13 exclamation13 point13 ()13 in13 any13 declaration13 lineNote13 that13 any13 covariate13 relationship13 to13 any13 parameter13 may13 be13 described13 as13 the13 user13 wishes13 by13 mathematical13 equations13 and13 Fortran13 code13 allowing13 for13 exploration13 of13 complex13 non-shy‐linear13 time-shy‐dependent13 andor13 conditional13 relationshipsExampleCovwtcypIC()

Userrsquos13 Guide13 13 1113 13

where13 IC13 will13 be13 piece-shy‐wise13 constant13 and13 the13 other13 two13 will13 be13 linearly13 interpolated13 for13 missing13 values

Secondary13 variables

Secondary13 variables13 are13 those13 that13 are13 deZined13 by13 equations13 that13 are13 combinations13 of13 primary13 covariates13 and13 other13 secondary13 variables13 If13 using13 other13 secondary13 variables13 deZine13 them13 Zirst13 within13 this13 block13 Equation13 syntax13 must13 be13 Fortran13 It13 is13 permissible13 to13 have13 conditional13 statements13 but13 because13 expressions13 in13 this13 block13 are13 translated13 into13 variable13 declarations13 in13 Fortran13 expressions13 other13 than13 of13 the13 form13 X13 =13 function(Y)13 must13 be13 preZixed13 by13 a13 +13 and13 contain13 only13 variables13 which13 have13 been13 previously13 deZined13 in13 the13 Primary13 Covariate13 or13 Secondary13 blocksExampleSecCL13 =13 Ke13 13 V13 13 wt075+IF(cyp13 GT13 1)13 CL13 =13 CL13 13 cyp

Bolus13 inputs

By13 default13 inputs13 with13 DUR13 (duration)13 of13 013 in13 the13 data13 csv13 Zile13 are13 delivered13 instantaneously13 to13 the13 model13 compartment13 equal13 to13 the13 input13 number13 ie13 input13 113 goes13 to13 compartment13 113 input13 213 goes13 to13 compartment13 213 etc13 This13 can13 be13 overridden13 with13 NBOLUS(input13 number)13 =13 compartment13 numberExampleBolNBCOMP(1)13 =13 2

Ini1al13 condi1ons

By13 default13 all13 model13 compartments13 have13 zero13 amounts13 at13 time13 013 This13 can13 be13 changed13 by13 specifying13 the13 compartment13 amount13 as13 X()13 =13 expression13 where13 13 is13 the13 compartment13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignoredExampleIniX(2)13 =13 ICV13 (ie13 IC13 is13 a13 covariate13 with13 the13 measured13 trough13 concentration13 prior13 to13 an13 observed13 dose)X(3)13 =13 IC313 (ie13 IC313 is13 a13 Zitted13 amount13 in13 this13 unobserved13 compartment)In13 the13 Zirst13 case13 the13 initial13 condition13 for13 compartment13 213 becomes13 the13 value13 of13 the13 IC13 covariate13 (deZined13 in13 Covariate13 block)13 multiplied13 by13 the13 current13 estimate13 of13 V13 during13 each13 iteration13 13 This13 is13 useful13 when13 a13 subject13 has13 been13 taking13 a13 drug13 as13 an13 outpatient13 and13 comes13 in13 to13 the13 lab13 for13 PK13 sampling13 with13 measurement13 of13 a13 concentration13 immediately13 prior13 to13 a13 witnessed13 dose13 which13 is13 in13 turn13 followed13 by13 more13 sampling13 13 In13 this13 case13 IC13 or13 any13 other13 covariate13 can13 be13 set13 to13 the13 initial13 measured13 concentration13 and13 if13 V13 is13 the13 volume13 of13 compartment13 213 the13 initial13 condition13 (amount)13 in13 compartment13 213 will13 now13 be13 set13 to13 the13 measured13 concentration13 of13 drug13 multiplied13 by13 the13 estimated13 volume13 for13 each13 iteration13 until13 convergenceIn13 the13 second13 case13 the13 initial13 condition13 for13 compartment13 313 becomes13 another13 variable13 IC313 deZined13 in13 the13 Primary13 block13 to13 Zit13 in13 the13 model13 given13 the13 observed13 data

F13 (bioavailability)

Specify13 the13 bioavailability13 term13 if13 present13 Use13 the13 form13 FA()13 =13 expression13 where13 13 is13 the13 input13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignored

Userrsquos13 Guide13 13 1213 13

ExampleFFA(1)13 =13 FA1

Lag13 1me

Specify13 the13 lag13 term13 if13 present13 which13 is13 the13 delay13 after13 an13 absorbed13 dose13 before13 observed13 concentrations13 Use13 the13 form13 TLAG()13 =13 expression13 where13 13 is13 the13 input13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignoredExampleLagTLAG(1)13 =13 Tlag1

Differen1al13 equa1ons

Specify13 a13 model13 in13 terms13 of13 ordinary13 differential13 equations13 in13 Fortran13 format13 XP()13 is13 the13 notation13 for13 dX()dt13 where13 13 is13 the13 compartment13 number13 X()13 is13 the13 amount13 in13 the13 compartment13 There13 can13 be13 a13 maximum13 of13 2013 such13 equationsExampleDifXP(1)13 =13 -shy‐KAX(1)XP(2)13 =13 RATEIV(1)13 +13 KAX(1)13 -shy‐13 (KE+KCP)X(2)13 +13 KPCX(3)XP(3)13 =13 KCPX(2)13 -shy‐13 KPCX(3)RATEIV(1)13 is13 the13 notation13 to13 indicate13 an13 infusion13 of13 input13 113 (typically13 drug13 1)13 13 The13 duration13 of13 the13 infusion13 and13 total13 dose13 is13 deZined13 in13 the13 data13 csv13 Zile13 Up13 to13 713 inputs13 are13 currently13 allowed13 13 These13 can13 be13 used13 in13 the13 model13 Zile13 as13 RATEIV(1)13 RATEIV(2)13 etc13 13 The13 compartments13 for13 13 receiving13 the13 inputs13 of13 oral13 (bolus)13 doses13 are13 deZined13 in13 the13 Bolus13 block

Outputs

Output13 equations13 in13 Fortran13 format13 Outputs13 are13 of13 the13 form13 Y()13 =13 expression13 where13 13 is13 the13 output13 equation13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignored13 There13 can13 be13 a13 maximum13 of13 613 outputs13 13 They13 are13 referred13 to13 as13 Y(1)13 Y(2)13 etcExampleOutY(1)13 =13 X(2)V

Error

This13 block13 contains13 all13 the13 information13 Pmetrics13 requires13 for13 the13 structure13 of13 the13 error13 model13 13 In13 Pmetrics13 each13 observation13 is13 weighted13 by13 1error213 13 13 There13 are13 two13 choices13 for13 the13 error13 term

113 13 error13 =13 SD13 13 gamma213 13 error13 =13 (SD213 +13 lamda2)0513 (Note13 that13 lambda13 is13 only13 available13 in13 NPAG13 currently)

where13 SD13 is13 the13 standard13 deviation13 (SD)13 of13 each13 observation13 [obs]13 and13 gamma13 and13 lambda13 are13 terms13 to13 capture13 extra13 process13 noise13 related13 to13 the13 observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 SD13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 The13 13 values13 for13 the13 coefZicients13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13

Userrsquos13 Guide13 13 1313 13

coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly() 13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0In13 the13 multiplicative13 model13 13 gamma13 is13 a13 scalar13 on13 SD13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 Lambda13 is13 an13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 We13 tend13 to13 prefer13 lambda

To13 specify13 the13 model13 in13 this13 block13 the13 Zirst13 line13 needs13 to13 be13 either13 L=[number]13 or13 G=[number]13 for13 a13 lambda13 or13 gamma13 error13 model13 13 The13 [number]13 term13 is13 the13 starting13 value13 for13 lambda13 or13 gamma13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present13 13 For13 gamma13 good13 starting13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality13 13 If13 you13 include13 an13 exclamation13 point13 ()13 in13 the13 declaration13 then13 lambda13 or13 gamma13 will13 be13 Zixed13 and13 not13 estimated13 13 Note13 that13 you13 can13 only13 Zix13 lambda13 currently13 to13 zeroThe13 next13 line(s)13 contain13 the13 values13 for13 C013 C113 C213 and13 C313 separated13 by13 commas13 13 There13 should13 be13 one13 line13 of13 coefZicients13 for13 each13 output13 equation13 13 By13 default13 Pmetrics13 will13 use13 values13 for13 these13 coefZicients13 found13 in13 the13 data13 Zile13 13 If13 none13 are13 present13 or13 if13 the13 model13 declaration13 line13 contains13 an13 exclamation13 point13 ()13 the13 values13 here13 will13 be13 used

Example13 113 estimated13 lambda13 starting13 at13 0413 one13 output13 use13 data13 Zile13 coefZicients13 but13 if13 missing13 use13 010100ErrL=04010100

Example13 213 Zixed13 gamma13 of13 213 two13 outputs13 use13 data13 Zile13 coefZicients13 but13 if13 missing13 use13 01010013 for13 the13 Zirst13 output13 but13 use13 0313 0113 013 013 for13 output13 213 regardless13 of13 what13 is13 in13 the13 data13 ZileErrG=2010100030100

Extra

This13 block13 is13 for13 advanced13 Fortran13 programmers13 only13 13 Occasionally13 for13 very13 complex13 models13 additional13 Fortran13 subroutines13 are13 required13 13 They13 can13 be13 placed13 here13 13 The13 code13 must13 specify13 complete13 Fortran13 subroutines13 which13 can13 be13 called13 from13 other13 blocks13 with13 appropriate13 call13 functions13 13

Reserved13 Names

The13 following13 cannot13 be13 used13 as13 primary13 covariate13 or13 secondary13 variable13 names13 They13 can13 be13 used13 in13 equations13 however

Reserved13 Variable Func1on13 in13 Pmetricsndim internal

t time

Userrsquos13 Guide13 13 1413 13

x array13 of13 compartment13 amounts

xp array13 of13 Zirst13 derivative13 of13 compartment13 amounts

rpar internal

ipar internal

p array13 of13 primary13 parameters

r input13 rates

b input13 boluses

npl internal

numeqt output13 equation13 number

ndrug input13 number

nadd covariate13 number

rateiv intravenous13 input13 for13 inputs13 when13 DURgt013 in13 data13 Ziles

cv covariate13 values13 array

n number13 of13 compartments

nd internal

ni internal

nup internal

nuic internal

np number13 of13 primary13 parameters

nbcomp bolus13 compartment13 array

psym names13 of13 primary13 parameters

fa biovailability

tlag lag13 time

tin internal

tout internal

Complete13 Example

Here13 is13 a13 complete13 example13 of13 a13 model13 Zile13 as13 of13 Pmetrics13 version13 04013 and13 higher

Userrsquos13 Guide13 13 1513 13

NotesBy13 omitting13 a13 Diffeq13 block13 with13 ODEs13 Pmetrics13 understands13 that13 you13 are13 specifying13 the13 model13 to13 be13 solved13 algebraically13 In13 this13 case13 at13 least13 KE13 and13 V13 must13 be13 in13 the13 Primary13 or13 Secondary13 variables13 KA13 KCP13 and13 KPC13 are13 optional13 and13 specify13 absorption13 and13 transfer13 to13 and13 from13 the13 central13 to13 a13 peripheral13 compartment13 respectively

PriKE13 013 5V013 0113 100KA13 013 5Tlag113 013 3Cov13 wt

SecV13 =13 V0wt

LagTLAG(1)13 =13 Tlag1

OutY(1)13 =13 X(2)V

ErrL=04010100

Userrsquos13 Guide13 13 1613 13

Brief13 Fortran13 Tutorial

Much13 more13 detailed13 help13 is13 available13 from13 httpwwwcsmtuedu~sheneCOURSEScs201NOTESfortranhtml

Arithmetic Operator Meaning

+ addition

- subtraction

multiplication

division

exponentiation

Relational Operator Alternative Operator Meaning

lt LT less than

lt= LE less than or equal

gt GT greater than

gt= GE greater than or equal

== EQ equal

= NE not equal

Selective Execution Example

IF (logical-expression) one-statement IF (T gt= 100) CL = 10

IF (logical-expression) THEN statementsEND IF

IF (T gt= 100) THEN CL = 10 V = 10END IF

IF (logical-expression) THEN statements-1ELSE statements-2END IF

IF (T gt= 100) THEN CL = 10ELSE CL = CLEND IF

Userrsquos13 Guide13 13 1713 13

How to use R and PmetricsSeCng13 up13 a13 Pmetrics13 project

When13 beginning13 a13 new13 modeling13 project13 it13 is13 convenient13 to13 use13 the13 command13 PMtree(ldquoproject namerdquo)13 13 This13 command13 will13 set13 up13 a13 new13 directory13 in13 the13 current13 working13 directory13 named13 whatever13 you13 have13 included13 as13 the13 ldquoproject13 namerdquo13 13 For13 example13 a13 directory13 called13 ldquoDrugXrdquo13 will13 be13 created13 by13 PMtree(ldquoDrugXrdquo)13 13 Beneath13 this13 directory13 several13 subdirectories13 will13 be13 also13 created13 Rscript13 Runs13 Sim13 and13 src13 13 The13 Rscript13 subdirectory13 will13 contain13 a13 skeleton13 R13 script13 to13 begin13 Pmetrics13 runs13 in13 the13 new13 project13 13 The13 Runs13 subdirectory13 should13 contain13 all13 Ziles13 required13 for13 a13 run13 (described13 next)13 and13 it13 will13 also13 contain13 the13 resulting13 numerically13 ordered13 run13 directories13 created13 after13 each13 Pmetrics13 NPAG13 or13 IT2B13 run13 13 The13 Sim13 subdirectory13 can13 contain13 any13 Ziles13 related13 to13 simulations13 and13 the13 src13 subdirectory13 should13 contain13 original13 and13 manipulated13 source13 data13 Ziles13 13 Of13 course13 you13 are13 free13 to13 edit13 this13 directory13 tree13 structure13 as13 you13 please13 or13 make13 your13 own13 entirely

GeCng13 the13 required13 files13 to13 run13 Pmetrics

When13 you13 wish13 to13 execute13 a13 Pmetrics13 run13 you13 must13 ensure13 that13 appropriate13 Pmetrics13 model13 txt13 and13 data13 csv13 Ziles13 are13 in13 the13 working13 directory13 ie13 the13 Runs13 subdirectory13 of13 the13 project13 directory13 13 13 13 R13 can13 be13 used13 to13 help13 prepare13 the13 data13 csv13 Zile13 by13 importing13 and13 manipulating13 spreadsheets13 (eg13 readcsv())13 13 The13 Pmetrics13 function13 PMcheck()13 can13 be13 used13 to13 check13 a13 csv13 Zile13 or13 an13 R13 dataframe13 that13 is13 to13 be13 saved13 as13 a13 Pmetrics13 data13 13 csv13 Zile13 for13 errors13 13 13 13 13 13 It13 can13 also13 check13 a13 model13 Zile13 for13 errors13 in13 the13 context13 of13 a13 dataZile13 eg13 covariates13 that13 do13 not13 match13 13 PMfixMatrix()13 attempts13 to13 automatically13 rid13 data13 Ziles13 of13 errors13 13 The13 function13 PMwriteMatrix() 13 can13 be13 used13 to13 write13 the13 R13 data13 object13 in13 the13 correct13 format13 for13 use13 by13 IT2B13 NPAG13 or13 the13 Simulator13 13 You13 can13 also13 download13 sample13 data13 and13 scripts13 from13 the13 Pmetrics13 downloads13 section13 of13 our13 website13 once13 you13 sign13 in13 with13 your13 LAPK13 user13 email13 address13 and13 password13 13 Edit13 prior13 versions13 of13 model13 Ziles13 to13 make13 new13 model13 Ziles

Using13 scripts13 to13 control13 Pmetrics

As13 you13 will13 see13 in13 the13 skeleton13 R13 script13 made13 by13 PMtree() and13 placed13 in13 the13 Rscript13 subdirectory13 if13 this13 is13 a13 Zirst-shy‐time13 run13 the13 R13 commands13 to13 run13 IT2B13 or13 NPAG13 are13 as13 follows13 13 Recall13 that13 the13 ldquordquo13 character13 is13 a13 comment13 character

library(Pmetrics)Run 1 - add your run description heresetwd(ldquoworking directoryrdquo)NPrun() for NPAG or ITrun() for IT2B

The13 Zirst13 line13 will13 load13 the13 Pmetrics13 library13 of13 functions13 13 The13 second13 line13 sets13 the13 working13 directory13 to13 the13 speciZied13 path13 13 The13 third13 line13 generates13 the13 batch13 Zile13 to13 run13 NPAG13 or13 IT2B13 and13 saves13 it13 to13 the13 working13 directory13

NOTE13 13 On13 Mac13 systems13 the13 batch13 Zile13 will13 be13 automatically13 launched13 in13 a13 Terminal13 window13 13 On13 Windows13 systems13 the13 batch13 Zile13 must13 be13 launched13 manually13 by13 double13 clicking13 the13 np_runbat13 or13 it_runbat13 Zile13 in13 the13 working13 directory

ITrun() 13 and13 NPrun()13 both13 return13 the13 full13 path13 of13 the13 output13 directory13 to13 the13 clipboard13 13 By13 default13 runs13 are13 placed13 in13 folders13 numbered13 sequentially13 beginning13 with13 ldquo1rdquoNow13 the13 output13 of13 IT2B13 or13 NPAG13 needs13 to13 be13 loaded13 into13 R13 so13 the13 next13 command13 does13 this

NPload(run_number) or ITload(run_number)

Details13 of13 these13 commands13 and13 what13 is13 loaded13 are13 described13 in13 the13 R13 documentation13 (NPload 13 or13 ITload)13 and13 in13 the13 following13 section13 13 The13 run_number13 should13 be13 included13 within13 the13 parentheses13 to13 be13 appended13 to13 the13 names13

Userrsquos13 Guide13 13 1813 13

of13 loaded13 R13 objects13 allowing13 for13 comparison13 between13 runs13 eg13 NPload(1)13 13 Finally13 at13 this13 point13 other13 Pmetrics13 commands13 can13 be13 added13 to13 the13 script13 to13 process13 the13 data13 such13 as13 the13 following

plot(final1)plot(cycle1)plot(op1type=rdquopoprdquo) or plot(op1$pop1)plot(op1) default is to plot posterior predictions for output 1plot(op1type=rdquopoprdquoresid=T)

Of13 course13 the13 full13 power13 of13 R13 can13 be13 used13 in13 scripts13 to13 analyze13 data13 but13 these13 simple13 statements13 serve13 as13 examplesIf13 you13 do13 not13 use13 the13 PMtree() structure13 we13 suggest13 that13 the13 R13 script13 for13 a13 particular13 project13 be13 saved13 into13 a13 folder13 called13 ldquoRscriptrdquo13 or13 some13 other13 meaningful13 name13 in13 the13 working13 directory13 13 Folders13 are13 not13 be13 moved13 by13 the13 batch13 Zile13 13 Within13 the13 script13 number13 runs13 sequentially13 and13 use13 comments13 liberally13 to13 13 distinguish13 runs13 as13 shown13 below

library(Pmetrics)

Run 1 - Ka Kel V all subjectssetwd(ldquoworking directoryrdquo)NPrun() assumes model=rdquomodeltxtrdquo and data=rdquodatacsvrdquoNPload(1)

Remember13 in13 R13 that13 the13 command13 example(function) will13 provide13 examples13 for13 the13 speciZied13 function13 13 Most13 Pmetrics13 functions13 have13 examples

Pmetrics Data ObjectsAfter13 a13 successful13 IT2B13 or13 NPAG13 run13 an13 R13 dataZile13 is13 saved13 in13 the13 output13 subdirectory13 of13 the13 newly13 created13 numerically13 ordered13 folder13 in13 the13 working13 directory13 13 After13 IT2B13 this13 Zile13 is13 called13 ldquoIT2BoutRdatardquo13 and13 after13 NPAG13 it13 is13 called13 ldquoNPAGoutRdatardquo13 13 As13 mentioned13 in13 the13 previous13 section13 these13 data13 Ziles13 can13 be13 loaded13 by13 ensuring13 that13 the13 Runs13 folder13 is13 set13 as13 the13 working13 directory13 and13 then13 using13 the13 Pmetrics13 commands13 ITload(run_num)13 or13 NPload(run_num)

Both13 commands13 load13 their13 respective13 Rdata13 Ziles13 into13 R13 making13 the13 contained13 objects13 available13 for13 plotting13 and13 other13 analysisObjects13 loaded13 by13 ITload(run_num) and NPload(run_num)

Objects Variables Comments

op13 (class13 PMop13 list) $pop113 $post113 Population13 and13 posterior13 predictions13 for13 each13 output13 equation13 ie13 113 213

13 $id Subject13 identiZication

13 $time Observation13 time13 in13 relative13 decimal13 hours

13 $obs Observation

13 $pred Prediction13 based13 on13 median13 of13 population13 or13 posterior13 parameter13 value13 distributions

Userrsquos13 Guide13 13 1913 13

Objects Variables Comments

13 $block Dosing13 block13 usually13 113 unless13 data13 Zile13 contains13 EVID=413 dose13 reset13 events13 in13 which13 case13 each13 such13 reset13 within13 a13 given13 ID13 will13 increment13 the13 dosing13 block13 by13 113 for13 that13 ID

13 $obsSD Calculated13 standard13 deviation13 (error)13 of13 the13 observation13 based13 on13 the13 assay13 error13 polynomial

13 $d Difference13 between13 pred13 and13 obs

13 $ds Squared13 difference13 between13 pred13 and13 obs

13 $wd $d13 weighted13 by13 the13 $obsSD

13 $wds $ds13 weighted13 by13 the13 $obsSD

Zinal13 (class13 PMZinal13 list) $popPoints (NPAG13 only)13 Dataframe13 of13 the13 Zinal13 cycle13 joint13 population13 density13 of13 grid13 points13 with13 column13 names13 equal13 to13 the13 name13 of13 each13 random13 parameter13 plus13 $prob13 for13 the13 associated13 probability13 of13 that13 point13

$popMean The13 Zinal13 cycle13 mean13 for13 each13 random13 parameter13 distribution

$popSD The13 Zinal13 cycle13 standard13 deviation13 for13 each13 random13 parameter13 distribution

$popCV The13 Zinal13 cycle13 coefZicient13 of13 variation13 for13 each13 random13 parameter13 distribution

$popVar The13 Zinal13 cycle13 variance13 for13 each13 random13 parameter13 distribution

$popCov The13 Zinal13 cycle13 covariance13 matrix13 for13 each13 random13 parameter13 distribution

$popCor The13 Zinal13 cycle13 correlation13 matrix13 for13 each13 random13 parameter13 distribution

$popMedian The13 Zinal13 cycle13 median13 for13 each13 random13 parameter13 distribution

$gridpts (NPAG13 only)13 The13 initial13 number13 of13 support13 points

$ab Matrix13 of13 boundaries13 for13 random13 parameter13 values13 13 For13 NPAG13 this13 is13 speciZied13 by13 the13 user13 prior13 to13 the13 run13 for13 IT2B13 it13 is13 calculated13 as13 a13 user13 speciZied13 multiple13 of13 the13 SD13 for13 the13 parameter13 value13 distribution

Userrsquos13 Guide13 13 2013 13

Objects Variables Comments

cycle13 (class13 PMcycle13 list) $names Vector13 of13 names13 of13 the13 random13 parameters

$ll Matrix13 of13 cycle13 number13 and13 -shy‐2Log-shy‐likelihood13 at13 each13 cycle

$gamlam A13 matrix13 of13 cycle13 number13 and13 gamma13 or13 lambda13 at13 each13 cycle13 (see13 item13 1613 under13 NPAG13 Runs13 below13 for13 a13 discussion13 of13 gamma13 and13 lambda)

$mean A13 matrix13 of13 cycle13 number13 and13 the13 mean13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 mean

$sd A13 matrix13 of13 cycle13 number13 and13 the13 standard13 deviation13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$median A13 matrix13 of13 cycle13 number13 and13 the13 median13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$aic A13 matrix13 of13 cycle13 number13 and13 Akaike13 Information13 Criterion13 at13 each13 cycle

$bic A13 matrix13 of13 cycle13 number13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle

cov13 (class13 PMcov13 dataframe)

$id Subject13 identiZication

$time Time13 for13 each13 covariate13 entry

covariates Covariate13 values13 for13 each13 subject13 at13 each13 time13 extracted13 from13 the13 raw13 data13 Zile

parameters Mean13 median13 or13 mode13 of13 Bayesian13 posterior13 distribution13 for13 each13 random13 parameter13 in13 the13 model13 13 Mode13 summaries13 are13 available13 for13 NPAG13 output13 only13 and13 the13 default13 is13 median13 13 Values13 are13 recycled13 for13 each13 row13 within13 a13 given13 subject13 with13 the13 number13 of13 rows13 driven13 by13 the13 number13 of13 covariate13 entries

Userrsquos13 Guide13 13 2113 13

Objects Variables Comments

pop13 (class13 PMpop13 dataframe)

post13 (class13 PMpost13 dataframe)

NPAG13 only

$id Subject13 identiZication

$pred113 Population13 prior13 (PMpop)13 or13 Bayesian13 posterior13 (PMpost)13 predictions13 for13 each13 output13 equation13 based13 on13 mean13 median13 and13 mode13 as13 speciZied13 by13 the13 user13 and13 with13 frequency13 also13 speciZied13 by13 the13 user13 in13 the13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

$block Same13 as13 for13 PMop13 objects13 above

NPdata13 (class13 NPAG13 list)13 ITdata13 (class13 IT2B13 list

Raw13 data13 used13 to13 make13 the13 above13 objects13 13 Please13 use13 NPparse13 or13 ITparse13 in13 R13 for13 discussion13 of13 the13 data13 contained13 in13 these13 objects

Since13 R13 is13 an13 object13 oriented13 language13 to13 access13 the13 observations13 in13 a13 PMop13 object13 for13 example13 use13 the13 following13 syntax13 op$post1$obsNote13 that13 you13 will13 place13 an13 integer13 within13 the13 parentheses13 of13 the13 loading13 functions13 eg13 NPload(1)13 which13 will13 sufZix13 all13 the13 above13 objects13 with13 that13 integer13 eg13 op113 Zinal113 NPdata113 13 This13 allows13 several13 models13 to13 be13 loaded13 into13 R13 simultaneously13 each13 with13 a13 unique13 sufZix13 and13 which13 can13 be13 compared13 with13 the13 PMcompare()13 command13 (see13 Model13 Diagnostics13 below)

Making New Pmetrics ObjectsOnce13 you13 have13 loaded13 the13 raw13 (NPdata13 or13 ITdata)13 or13 processed13 (op13 Uinal13 cycle13 pop13 post)13 data13 objects13 described13 above13 with13 NPload(run_num)13 or13 ITload(run_num)13 should13 you13 wish13 to13 remake13 the13 processed13 objects13 with13 parameters13 other13 than13 the13 defaults13 you13 can13 easily13 do13 so13 with13 the13 make 13 family13 of13 commands13 13 For13 example13 the13 default13 for13 PMop13 observed13 vs13 predicted13 objects13 is13 to13 use13 the13 prediction13 based13 on13 the13 median13 of13 the13 population13 or13 posterior13 distribution13 13 If13 you13 wish13 to13 use13 the13 mean13 of13 the13 distribution13 remake13 the13 PMop13 object13 using makeOP()13 13 If13 you13 wish13 to13 see13 all13 the13 cycle13 information13 in13 a13 PMcycle13 object13 not13 omitting13 the13 Zirst13 1013 of13 cycles13 by13 default13 remake13 it13 using13 makeCycle()13 13

For13 all13 of13 the13 following13 commands13 the13 data13 input13 is13 either13 NPdata13 or13 ITdata13 with13 additional13 function13 arguments13 speciZic13 to13 each13 command13 13 Accessing13 the13 help13 for13 each13 function13 in13 R13 will13 provide13 further13 details13 on13 the13 arguments13 defaults13 and13 output13 of13 each13 command

Userrsquos13 Guide13 13 2213 13

Command Description R13 help

makeAUC Make13 a13 dataframe13 of13 class13 PMauc13 containing13 subject13 ID13 and13 AUC13 from13 a13 variety13 of13 inputs13 including13 objects13 of13 PMop13 PMsim13 or13 a13 suitable13 dataframe

makeAUC

makeCov Generate13 a13 dataframe13 of13 class13 PMcov13 with13 subject-shy‐speciZic13 covariates13 extracted13 from13 the13 data13 csv13 Zile13 This13 object13 can13 be13 plotted13 and13 used13 to13 test13 for13 covariates13 which13 are13 signiZicantly13 associated13 with13 model13 parameters13 13

makeCov

makeCycle Create13 a13 PMcycle13 object13 described13 in13 the13 previous13 section makeCycle

makeFinal Create13 a13 PMZinal13 object13 described13 in13 the13 previous13 section makeFinal

makeOP Create13 a13 PMop13 object13 described13 in13 the13 previous13 section makeOP

makeNCA Create13 a13 dataframe13 (class13 PMnca)13 with13 the13 output13 of13 a13 non-shy‐compartmental13 analysis13 using13 PMpost13 and13 NPAG13 data13 objects13 as13 input13 13 The13 PMnca13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull auc13 Area13 under13 the13 time-shy‐observation13 curve13 using13 the13

trapezoidal13 approximation13 from13 time13 013 until13 the13 second13 dose13 or13 if13 only13 one13 dose13 until13 the13 last13 observation

bull aumc13 Area13 under13 the13 Zirst13 moment13 curvebull k13 Slope13 by13 least-shy‐squares13 linear13 regression13 of13 the13 Zinal13

613 log-shy‐transformed13 observations13 vs13 timebull auclast13 Area13 under13 the13 curve13 from13 the13 time13 of13 the13

last13 observation13 to13 inZinity13 calculated13 as13 [Final13 obs]kbull aumclast13 Area13 under13 the13 Zirst13 moment13 curve13 from13

the13 time13 of13 the13 last13 observation13 to13 inZinitybull aucinf13 Area13 under13 the13 curve13 from13 time13 013 to13 inZinity13

caluculated13 as13 auc13 +13 auclastbull aumcinf13 Area13 under13 the13 Zirst13 moment13 curve13 from13

time13 013 to13 inZinitybull mrt13 Mean13 residence13 time13 calculated13 as13 1kbull cmax13 Maximum13 predicted13 concentration13 after13 the13

Zirst13 dosebull tmax13 Time13 to13 cmaxbull cl13 Clearance13 calculated13 as13 doseaucinfbull vdss13 Volume13 of13 distribution13 at13 steady13 state13

calculated13 as13 clmrtbull thalf13 Half13 life13 of13 elimination13 calculated13 as13 ln(2)kbull dose13 First13 dose13 amount13 for13 each13 subject

makeNCA

Userrsquos13 Guide13 13 2313 13

Command Description R13 help

makeErrorPoly This13 function13 plots13 Zirst13 second13 and13 third13 order13 polynomial13 functions13 Zitted13 to13 pairs13 of13 observations13 and13 associated13 standard13 deviations13 for13 a13 given13 output13 assay13 In13 this13 way13 the13 standard13 deviation13 associated13 with13 any13 observation13 may13 be13 calculated13 and13 used13 to13 appropriately13 weight13 that13 observation13 in13 the13 model13 building13 process13 Observations13 are13 weighted13 by13 the13 reciprocal13 of13 the13 variance13 or13 squared13 standard13 deviation13 13 Output13 of13 the13 function13 is13 a13 plot13 of13 the13 measured13 observations13 and13 Zitted13 polynomial13 curves13 and13 a13 list13 with13 the13 Zirst13 second13 and13 third13 order13 coefZicients

makeErrorPoly

makePTA This13 function13 performs13 a13 Probability13 of13 Target13 Attainment13 analysis13 for13 a13 set13 of13 simulated13 doses13 and13 time-shy‐concentration13 proZiles13 13 Targets13 (eg13 Minimum13 Inhibitory13 Concentrations)13 the13 type13 of13 target13 attainment13 (ie13 time13 above13 target13 Cmaxtarget13 13 AUCtarget13 Cmintarget13 or13 Cxtarget13 where13 x13 is13 any13 time13 point)13 and13 the13 success13 threshold13 (eg13 time13 gt13 0713 or13 Cmaxtarget13 gt13 10)13 can13 all13 be13 speciZied13 13 Output13 is13 a13 list13 (class13 PMpta)13 with13 two13 objectsbull Results13 a13 413 dimensional13 array13 with13 dimension13 size13 of13

[number13 of13 doses13 number13 of13 targets13 number13 of13 simulated13 proZiles13 1]13 which13 gives13 the13 target13 attainment13 (eg13 Cmaxtarget)13 for13 each13 dose13 target13 and13 proZile

bull Outcome13 For13 each13 dose13 and13 target13 a13 summary13 of13 the13 target13 attainment13 for13 all13 the13 proZiles13 including13 mean13 standard13 deviation13 and13 proportion13 above13 the13 success13 threshold

PMpta13 objects13 can13 be13 summarized13 with13 summary(x)13 and13 plotted13 with13 plot(x)13

makePTA

Userrsquos13 Guide13 13 2413 13

Command Description R13 help

makePopmakePost(NPAG13 only)

These13 functions13 create13 dataframes13 of13 class13 PMpop13 and13 PMpost13 respectively13 13 The13 PMpop13 or13 PMpost13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull time13 Times13 for13 predicted13 concentrations13 13 These13

times13 are13 not13 necessarily13 at13 observed13 times13 but13 at13 a13 frequency13 speciZied13 in13 the13 NPAG13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

bull pred113 Predictions13 for13 output13 113 13 For13 PMpop13 objects13 predictions13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 population13 prior13 distribution13 13 For13 PMpost13 objects13 they13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject

bull pred213 pred313 etc13 If13 additional13 outputs13 exist13 they13 will13 each13 be13 columns13 in13 the13 dataframe13 just13 as13 for13 pred113 13

makePopmakePost

NPAG RunsIn13 the13 past13 users13 had13 to13 run13 NPAG13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 NPrun()13 13 However13 if13 NPrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable

1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 NPAG13 creates13 a13 temporary13 instruction13 Zile13 in13 case13 something13 happens13 so13 that13 instructions13 entered13 to13 date13 can13

be13 recovered13 13 Accept13 the13 default13 by13 choosing13 113 13 You13 can13 save13 with13 a13 meaningful13 Zilename13 later13 13 If13 it13 already13 exists13 you13 will13 be13 asked13 if13 you13 wish13 to13 overwrite13 the13 Zile13 which13 is13 usually13 the13 thing13 to13 do

Userrsquos13 Guide13 13 2513 13

8 If13 you13 have13 previously13 run13 IT2B13 you13 can13 automatically13 import13 the13 suggested13 parameter13 ranges13 13 Choose13 113 to13 do13 this13 and13 013 to13 run13 NPAG13 without13 a13 previous13 IT2B13 run81 If13 you13 choose13 option13 113 you13 must13 specify13 the13 name13 of13 a13 FROMxxxx13 Zile13 typically13 FROM000113 that13 you13 can13

Zind13 in13 an13 output13 directory13 after13 a13 successful13 IT2B13 run13 13 Note13 that13 the13 program13 will13 then13 assume13 that13 you13 are13 using13 the13 same13 wrk13 Ziles13 that13 IT2B13 made13 from13 your13 data13 csv13 Zile13 13 It13 is13 strongly13 recommended13 to13 override13 this13 and13 specify13 a13 data13 csv13 Zile13 13 At13 this13 point13 you13 will13 jump13 to13 1013 below13 and13 continue13 on13 however13 your13 answers13 will13 often13 be13 supplied13 by13 the13 instructions13 contained13 in13 the13 FROMxxxx13 Zile13 and13 you13 need13 merely13 conZirm13 them

9 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13 have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 NPrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis91 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13

for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

10 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 NPAG13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

11 Enter13 the13 name13 of13 your13 csv13 Zile13 now12 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile13 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset131 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects132 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry14 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset15 Enter13 the13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo 13 followed13 by13

return16 Select13 how13 you13 would13 like13 to13 model13 assay13 (observation)13 error13 for13 each13 output13 equation13 13 You13 have13 four13 choices13 13

In13 all13 four13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0161 Error13 model13 113 (SD)13 13 Choose13 this13 option13 if13 you13 have13 already13 run13 IT2B13 and13 multiplied13 your13 assay13 error13

polynomial13 by13 gamma13 (see13 next13 option13 for13 a13 description13 of13 gamma)162 Error13 model13 213 (SD13 13 gamma)13 13 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13

observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 If13 you13 choose13 this13 option13 you13 then13 can13 specify13 the13 starting13 value13 of13 gamma13 13 Good13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality

163 Error13 model13 313 (SD213 +13 lamda2)0513 13 Lamda13 is13 an13 alternative13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present

Userrsquos13 Guide13 13 2613 13

164 Error13 model13 413 SD13 =13 gamma13 13 This13 model13 is13 rarely13 used13 and13 is13 equivalent13 to13 specifying13 a13 model13 with13 C013 only13 ie13 a13 constant13 error13 regardless13 of13 concentration

17 Once13 you13 select13 the13 assay13 error13 model13 for13 each13 output13 equation13 you13 are13 then13 offered13 four13 more13 options13 on13 which13 assay13 error13 polynomial13 coefZicients13 to13 use13 13 Choices13 113 and13 213 are13 the13 most13 commonly13 used171 Choice13 113 The13 default13 13 Use13 coefZicients13 in13 the13 subject13 record13 (C013 C113 C213 C313 in13 the13 data13 csv13 Zile)13 and13 if13

missing13 use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 (item13 1813 below)172 Choice13 213 Use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 for13 all13 subjects13 regardless13 of13 what13 is13 in13 the13

data13 csv13 Zile173 Choice13 313 13 To13 multiply13 data13 csv13 values13 and13 default13 entered13 values13 by13 a13 Zixed13 gamma13 and13 use13 them13 13 174 Choice13 013 Specify13 coefZicients13 on13 a13 subject13 by13 subject13 basis13 either13 those13 in13 the13 data13 csv13 Zile13 already13 the13

default13 values13 entered13 into13 the13 program13 or13 other13 values18 For13 each13 output13 equation13 after13 you13 have13 selected13 the13 option13 in13 item13 1713 you13 will13 be13 prompted13 to13 supply13 the13

required13 information13 including13 the13 general13 default13 values13 for13 missing13 or13 overridden13 values13 in13 the13 data13 csv13 Zile19 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13

usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13

20 Enter13 the13 grid13 point13 index13 13 This13 number13 corresponds13 to13 the13 number13 of13 grid13 (support)13 points13 which13 will13 initially13 Zill13 the13 model13 parameter13 space13 13 The13 larger13 the13 number13 of13 random13 parameters13 to13 be13 estimated13 the13 more13 points13 are13 required13 13 The13 program13 will13 make13 a13 suggestion13 based13 on13 the13 number13 of13 random13 parameters13 in13 the13 model13 13 The13 more13 you13 choose13 the13 slower13 the13 run13 will13 be13 but13 results13 may13 improve13 13 It13 is13 reasonable13 to13 choose13 fewer13 points13 early13 in13 model13 exploration13 and13 increase13 in13 later13 phases13 or13 if13 poor13 model13 Zits13 or13 lack13 of13 convergence13 are13 noted13 The13 choices13 are13 113 to13 713 corresponding13 respectively13 to13 212913 500313 1000713 2001113 4000913 and13 8002113 points13 13 If13 you13 choose13 713 you13 then13 have13 an13 additional13 choice13 to13 select13 one13 or13 more13 multiples13 of13 8002113 points

21 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 013 or13 greater13 13 If13 you13 enter13 an13 integer13 greater13 than13 013 the13 engine13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13 If13 you13 enter13 013 this13 is13 the13 way13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 an13 independent13 data13 set13 and13 a13 non-shy‐uniform13 prior13 must13 be13 speciZied13 (see13 3013 below)13 13 This13 means13 that13 the13 engine13 will13 only13 calculate13 the13 individual13 Bayesian13 posteriors13 for13 the13 new13 subjects13 using13 the13 population13 joint13 density13 from13 a13 previous13 run13 as13 a13 Bayesian13 prior

22 Information13 about13 convergence13 criteria13 13 Answer13 113 or13 some13 other13 keystroke13 plus13 Return13 to13 acknowledge13 that13 you13 have13 read13 it

23 In13 order13 to13 predict13 concentrations13 from13 a13 non-shy‐parametric13 distribution13 you13 have13 the13 option13 to13 use13 the13 1)13 mean13 2)13 median13 or13 3)13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject13 13 We13 typically13 use13 the13 median13 Zirst13 and13 then13 the13 mean13 in13 a13 separate13 run13 and13 compare13 the13 differences13 13

24 Select13 the13 time13 interval13 to13 generate13 predicted13 concentrations13 13 Additionally13 there13 will13 also13 be13 predictions13 made13 at13 the13 time13 of13 each13 observation13 13 In13 general13 for13 most13 models13 predictions13 every13 1213 minutes13 provide13 sufZicient13 granularity13 13 Smaller13 values13 can13 result13 in13 very13 large13 Ziles13 for13 big13 populations

25 Select13 the13 default13 MIC13 to13 be13 used13 for13 AUCMIC13 ratio13 reporting13 13 This13 should13 generally13 be13 set13 to13 the13 default13 of13 113 by13 choosing13 113 13 You13 can13 always13 extract13 the13 AUC13 later13 and13 divide13 it13 by13 any13 MIC13 you13 choose

26 Enter13 the13 value13 in13 hours13 that13 you13 want13 for13 calculations13 of13 AUCs13 from13 predicted13 concentration13 proZiles13 13 The13 default13 is13 2413 hours13 which13 you13 can13 accept13 by13 entering13 113 or13 013 if13 you13 want13 to13 specify13 a13 different13 interval

27 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

28 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

Userrsquos13 Guide13 13 2713 13

29 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

30 For13 the13 prior13 density13 choose13 113 if13 it13 is13 to13 be13 uniform13 13 This13 means13 that13 the13 initial13 grid13 points13 will13 be13 evenly13 distributed13 with13 equal13 probability13 within13 the13 boundaries13 speciZied13 (in13 1513 above)13 13 If13 you13 choose13 013 you13 will13 be13 prompted13 for13 the13 name13 of13 a13 Zile13 that13 contains13 the13 prior13 density13 13 This13 will13 be13 DEN000113 unless13 you13 have13 changed13 its13 name13 13 It13 will13 be13 found13 in13 the13 output13 directory13 of13 a13 prior13 NPAG13 run13 13 The13 model13 used13 to13 generate13 the13 DEN000113 Zile13 must13 be13 exactly13 the13 same13 as13 the13 current13 model13 including13 parameter13 boundaries13 13 However13 this13 option13 is13 useful13 to13 specify13 a13 non-shy‐uniform13 density13 for13 two13 reasons13 13 The13 Zirst13 is13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 a13 new13 set13 of13 subjects13 13 Do13 this13 in13 combination13 with13 setting13 the13 number13 of13 cycles13 to13 013 (see13 2113 above)13 13 The13 second13 use13 for13 a13 non-shy‐uniform13 prior13 is13 to13 continue13 a13 previous13 run13 13 For13 example13 if13 you13 only13 set13 the13 number13 of13 cycles13 to13 5013 to13 get13 a13 rough13 idea13 of13 model13 Zit13 you13 may13 continue13 where13 you13 left13 off13 by13 specifying13 the13 DEN000113 Zile13 from13 the13 50-shy‐cycle13 run13 and13 continuing13 with13 as13 many13 additional13 cycles13 as13 you13 specify13 in13 item13 2113 13 So13 in13 the13 example13 if13 you13 specify13 10013 cycles13 in13 2113 the13 total13 number13 of13 cycles13 will13 be13 5013 +13 10013 =13 150

31 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 NPrun(instr=ldquoyourfilerdquo)13 option13 and13 including13 ldquoyourZilerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

32 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 NPAG13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 NPAG13 analysis

33 The13 NPAG13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

IT2B RunsIn13 the13 past13 users13 had13 to13 run13 IT2B13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 ITrun()13 13 However13 if13 ITrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13

have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 ITrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis

Userrsquos13 Guide13 13 2813 13

71 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13 for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

8 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 IT2B13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

9 Enter13 the13 name13 of13 your13 csv13 Zile13 now10 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile11 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset111 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects112 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry12 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset13 Enter13 the13 initial13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo13 followed13

by13 return14 The13 estimated13 mean13 for13 each13 parameter13 value13 distribution13 during13 the13 Zirst13 iteration13 will13 be13 the13 median13 of13 the13

range13 speciZied13 in13 1313 13 You13 now13 have13 the13 option13 to13 specify13 the13 standard13 deviation13 for13 the13 parameter13 value13 distribution13 which13 by13 default13 is13 half13 of13 the13 range13 in13 1313 13 Choose13 113 to13 accept13 this13 (the13 usual13 answer)13 or13 013 to13 change13 it13 to13 something13 else13 expressed13 as13 a13 multiple13 of13 the13 range

15 In13 IT2B13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 You13 can13 now13 choose13 113 if13 every13 subject13 has13 the13 same13 coefZicients13 or13 013 to13 use13 a13 unique13 set13 of13 coefZicients13 for13 each13 subject13 13 The13 Zirst13 case13 is13 the13 more13 usual13 when13 all13 13 samples13 from13 all13 subjects13 are13 analyzed13 in13 the13 same13 lab13 13 If13 13 samples13 are13 analyzed13 in13 different13 labs13 and13 you13 have13 the13 assay13 data13 from13 each13 lab13 then13 you13 would13 enter13 013 13 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 (see13 151313 below)13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0151 If13 you13 choose13 113 (one13 set13 of13 coefZicients13 for13 all13 subjects)13 you13 will13 then13 be13 presented13 with13 313 additional13

choices1511 Choice13 113 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13 observation13

including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 and13 to13 Zix13 gamma13 to13 1

1512 Choice13 213 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 but13 to13 estimate13 gamma13 based13 on13 the13 data13 13 This13 is13 the13 usual13 option

1513 Choice13 313 Choose13 this13 option13 if13 you13 wish13 to13 estimate13 the13 assay13 error13 coefZicients13 based13 on13 your13 data13 for13 use13 in13 future13 runs13 13 Although13 you13 can13 access13 this13 option13 by13 using13 either13 ITrun()13 or13 ERRrun()13 in13 R13 the13 instruction13 Ziles13 that13 you13 save13 and13 the13 generated13 output13 Ziles13 will13 be13 different13 13 Therefore13 we13 recommend13 that13 if13 you13 intend13 to13 choose13 this13 option13 use13 ERRrun()13 in13 R13 which13 will13 generate13 an13 ASS000113 Zile13 that13 contains13 the13 estimates13 for13 C013 C113 C213 and13 C313 13 You13 can13 then13 include13 this13 Zile13 in13 the13 working13 directory13 (along13 with13 a13 model13 txt13 Zile13 and13 a13 data13 csv13 Zile)13 to13 do13 an13 IT2B13 run13 supplying13 the13 Zile13 name13 in13 16113 below

Userrsquos13 Guide13 13 2913 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

Pmetrics13 is13 distributed13 as13 a13 package13 source13 Zile13 archive13 (tgz13 for13 Mac13 zip13 for13 Windows)13 13 Do13 not13 open13 the13 archive13 13 To13 install13 Pmetrics13 from13 the13 R13 console13 use13 the13 command13 installpackages(filechoose())13 and13 navigate13 when13 prompted13 to13 the13 folder13 in13 which13 you13 placed13 the13 Pmetrics13 package13 archive13 (zip13 or13 tgz)13 Zile13 13 Pmetrics13 will13 need13 the13 following13 R13 packages13 for13 some13 functions13 chron13 Defaults13 and13 R2HTML13 13 However13 you13 do13 not13 have13 to13 install13 these13 if13 you13 do13 not13 already13 have13 them13 in13 your13 R13 library13 13 They13 should13 automatically13 be13 downloaded13 and13 installed13 the13 Zirst13 time13 you13 use13 a13 Pmetrics13 function13 that13 requires13 them13 but13 if13 something13 goes13 awry13 (such13 as13 no13 internet13 connection13 or13 busy13 server)13 you13 can13 do13 this13 manually

FortranIn13 order13 to13 run13 Pmetrics13 a13 Fortran13 compiler13 is13 required13 13 After13 you13 have13 installed13 Pmetrics13 the13 Zirst13 time13 you13 load13 Pmetrics13 into13 R13 with13 the13 function13 library(Pmetrics)13 the13 program13 will13 ask13 you13 which13 Fortran13 compiler13 you13 are13 using13 13 If13 you13 have13 no13 compiler13 you13 will13 have13 the13 option13 to13 automatically13 link13 you13 to13 the13 OS-shy‐speciZic13 page13 of13 our13 website13 with13 explicit13 instructions13 and13 a13 link13 to13 download13 and13 install13 gfortran13 on13 your13 system13 13 Details13 of13 this13 procedure13 follow13 but13 are13 not13 relevant13 if13 you13 already13 have13 a13 compiler13 installedFor13 Mac13 users13 the13 correct13 version13 of13 gfortran13 will13 be13 downloaded13 for13 your13 system13 (Mountain13 Lion13 64-shy‐bit13 Lion13 64-shy‐bit13 Snow13 Leopard13 64-shy‐13 or13 32-shy‐bit)13 You13 will13 also13 be13 provided13 a13 link13 to13 download13 and13 install13 Applersquos13 Xcode13 application13 if13 you13 do13 not13 already13 have13 it13 on13 your13 system13 13 Xcode13 is13 required13 to13 run13 gfortran13 on13 Macs13 As13 of13 version13 4313 for13 Lion13 Xcode13 is13 available13 from13 the13 App13 store13 for13 free13 13 For13 Snow13 Leopard13 Xcode13 is13 on13 your13 installation13 disk13 13 NOTE13 For13 Xcode13 downloaded13 from13 the13 App13 store13 (Lion13 and13 later)13 you13 must13 additionally13 install13 the13 Command13 Line13 Tools13 available13 in13 the13 Xcode13 Preferences13 -shy‐gt13 Downloads13 paneWindows13 users13 need13 to13 pay13 special13 attention13 because13 the13 the13 ldquogccrdquo13 installer13 that13 provides13 necessary13 common13 libraries13 for13 many13 programming13 languages13 does13 not13 by13 default13 include13 gfortran13 13 When13 gcc13 is13 installed13 be13 sure13 to13 choose13 the13 fortran13 option13 to13 include13 gfortran13 as13 shown13 below

RstudioA13 text13 editor13 that13 can13 link13 to13 R13 is13 useful13 for13 saving13 scripts13 13 Both13 the13 Windows13 and13 Mac13 versions13 of13 R13 have13 rudimentary13 text13 editors13 that13 are13 stable13 and13 reliable13 13 Numerous13 other13 free13 and13 paid13 editors13 can13 also13 do13 the13 job13 and13 these13 can13 be13 located13 by13 searching13 the13 internet13 13 We13 prefer13 Rstudio

What This Manual Is NotWe13 assume13 that13 the13 user13 has13 familiarity13 with13 population13 modeling13 and13 R13 and13 thus13 this13 manual13 is13 not13 a13 tutorial13 for13 basic13 concepts13 and13 techniques13 in13 either13 domain13 13 We13 have13 tried13 to13 make13 the13 R13 code13 simple13 regular13 and13 well13 documented13 13 13 13 A13 very13 good13 free13 online13 resource13 for13 learning13 the13 basics13 of13 R13 can13 be13 found13 at13 httpwwwstatmethodsnetindexhtml13 13 We13 recognize13 that13 initial13 use13 of13 a13 new13 software13 package13 can13 be13 complex13 so13

Userrsquos13 Guide13 13 413 13

Click13 the13 expander13 bu6on

Check13 this13 box

please13 feel13 free13 to13 contact13 us13 at13 any13 time13 preferably13 through13 the13 Pmetrics13 forum13 at13 httpwwwlapkorg13 13 or13 directly13 by13 email13 at13 contactlapkorgThis13 manual13 is13 also13 not13 intended13 to13 be13 a13 theoretical13 treatise13 on13 the13 algorithms13 used13 in13 IT2B13 or13 NPAG13 13 For13 that13 the13 user13 is13 directed13 to13 our13 website13 at13 wwwlapkorg

Getting Help and UpdatesThere13 is13 an13 active13 LAPK13 forum13 available13 from13 our13 website13 at13 httpwwwlapkorg13 with13 all13 kinds13 of13 useful13 tips13 and13 help13 with13 Pmetrics13 13 Register13 (separately13 from13 your13 LAPK13 registration)13 and13 feel13 free13 to13 post13 13 Within13 R13 you13 can13 also13 use13 help(ldquocommandrdquo)13 or13 command13 in13 the13 R13 console13 to13 see13 detailed13 help13 Ziles13 for13 any13 Pmetrics13 command13 13 Many13 commands13 have13 examples13 included13 in13 this13 documentation13 and13 you13 can13 execute13 the13 examples13 with13 example(command)13 Note13 that13 here13 quotation13 marks13 are13 unnecessary13 around13 command13 You13 can13 also13 type13 PMmanual()13 to13 launch13 this13 manual13 from13 within13 Pmetrics13 as13 well13 as13 a13 catalogue13 of13 all13 Pmetrics13 functions13 13 Finally13 PMnews()13 will13 display13 the13 Pmetrics13 changelog

Pmetrics13 will13 check13 for13 updates13 automatically13 every13 time13 you13 load13 it13 with13 library(Pmetrics)13 13 If13 an13 update13 is13 available13 it13 will13 provide13 a13 brief13 message13 to13 inform13 you13 13 You13 can13 then13 use13 PMupdate() to13 update13 Pmetrics13 from13 within13 R13 without13 having13 to13 visit13 our13 website13 13 You13 will13 be13 prompted13 for13 your13 LAPK13 user13 email13 address13 and13 password13 13 When13 bugs13 arise13 in13 Pmetrics13 you13 may13 see13 a13 start13 up13 message13 to13 inform13 you13 of13 the13 bug13 and13 a13 patch13 can13 be13 installed13 by13 the13 command13 PMpatch()13 if13 available13 13 Note13 that13 patches13 must13 be13 reinstalled13 with13 this13 command13 every13 time13 you13 launch13 Pmetrics13 until13 the13 bug13 is13 corrected13 in13 the13 next13 versionAs13 of13 version13 113 Pmetrics13 has13 graphical13 user13 interface13 (GUI)13 capability13 for13 many13 functions13 13 Using13 PMcode(ldquofunctionrdquo)13 will13 launch13 the13 GUI13 in13 your13 default13 browser13 13 While13 you13 are13 interacting13 with13 the13 GUI13 R13 is13 ldquolisteningrdquo13 and13 no13 other13 activity13 is13 possible13 13 The13 GUI13 is13 designed13 to13 generate13 Pmetrics13 R13 code13 in13 response13 to13 your13 input13 in13 a13 friendly13 intuitive13 environment13 13 That13 code13 can13 be13 copied13 and13 pasted13 into13 your13 Pmetrics13 R13 script13 13 You13 can13 also13 see13 live13 plot13 previews13 with13 the13 GUI13 13 All13 this13 is13 made13 possible13 with13 the13 lsquoshinyrsquo13 package13 for13 RCurrently13 the13 following13 GUIs13 are13 available13 13 PMcode(ldquoNPrunrdquo) PMcode(ldquoITrunrdquo) PMcode(ldquoplotrdquo)13 13 More13 are13 coming

Pmetrics ComponentsThere13 are13 three13 main13 software13 programs13 that13 Pmetrics13 controlsbull IT2B13 is13 the13 ITerative13 2-shy‐stage13 Bayesian13 parametric13 population13 PK13 modeling13 program13 13 It13 is13 generally13 used13 to13

estimate13 parameter13 ranges13 to13 pass13 to13 NPAG13 13 It13 will13 estimate13 values13 for13 population13 model13 parameters13 under13 the13 assumption13 that13 the13 underlying13 distributions13 of13 those13 values13 are13 normal13 or13 transformed13 to13 normal

bull NPAG13 is13 the13 Non-shy‐parametric13 Adaptive13 Grid13 software13 13 It13 will13 create13 a13 non-shy‐parametric13 population13 model13 consisting13 of13 discrete13 support13 points13 each13 with13 a13 set13 of13 estimates13 for13 all13 parameters13 in13 the13 model13 plus13 an13 associated13 probability13 (weight)13 of13 that13 set13 of13 estimates13 13 There13 can13 be13 at13 most13 one13 point13 for13 each13 subject13 in13 the13 study13 population13 13 There13 is13 no13 need13 for13 any13 assumption13 about13 the13 underlying13 distribution13 of13 model13 parameter13 values

bull The13 simulator13 is13 a13 semi-shy‐parametric13 Monte13 Carlo13 simulation13 software13 program13 that13 can13 use13 the13 output13 of13 IT2B13 or13 NPAG13 to13 build13 randomly13 generated13 response13 proZiles13 (eg13 time-shy‐concentration13 curves)13 for13 a13 given13 population13 model13 parameter13 estimates13 and13 data13 input13 13 Simulation13 from13 a13 non-shy‐parametric13 joint13 density13 model13 ie13 NPAG13 output13 is13 possible13 with13 each13 point13 serving13 as13 the13 mean13 of13 a13 multivariate13 normal13 distribution13 weighted13 according13 to13 the13 weight13 of13 the13 point13 13 The13 covariance13 matrix13 of13 the13 entire13 set13 of13 support13 points13 is13 divided13 equally13 among13 the13 points13 for13 the13 purposes13 of13 simulation

Pmetrics13 has13 groups13 of13 R13 functions13 named13 logically13 to13 run13 each13 of13 these13 programs13 and13 to13 extract13 the13 output13 13 Again13 these13 are13 extensively13 documented13 within13 R13 by13 using13 the13 help(command)13 or13 command13 syntax13 bull ITrun13 ITparse13 ITload13 ITreport13 ERRrunbull NPrun13 NPparse13 NPload13 NPreportbull SIMrun13 SIMparse

Userrsquos13 Guide13 13 513 13

For13 IT2B13 and13 NPAG13 the13 ldquorunrdquo13 functions13 generate13 batch13 Ziles13 which13 when13 executed13 launch13 the13 software13 programs13 to13 do13 the13 analysis13 ERRrun13 is13 a13 special13 implementation13 of13 IT2B13 designed13 to13 estimate13 the13 assay13 error13 polynomial13 coefZicients13 from13 the13 data13 when13 they13 cannot13 be13 calculated13 from13 assay13 validation13 data13 (using13 makeErrorPoly())13 supplied13 by13 the13 analytical13 laboratory13 The13 batch13 Ziles13 contain13 all13 the13 information13 necessary13 to13 complete13 a13 run13 tidy13 the13 output13 into13 a13 datetime13 stamped13 directory13 with13 meaningful13 subdirectories13 extract13 the13 information13 generate13 a13 report13 and13 a13 saved13 Rdata13 Zile13 of13 parsed13 output13 which13 can13 be13 quickly13 and13 easily13 loaded13 into13 R13 13 On13 Mac13 (Unix)13 systems13 the13 batch13 Zile13 will13 automatically13 launch13 in13 a13 Terminal13 window13 13 On13 Windows13 systems13 the13 batch13 Zile13 must13 be13 launched13 manually13 13 In13 both13 cases13 the13 execution13 of13 the13 program13 to13 do13 the13 actual13 model13 parameter13 estimation13 is13 independent13 of13 R13 so13 that13 the13 user13 is13 free13 to13 use13 R13 for13 other13 purposesFor13 the13 Simulator13 the13 ldquorunrdquo13 function13 will13 execute13 the13 program13 directly13 within13 RFor13 all13 programs13 the13 ldquoparserdquo13 functions13 will13 extract13 the13 primary13 output13 from13 the13 program13 into13 meaningful13 R13 data13 objects13 13 For13 IT2B13 and13 NPAG13 this13 is13 done13 automatically13 at13 the13 end13 of13 a13 successful13 run13 and13 the13 objects13 are13 saved13 in13 the13 output13 subdirectory13 as13 IT2BoutRdata13 or13 NPAGoutRdata13 respectivelyFor13 IT2B13 and13 NPAG13 the13 ldquoloadrdquo13 functions13 can13 be13 used13 to13 load13 the13 above13 Rdata13 Ziles13 after13 a13 successful13 run13 13 The13 ldquoreportrdquo13 functions13 are13 automatically13 run13 at13 the13 end13 of13 a13 successful13 run13 and13 these13 will13 generate13 an13 HTML13 page13 with13 summaries13 of13 the13 run13 as13 well13 as13 the13 Rdata13 Ziles13 and13 other13 objects13 13 The13 default13 browser13 will13 be13 automatically13 launched13 for13 viewing13 of13 the13 HTML13 report13 pageWithin13 Pmetrics13 there13 are13 also13 functions13 to13 manipulate13 data13 csv13 Ziles13 and13 process13 and13 plot13 extracted13 databull Manipulate13 data13 csv13 Ziles13 PMreadMatrix13 PMcheck13 PMZixMatrix13 PMwriteMatrix13 PMmatrixRelTime13

PMwrk2csvbull Process13 data13 makeAUC13 makeCov13 makeCycle13 makeFinal13 makeOP13 makeNCA13 makeErrorPolybull Plot13 data13 plotPMcov13 plotPMcycle13 plotPMZinal13 plotPMmatrix13 plotPMop13 plotPMsim13 plotPMdiag13

plotPMptabull Model13 selection13 and13 diagnostics13 PMcompare13 plotPMop13 (with13 residual13 option)13 PMdiag13 PMstepbull Pmetrics13 function13 defaults13 PMwriteDefaultsAgain13 all13 functions13 have13 extensive13 help13 Ziles13 and13 examples13 which13 can13 be13 examined13 in13 R13 by13 using13 the13 help(command)13 or13 command13 syntax13 13

Customizing Pmetrics FunctionsWhen13 Pmetrics13 is13 loaded13 with13 a13 library(Pmetrics)13 command13 it13 will13 also13 load13 the13 Defaults13 package13 13 If13 not13 present13 it13 will13 automatically13 download13 it13 from13 CRAN13 13 This13 package13 allows13 you13 to13 change13 the13 default13 for13 any13 Pmetrics13 function13 argument13 13 See13 Defaults13 for13 more13 help13 but13 some13 key13 functions13 are13 summarized13 here

setDefaults(name) Where13 name13 is13 something13 like13 PMreadMatrix13 and13 is13 a13 list13 of13 arguments13 whose13 default13 you13 wish13 to13 change13 13 So13 if13 you13 want13 PMreadMatrix13 to13 read13 semicolon13 delimited13 Ziles13 by13 default13 instead13 of13 comma13 separated13 Ziles13 use13 setDefaults(PMreadMatrix delim=rdquordquo)

getDefaults()13 or13 getDefaults(name) 13 The13 Zirst13 command13 will13 list13 all13 functions13 that13 have13 alternative13 defaults13 and13 the13 second13 will13 list13 the13 alternatives13 for13 a13 given13 function13 13 unsetDefaults(name)13 13 Restores13 the13 defaults13 to13 normal13 for13 a13 given13 function

The13 above13 functions13 will13 manipulate13 defaults13 for13 a13 single13 session13 in13 R13 13 They13 are13 all13 included13 in13 the13 Defaults13 package13 13 If13 you13 want13 to13 make13 the13 defaults13 durable13 from13 session13 to13 session13 use13 the13 following13 function13 in13 PmetricsPMwriteDefaults()13 13 This13 will13 save13 your13 defaults13 and13 they13 will13 be13 restored13 every13 time13 you13 load13 Pmetrics

Userrsquos13 Guide13 13 613 13

Userrsquos13 Guide13 13 713 13

You13 supply13 these13 files13 Pmetrics13 does13 the13 rest

General WorkflowThe13 general13 Pmetrics13 workZlow13 for13 IT2B13 and13 NPAG13 is13 shown13 in13 the13 following13 diagram

Data13 csv13 file Model13 txt13 file

PreparaCon13 program

Engine13 program

InstrucCon13 file

Output

ITrun()

13 NPrun

()

ITload()13 NPload()

R13 is13 used13 to13 specify13 the13 working13 directory13 containing13 the13 data13 csv13 and13 model13 txt13 Ziles13 Through13 the13 batch13 Zile13 generated13 by13 R13 the13 preparation13 program13 is13 compiled13 and13 executed13 13 The13 instruction13 Zile13 is13 generated13 automatically13 by13 the13 contents13 of13 the13 data13 and13 model13 Ziles13 and13 by13 arguments13 to13 the13 NPrun()13 ITrun()13 or13 ERRrun()13 commands13 The13 batch13 Zile13 will13 then13 compile13 and13 execute13 the13 engine13 Zile13 according13 to13 the13 instructions13 which13 will13 generate13 several13 output13 Ziles13 upon13 completion13 13 Finally13 the13 batch13 Zile13 will13 call13 the13 R13 script13 to13 generate13 the13 summary13 report13 and13 several13 data13 objects13 including13 the13 IT2BoutRdata13 or13 NPAGoutRdata13 Ziles13 which13 can13 be13 loaded13 into13 R13 subsequently13 using13 ITload()13 or13 NPload()Both13 input13 Ziles13 (data13 model)13 are13 text13 Ziles13 which13 can13 be13 edited13 directly

Userrsquos13 Guide13 13 813 13

Pmetrics Input FilesData13 csv13 Files

Pmetrics13 accepts13 input13 as13 a13 spreadsheet13 ldquomatrixrdquo13 format13 It13 is13 designed13 for13 input13 of13 multiple13 records13 in13 a13 concise13 way13 13 Please13 keep13 the13 number13 of13 characters13 in13 the13 Uile13 name13 le13 8Files13 are13 in13 comma-shy‐separated-shy‐values13 (csv)13 format13 13 Examples13 of13 programs13 that13 can13 save13 csv13 Ziles13 are13 any13 text13 editor13 (eg13 TextEdit13 on13 Mac13 Notepad13 on13 Windows)13 or13 spreadsheet13 program13 (eg13 Excel)13 13 Click13 on13 hyperlinked13 items13 to13 see13 an13 explanation13 13

IMPORTANT13 The13 order13 capitalization13 and13 names13 of13 the13 header13 and13 the13 Zirst13 1213 columns13 are13 Zixed13 13 All13 entries13 must13 be13 numeric13 with13 the13 exception13 of13 ID13 and13 ldquordquo13 for13 non-shy‐required13 placeholder13 entries

POPDATA13 DEC13 11ID EVID TIME DUR DOSE ADDL II INPUT OUT OUTEQ C0 C1 C2 C3 COVhellipGH 1 0 0 400 1 GH 0 05 042 1 001 01 0 0GH 0 1 046 1 001 01 0 0GH 0 2 247 1 001 01 0 0GH 4 0 0 150 1 GH 1 35 05 150 1 001 01 0 0GH 0 512 055 1 001 01 0 0GH 0 24 052 1 001 01 0 01423 1 0 1 400 -shy‐1 12 1 1423 1 01 0 100 2 1423 0 1 -shy‐99 1 001 01 0 01423 0 2 038 1 001 01 0 01423 0 2 16 2 005 02 -shy‐011 0002POPDATA13 DEC_1113 13 This13 is13 the13 header13 for13 the13 Zile13 and13 must13 be13 in13 the13 Zirst13 line13 13 It13 identiZies13 the13 versionID13 13 This13 Zield13 must13 be13 preceded13 by13 the13 ldquordquo13 symbol13 to13 conZirm13 that13 this13 is13 the13 header13 row13 It13 can13 be13

numeric13 or13 character13 and13 identiZies13 each13 individual13 13 All13 rows13 must13 contain13 an13 ID13 and13 all13 records13 from13 one13 individual13 must13 be13 contiguous13 13 Any13 subsequent13 row13 that13 begins13 with13 ldquordquo13 will13 be13 ignored13 which13 is13 helpful13 if13 you13 want13 to13 exclude13 data13 from13 the13 analysis13 but13 preserve13 the13 integrity13 of13 the13 original13 dataset13 or13 to13 add13 comment13 lines13 13 IDs13 should13 be13 1113 characters13 or13 less13 but13 may13 be13 any13 alphanumeric13 combination13 13 There13 can13 be13 at13 most13 80013 subjects13 per13 run

EVID13 This13 is13 the13 event13 ID13 Zield13 13 It13 can13 be13 013 113 or13 413 13 Every13 row13 must13 have13 an13 entry13 013 =13 observation13 113 =13 input13 (eg13 dose)13 213 313 are13 currently13 unused13 413 =13 reset13 where13 all13 compartment13 values13 are13 set13 to13 013 and13 the13 time13 counter13 is13 reset13 to13 013 13 This13 is13

useful13 when13 an13 individual13 has13 multiple13 sampling13 episodes13 that13 are13 widely13 spaced13 in13 time13 with13 no13 new13 information13 gathered13 13 This13 is13 a13 dose13 event13 so13 dose13 information13 needs13 to13 be13 complete

TIME13 This13 is13 the13 elapsed13 time13 in13 decimal13 hours13 since13 the13 Zirst13 event13 13 It13 is13 not13 currently13 clock13 time13 (eg13 2130)13 although13 this13 is13 planned13 13 Every13 row13 must13 have13 an13 entry13 and13 within13 a13 given13 ID13 rows13 must13 be13 sorted13 chronologically13 earliest13 to13 latest13 13

DUR13 This13 is13 the13 duration13 of13 an13 infusion13 in13 hours13 13 If13 EVID=113 there13 must13 be13 an13 entry13 otherwise13 it13 is13 ignored13 13 For13 a13 bolus13 (ie13 an13 oral13 dose)13 set13 the13 value13 equal13 to13 0

Userrsquos13 Guide13 13 913 13

DOSE13 This13 is13 the13 dose13 amount13 13 If13 EVID=113 there13 must13 be13 an13 entry13 otherwise13 it13 is13 ignoredADDL13 This13 speciZies13 the13 number13 of13 additional13 doses13 to13 give13 at13 interval13 II13 13 It13 may13 be13 missing13 for13 dose13

events13 (EVID=113 or13 4)13 in13 which13 case13 it13 is13 assumed13 to13 be13 013 13 It13 is13 ignored13 for13 observation13 (EVID=0)13 events13 13 Be13 sure13 to13 adjust13 the13 time13 entry13 for13 the13 subsequent13 row13 if13 necessary13 to13 account13 for13 the13 extra13 doses13 13 If13 set13 to13 -shy‐113 the13 dose13 is13 assumed13 to13 be13 given13 under13 steady-shy‐state13 conditions13 13 ADDL=-shy‐113 can13 only13 be13 used13 for13 the13 Zirst13 dose13 event13 for13 a13 given13 subject13 or13 an13 EVID=413 event13 as13 you13 cannot13 suddenly13 be13 at13 steady13 state13 in13 the13 middle13 of13 dosing13 record13 unless13 all13 compartmentstimes13 are13 reset13 to13 013 (as13 for13 an13 EVID=413 event)

II13 This13 is13 the13 interdose13 interval13 and13 is13 only13 relevant13 if13 ADDL13 is13 not13 equal13 to13 013 in13 which13 case13 it13 cannot13 be13 missing13 13 If13 ADDL=013 or13 is13 missing13 II13 is13 ignored

INPUT13 This13 deZines13 which13 input13 (ie13 drug)13 the13 DOSE13 corresponds13 to13 13 Inputs13 are13 deZined13 in13 the13 model13 Zile

OUT 13 This13 is13 the13 observation13 or13 output13 value13 13 If13 EVID=013 there13 must13 be13 an13 entry13 if13 missing13 this13 must13 be13 coded13 as13 -shy‐9913 13 It13 will13 be13 ignored13 for13 any13 other13 EVID13 and13 therefore13 can13 be13 ldquordquo13 13 There13 can13 be13 at13 most13 15013 observations13 for13 a13 given13 subject

OUTEQ13 This13 is13 the13 output13 equation13 number13 that13 corresponds13 to13 the13 OUT13 value13 13 Output13 equations13 are13 deZined13 in13 the13 model13 Zile

C013 C113 C213 C313 These13 are13 the13 coefZicients13 for13 the13 assay13 error13 polynomial13 for13 that13 observation13 13 Each13 subject13 may13 have13 up13 to13 one13 set13 of13 coefZicients13 per13 output13 equation13 13 If13 more13 than13 one13 set13 is13 detected13 for13 a13 given13 subject13 and13 output13 equation13 the13 last13 set13 will13 be13 used13 13 If13 there13 are13 no13 available13 coefZicients13 these13 cells13 may13 be13 left13 blank13 or13 Zilled13 with13 ldquordquo13 as13 a13 placeholder

COV13 Any13 column13 after13 the13 assay13 error13 coefZicients13 is13 assumed13 to13 be13 a13 covariate13 one13 column13 per13 covariate

Model13 Files

Model13 Ziles13 for13 Pmetrics13 are13 ultimately13 Fortran13 text13 Ziles13 with13 a13 header13 version13 of13 TSMULT13 13 As13 of13 Pmetrics13 version13 03013 we13 have13 adopted13 a13 very13 simple13 user13 format13 that13 Pmetrics13 will13 use13 to13 generate13 the13 Fortran13 code13 automatically13 for13 you13 13 Version13 0413 additionally13 eliminates13 the13 previously13 separate13 instruction13 Zile13 A13 model13 library13 is13 available13 on13 our13 website13 at13 httpwwwlapkorgpmetricsphp13 13 Naming13 your13 model13 files13 The13 default13 model13 Zile13 name13 is13 ldquomodeltxtrdquo13 but13 you13 can13 call13 them13 whatever13 you13 wish13 13 However13 please13 keep13 the13 number13 of13 characters13 in13 the13 model13 Uile13 name13 le13 813 When13 you13 use13 a13 model13 Zile13 in13 NPrun() ITrun ERRrun() or SIMrun()13 Pmetrics13 will13 make13 a13 Fortran13 model13 Zile13 of13 the13 same13 name13 temporarily13 renaming13 your13 Zile13 13 At13 the13 end13 of13 the13 run13 your13 original13 model13 Zile13 will13 be13 in13 the13 inputs13 subfolder13 of13 the13 run13 folder13 and13 the13 generated13 Fortran13 model13 Zile13 will13 be13 called13 ldquomodelforrdquo13 and13 moved13 to13 the13 etc13 subfolder13 of13 the13 run13 folder13 13 If13 your13 model13 is13 called13 ldquomymodeltxtrdquo13 then13 the13 Fortran13 Zile13 will13 be13 ldquomymodelforrdquoYou13 can13 still13 use13 appropriate13 Fortran13 model13 Ziles13 directly13 but13 we13 suggest13 you13 keep13 the13 for13 extension13 for13 all13 Fortran13 Ziles13 to13 avoid13 confusion13 with13 the13 new13 format13 13 If13 you13 use13 a13 for13 Zile13 as13 your13 model13 you13 will13 have13 to13 specify13 its13 name13 explicitly13 in13 the13 NPrun() ITrun ERRrun() or SIMrun()13 command13 since13 the13 default13 model13 name13 again13 is13 ldquomodeltxtrdquo13 13 If13 you13 use13 a13 for13 Zile13 directly13 it13 will13 be13 in13 the13 inputs13 subfolder13 of13 the13 run13 folder13 not13 in13 etc13 since13 you13 did13 not13 use13 the13 simpler13 template13 as13 your13 model13 Zile

Structure13 of13 model13 files13 The13 new13 model13 Zile13 is13 a13 text13 Zile13 with13 1113 blocks13 each13 marked13 by13 13 followed13 by13 a13 header13 tagPRImary13 variablesCOVariatesSECcondary13 variablesBOLus13 inputsINItial13 conditions

Userrsquos13 Guide13 13 1013 13

F13 (bioavailability)LAG13 timeDIFferential13 equationsOUTputsERRorEXTraFor13 each13 header13 only13 the13 capital13 letters13 are13 required13 for13 recognition13 by13 Pmetrics13 The13 blocks13 can13 be13 in13 any13 order13 and13 header13 names13 are13 case-shy‐insensitive13 (ie13 the13 capitalization13 here13 is13 just13 to13 show13 which13 letters13 are13 required)13 Fortran13 is13 also13 case-shy‐insensitive13 so13 in13 variable13 names13 and13 expressions13 case13 is13 ignored13 13 Details13 of13 each13 block13 are13 next13 followed13 by13 a13 complete13 example

Primary13 variables

Primary13 variables13 are13 the13 model13 parameters13 that13 are13 to13 be13 estimated13 by13 Pmetrics13 or13 are13 designated13 as13 Zixed13 parameters13 with13 user13 speciZied13 values13 It13 should13 be13 a13 list13 of13 variable13 names13 one13 name13 to13 a13 line13 Variable13 names13 should13 be13 1113 characters13 or13 fewer13 Some13 variable13 names13 are13 reserved13 for13 use13 by13 Pmetrics13 and13 cannot13 be13 used13 as13 primary13 variable13 names13 13 13 The13 number13 of13 primary13 variables13 must13 be13 between13 213 and13 3213 with13 at13 most13 3013 random13 or13 2013 Uixed13 13 On13 each13 row13 following13 the13 variable13 name13 include13 the13 range13 for13 the13 parameter13 that13 deZines13 the13 search13 space13 13 For13 NPAG13 this13 is13 absolute13 ie13 the13 algorithm13 will13 not13 search13 outside13 this13 range13 13 For13 IT2B13 the13 range13 is13 a13 starting13 range13 13 The13 simulator13 will13 ignore13 the13 ranges13 ExamplePriKE13 013 5V13 00113 100KA13 013 5KCP13 013 5KPC13 013 13 5Tlag113 013 2IC313 013 10000FA113 013 1

Covariates

Covariates13 are13 subject13 speciZic13 data13 such13 as13 body13 weight13 contained13 in13 the13 data13 csv13 Zile13 The13 covariate13 names13 which13 are13 the13 column13 names13 in13 the13 data13 Zile13 can13 be13 included13 here13 for13 use13 in13 secondary13 variable13 equations13 The13 order13 should13 be13 the13 same13 as13 in13 the13 data13 Zile13 and13 although13 the13 names13 do13 not13 have13 to13 be13 the13 same13 we13 strongly13 encourage13 you13 to13 make13 them13 the13 same13 to13 avoid13 confusionCovariates13 are13 applied13 at13 each13 dose13 event13 13 The13 Zirst13 dose13 event13 for13 each13 subject13 must13 have13 a13 value13 for13 every13 covariate13 in13 the13 data13 Zile13 13 By13 default13 missing13 covariate13 values13 for13 subsequent13 dose13 events13 are13 linearly13 interpolated13 between13 existing13 values13 or13 carried13 forward13 if13 the13 Zirst13 value13 is13 the13 only13 non-shy‐missing13 entry13 13 To13 suppress13 interpolation13 and13 carry13 forward13 the13 previous13 value13 in13 a13 piece-shy‐wise13 constant13 fashion13 include13 an13 exclamation13 point13 ()13 in13 any13 declaration13 lineNote13 that13 any13 covariate13 relationship13 to13 any13 parameter13 may13 be13 described13 as13 the13 user13 wishes13 by13 mathematical13 equations13 and13 Fortran13 code13 allowing13 for13 exploration13 of13 complex13 non-shy‐linear13 time-shy‐dependent13 andor13 conditional13 relationshipsExampleCovwtcypIC()

Userrsquos13 Guide13 13 1113 13

where13 IC13 will13 be13 piece-shy‐wise13 constant13 and13 the13 other13 two13 will13 be13 linearly13 interpolated13 for13 missing13 values

Secondary13 variables

Secondary13 variables13 are13 those13 that13 are13 deZined13 by13 equations13 that13 are13 combinations13 of13 primary13 covariates13 and13 other13 secondary13 variables13 If13 using13 other13 secondary13 variables13 deZine13 them13 Zirst13 within13 this13 block13 Equation13 syntax13 must13 be13 Fortran13 It13 is13 permissible13 to13 have13 conditional13 statements13 but13 because13 expressions13 in13 this13 block13 are13 translated13 into13 variable13 declarations13 in13 Fortran13 expressions13 other13 than13 of13 the13 form13 X13 =13 function(Y)13 must13 be13 preZixed13 by13 a13 +13 and13 contain13 only13 variables13 which13 have13 been13 previously13 deZined13 in13 the13 Primary13 Covariate13 or13 Secondary13 blocksExampleSecCL13 =13 Ke13 13 V13 13 wt075+IF(cyp13 GT13 1)13 CL13 =13 CL13 13 cyp

Bolus13 inputs

By13 default13 inputs13 with13 DUR13 (duration)13 of13 013 in13 the13 data13 csv13 Zile13 are13 delivered13 instantaneously13 to13 the13 model13 compartment13 equal13 to13 the13 input13 number13 ie13 input13 113 goes13 to13 compartment13 113 input13 213 goes13 to13 compartment13 213 etc13 This13 can13 be13 overridden13 with13 NBOLUS(input13 number)13 =13 compartment13 numberExampleBolNBCOMP(1)13 =13 2

Ini1al13 condi1ons

By13 default13 all13 model13 compartments13 have13 zero13 amounts13 at13 time13 013 This13 can13 be13 changed13 by13 specifying13 the13 compartment13 amount13 as13 X()13 =13 expression13 where13 13 is13 the13 compartment13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignoredExampleIniX(2)13 =13 ICV13 (ie13 IC13 is13 a13 covariate13 with13 the13 measured13 trough13 concentration13 prior13 to13 an13 observed13 dose)X(3)13 =13 IC313 (ie13 IC313 is13 a13 Zitted13 amount13 in13 this13 unobserved13 compartment)In13 the13 Zirst13 case13 the13 initial13 condition13 for13 compartment13 213 becomes13 the13 value13 of13 the13 IC13 covariate13 (deZined13 in13 Covariate13 block)13 multiplied13 by13 the13 current13 estimate13 of13 V13 during13 each13 iteration13 13 This13 is13 useful13 when13 a13 subject13 has13 been13 taking13 a13 drug13 as13 an13 outpatient13 and13 comes13 in13 to13 the13 lab13 for13 PK13 sampling13 with13 measurement13 of13 a13 concentration13 immediately13 prior13 to13 a13 witnessed13 dose13 which13 is13 in13 turn13 followed13 by13 more13 sampling13 13 In13 this13 case13 IC13 or13 any13 other13 covariate13 can13 be13 set13 to13 the13 initial13 measured13 concentration13 and13 if13 V13 is13 the13 volume13 of13 compartment13 213 the13 initial13 condition13 (amount)13 in13 compartment13 213 will13 now13 be13 set13 to13 the13 measured13 concentration13 of13 drug13 multiplied13 by13 the13 estimated13 volume13 for13 each13 iteration13 until13 convergenceIn13 the13 second13 case13 the13 initial13 condition13 for13 compartment13 313 becomes13 another13 variable13 IC313 deZined13 in13 the13 Primary13 block13 to13 Zit13 in13 the13 model13 given13 the13 observed13 data

F13 (bioavailability)

Specify13 the13 bioavailability13 term13 if13 present13 Use13 the13 form13 FA()13 =13 expression13 where13 13 is13 the13 input13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignored

Userrsquos13 Guide13 13 1213 13

ExampleFFA(1)13 =13 FA1

Lag13 1me

Specify13 the13 lag13 term13 if13 present13 which13 is13 the13 delay13 after13 an13 absorbed13 dose13 before13 observed13 concentrations13 Use13 the13 form13 TLAG()13 =13 expression13 where13 13 is13 the13 input13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignoredExampleLagTLAG(1)13 =13 Tlag1

Differen1al13 equa1ons

Specify13 a13 model13 in13 terms13 of13 ordinary13 differential13 equations13 in13 Fortran13 format13 XP()13 is13 the13 notation13 for13 dX()dt13 where13 13 is13 the13 compartment13 number13 X()13 is13 the13 amount13 in13 the13 compartment13 There13 can13 be13 a13 maximum13 of13 2013 such13 equationsExampleDifXP(1)13 =13 -shy‐KAX(1)XP(2)13 =13 RATEIV(1)13 +13 KAX(1)13 -shy‐13 (KE+KCP)X(2)13 +13 KPCX(3)XP(3)13 =13 KCPX(2)13 -shy‐13 KPCX(3)RATEIV(1)13 is13 the13 notation13 to13 indicate13 an13 infusion13 of13 input13 113 (typically13 drug13 1)13 13 The13 duration13 of13 the13 infusion13 and13 total13 dose13 is13 deZined13 in13 the13 data13 csv13 Zile13 Up13 to13 713 inputs13 are13 currently13 allowed13 13 These13 can13 be13 used13 in13 the13 model13 Zile13 as13 RATEIV(1)13 RATEIV(2)13 etc13 13 The13 compartments13 for13 13 receiving13 the13 inputs13 of13 oral13 (bolus)13 doses13 are13 deZined13 in13 the13 Bolus13 block

Outputs

Output13 equations13 in13 Fortran13 format13 Outputs13 are13 of13 the13 form13 Y()13 =13 expression13 where13 13 is13 the13 output13 equation13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignored13 There13 can13 be13 a13 maximum13 of13 613 outputs13 13 They13 are13 referred13 to13 as13 Y(1)13 Y(2)13 etcExampleOutY(1)13 =13 X(2)V

Error

This13 block13 contains13 all13 the13 information13 Pmetrics13 requires13 for13 the13 structure13 of13 the13 error13 model13 13 In13 Pmetrics13 each13 observation13 is13 weighted13 by13 1error213 13 13 There13 are13 two13 choices13 for13 the13 error13 term

113 13 error13 =13 SD13 13 gamma213 13 error13 =13 (SD213 +13 lamda2)0513 (Note13 that13 lambda13 is13 only13 available13 in13 NPAG13 currently)

where13 SD13 is13 the13 standard13 deviation13 (SD)13 of13 each13 observation13 [obs]13 and13 gamma13 and13 lambda13 are13 terms13 to13 capture13 extra13 process13 noise13 related13 to13 the13 observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 SD13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 The13 13 values13 for13 the13 coefZicients13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13

Userrsquos13 Guide13 13 1313 13

coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly() 13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0In13 the13 multiplicative13 model13 13 gamma13 is13 a13 scalar13 on13 SD13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 Lambda13 is13 an13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 We13 tend13 to13 prefer13 lambda

To13 specify13 the13 model13 in13 this13 block13 the13 Zirst13 line13 needs13 to13 be13 either13 L=[number]13 or13 G=[number]13 for13 a13 lambda13 or13 gamma13 error13 model13 13 The13 [number]13 term13 is13 the13 starting13 value13 for13 lambda13 or13 gamma13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present13 13 For13 gamma13 good13 starting13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality13 13 If13 you13 include13 an13 exclamation13 point13 ()13 in13 the13 declaration13 then13 lambda13 or13 gamma13 will13 be13 Zixed13 and13 not13 estimated13 13 Note13 that13 you13 can13 only13 Zix13 lambda13 currently13 to13 zeroThe13 next13 line(s)13 contain13 the13 values13 for13 C013 C113 C213 and13 C313 separated13 by13 commas13 13 There13 should13 be13 one13 line13 of13 coefZicients13 for13 each13 output13 equation13 13 By13 default13 Pmetrics13 will13 use13 values13 for13 these13 coefZicients13 found13 in13 the13 data13 Zile13 13 If13 none13 are13 present13 or13 if13 the13 model13 declaration13 line13 contains13 an13 exclamation13 point13 ()13 the13 values13 here13 will13 be13 used

Example13 113 estimated13 lambda13 starting13 at13 0413 one13 output13 use13 data13 Zile13 coefZicients13 but13 if13 missing13 use13 010100ErrL=04010100

Example13 213 Zixed13 gamma13 of13 213 two13 outputs13 use13 data13 Zile13 coefZicients13 but13 if13 missing13 use13 01010013 for13 the13 Zirst13 output13 but13 use13 0313 0113 013 013 for13 output13 213 regardless13 of13 what13 is13 in13 the13 data13 ZileErrG=2010100030100

Extra

This13 block13 is13 for13 advanced13 Fortran13 programmers13 only13 13 Occasionally13 for13 very13 complex13 models13 additional13 Fortran13 subroutines13 are13 required13 13 They13 can13 be13 placed13 here13 13 The13 code13 must13 specify13 complete13 Fortran13 subroutines13 which13 can13 be13 called13 from13 other13 blocks13 with13 appropriate13 call13 functions13 13

Reserved13 Names

The13 following13 cannot13 be13 used13 as13 primary13 covariate13 or13 secondary13 variable13 names13 They13 can13 be13 used13 in13 equations13 however

Reserved13 Variable Func1on13 in13 Pmetricsndim internal

t time

Userrsquos13 Guide13 13 1413 13

x array13 of13 compartment13 amounts

xp array13 of13 Zirst13 derivative13 of13 compartment13 amounts

rpar internal

ipar internal

p array13 of13 primary13 parameters

r input13 rates

b input13 boluses

npl internal

numeqt output13 equation13 number

ndrug input13 number

nadd covariate13 number

rateiv intravenous13 input13 for13 inputs13 when13 DURgt013 in13 data13 Ziles

cv covariate13 values13 array

n number13 of13 compartments

nd internal

ni internal

nup internal

nuic internal

np number13 of13 primary13 parameters

nbcomp bolus13 compartment13 array

psym names13 of13 primary13 parameters

fa biovailability

tlag lag13 time

tin internal

tout internal

Complete13 Example

Here13 is13 a13 complete13 example13 of13 a13 model13 Zile13 as13 of13 Pmetrics13 version13 04013 and13 higher

Userrsquos13 Guide13 13 1513 13

NotesBy13 omitting13 a13 Diffeq13 block13 with13 ODEs13 Pmetrics13 understands13 that13 you13 are13 specifying13 the13 model13 to13 be13 solved13 algebraically13 In13 this13 case13 at13 least13 KE13 and13 V13 must13 be13 in13 the13 Primary13 or13 Secondary13 variables13 KA13 KCP13 and13 KPC13 are13 optional13 and13 specify13 absorption13 and13 transfer13 to13 and13 from13 the13 central13 to13 a13 peripheral13 compartment13 respectively

PriKE13 013 5V013 0113 100KA13 013 5Tlag113 013 3Cov13 wt

SecV13 =13 V0wt

LagTLAG(1)13 =13 Tlag1

OutY(1)13 =13 X(2)V

ErrL=04010100

Userrsquos13 Guide13 13 1613 13

Brief13 Fortran13 Tutorial

Much13 more13 detailed13 help13 is13 available13 from13 httpwwwcsmtuedu~sheneCOURSEScs201NOTESfortranhtml

Arithmetic Operator Meaning

+ addition

- subtraction

multiplication

division

exponentiation

Relational Operator Alternative Operator Meaning

lt LT less than

lt= LE less than or equal

gt GT greater than

gt= GE greater than or equal

== EQ equal

= NE not equal

Selective Execution Example

IF (logical-expression) one-statement IF (T gt= 100) CL = 10

IF (logical-expression) THEN statementsEND IF

IF (T gt= 100) THEN CL = 10 V = 10END IF

IF (logical-expression) THEN statements-1ELSE statements-2END IF

IF (T gt= 100) THEN CL = 10ELSE CL = CLEND IF

Userrsquos13 Guide13 13 1713 13

How to use R and PmetricsSeCng13 up13 a13 Pmetrics13 project

When13 beginning13 a13 new13 modeling13 project13 it13 is13 convenient13 to13 use13 the13 command13 PMtree(ldquoproject namerdquo)13 13 This13 command13 will13 set13 up13 a13 new13 directory13 in13 the13 current13 working13 directory13 named13 whatever13 you13 have13 included13 as13 the13 ldquoproject13 namerdquo13 13 For13 example13 a13 directory13 called13 ldquoDrugXrdquo13 will13 be13 created13 by13 PMtree(ldquoDrugXrdquo)13 13 Beneath13 this13 directory13 several13 subdirectories13 will13 be13 also13 created13 Rscript13 Runs13 Sim13 and13 src13 13 The13 Rscript13 subdirectory13 will13 contain13 a13 skeleton13 R13 script13 to13 begin13 Pmetrics13 runs13 in13 the13 new13 project13 13 The13 Runs13 subdirectory13 should13 contain13 all13 Ziles13 required13 for13 a13 run13 (described13 next)13 and13 it13 will13 also13 contain13 the13 resulting13 numerically13 ordered13 run13 directories13 created13 after13 each13 Pmetrics13 NPAG13 or13 IT2B13 run13 13 The13 Sim13 subdirectory13 can13 contain13 any13 Ziles13 related13 to13 simulations13 and13 the13 src13 subdirectory13 should13 contain13 original13 and13 manipulated13 source13 data13 Ziles13 13 Of13 course13 you13 are13 free13 to13 edit13 this13 directory13 tree13 structure13 as13 you13 please13 or13 make13 your13 own13 entirely

GeCng13 the13 required13 files13 to13 run13 Pmetrics

When13 you13 wish13 to13 execute13 a13 Pmetrics13 run13 you13 must13 ensure13 that13 appropriate13 Pmetrics13 model13 txt13 and13 data13 csv13 Ziles13 are13 in13 the13 working13 directory13 ie13 the13 Runs13 subdirectory13 of13 the13 project13 directory13 13 13 13 R13 can13 be13 used13 to13 help13 prepare13 the13 data13 csv13 Zile13 by13 importing13 and13 manipulating13 spreadsheets13 (eg13 readcsv())13 13 The13 Pmetrics13 function13 PMcheck()13 can13 be13 used13 to13 check13 a13 csv13 Zile13 or13 an13 R13 dataframe13 that13 is13 to13 be13 saved13 as13 a13 Pmetrics13 data13 13 csv13 Zile13 for13 errors13 13 13 13 13 13 It13 can13 also13 check13 a13 model13 Zile13 for13 errors13 in13 the13 context13 of13 a13 dataZile13 eg13 covariates13 that13 do13 not13 match13 13 PMfixMatrix()13 attempts13 to13 automatically13 rid13 data13 Ziles13 of13 errors13 13 The13 function13 PMwriteMatrix() 13 can13 be13 used13 to13 write13 the13 R13 data13 object13 in13 the13 correct13 format13 for13 use13 by13 IT2B13 NPAG13 or13 the13 Simulator13 13 You13 can13 also13 download13 sample13 data13 and13 scripts13 from13 the13 Pmetrics13 downloads13 section13 of13 our13 website13 once13 you13 sign13 in13 with13 your13 LAPK13 user13 email13 address13 and13 password13 13 Edit13 prior13 versions13 of13 model13 Ziles13 to13 make13 new13 model13 Ziles

Using13 scripts13 to13 control13 Pmetrics

As13 you13 will13 see13 in13 the13 skeleton13 R13 script13 made13 by13 PMtree() and13 placed13 in13 the13 Rscript13 subdirectory13 if13 this13 is13 a13 Zirst-shy‐time13 run13 the13 R13 commands13 to13 run13 IT2B13 or13 NPAG13 are13 as13 follows13 13 Recall13 that13 the13 ldquordquo13 character13 is13 a13 comment13 character

library(Pmetrics)Run 1 - add your run description heresetwd(ldquoworking directoryrdquo)NPrun() for NPAG or ITrun() for IT2B

The13 Zirst13 line13 will13 load13 the13 Pmetrics13 library13 of13 functions13 13 The13 second13 line13 sets13 the13 working13 directory13 to13 the13 speciZied13 path13 13 The13 third13 line13 generates13 the13 batch13 Zile13 to13 run13 NPAG13 or13 IT2B13 and13 saves13 it13 to13 the13 working13 directory13

NOTE13 13 On13 Mac13 systems13 the13 batch13 Zile13 will13 be13 automatically13 launched13 in13 a13 Terminal13 window13 13 On13 Windows13 systems13 the13 batch13 Zile13 must13 be13 launched13 manually13 by13 double13 clicking13 the13 np_runbat13 or13 it_runbat13 Zile13 in13 the13 working13 directory

ITrun() 13 and13 NPrun()13 both13 return13 the13 full13 path13 of13 the13 output13 directory13 to13 the13 clipboard13 13 By13 default13 runs13 are13 placed13 in13 folders13 numbered13 sequentially13 beginning13 with13 ldquo1rdquoNow13 the13 output13 of13 IT2B13 or13 NPAG13 needs13 to13 be13 loaded13 into13 R13 so13 the13 next13 command13 does13 this

NPload(run_number) or ITload(run_number)

Details13 of13 these13 commands13 and13 what13 is13 loaded13 are13 described13 in13 the13 R13 documentation13 (NPload 13 or13 ITload)13 and13 in13 the13 following13 section13 13 The13 run_number13 should13 be13 included13 within13 the13 parentheses13 to13 be13 appended13 to13 the13 names13

Userrsquos13 Guide13 13 1813 13

of13 loaded13 R13 objects13 allowing13 for13 comparison13 between13 runs13 eg13 NPload(1)13 13 Finally13 at13 this13 point13 other13 Pmetrics13 commands13 can13 be13 added13 to13 the13 script13 to13 process13 the13 data13 such13 as13 the13 following

plot(final1)plot(cycle1)plot(op1type=rdquopoprdquo) or plot(op1$pop1)plot(op1) default is to plot posterior predictions for output 1plot(op1type=rdquopoprdquoresid=T)

Of13 course13 the13 full13 power13 of13 R13 can13 be13 used13 in13 scripts13 to13 analyze13 data13 but13 these13 simple13 statements13 serve13 as13 examplesIf13 you13 do13 not13 use13 the13 PMtree() structure13 we13 suggest13 that13 the13 R13 script13 for13 a13 particular13 project13 be13 saved13 into13 a13 folder13 called13 ldquoRscriptrdquo13 or13 some13 other13 meaningful13 name13 in13 the13 working13 directory13 13 Folders13 are13 not13 be13 moved13 by13 the13 batch13 Zile13 13 Within13 the13 script13 number13 runs13 sequentially13 and13 use13 comments13 liberally13 to13 13 distinguish13 runs13 as13 shown13 below

library(Pmetrics)

Run 1 - Ka Kel V all subjectssetwd(ldquoworking directoryrdquo)NPrun() assumes model=rdquomodeltxtrdquo and data=rdquodatacsvrdquoNPload(1)

Remember13 in13 R13 that13 the13 command13 example(function) will13 provide13 examples13 for13 the13 speciZied13 function13 13 Most13 Pmetrics13 functions13 have13 examples

Pmetrics Data ObjectsAfter13 a13 successful13 IT2B13 or13 NPAG13 run13 an13 R13 dataZile13 is13 saved13 in13 the13 output13 subdirectory13 of13 the13 newly13 created13 numerically13 ordered13 folder13 in13 the13 working13 directory13 13 After13 IT2B13 this13 Zile13 is13 called13 ldquoIT2BoutRdatardquo13 and13 after13 NPAG13 it13 is13 called13 ldquoNPAGoutRdatardquo13 13 As13 mentioned13 in13 the13 previous13 section13 these13 data13 Ziles13 can13 be13 loaded13 by13 ensuring13 that13 the13 Runs13 folder13 is13 set13 as13 the13 working13 directory13 and13 then13 using13 the13 Pmetrics13 commands13 ITload(run_num)13 or13 NPload(run_num)

Both13 commands13 load13 their13 respective13 Rdata13 Ziles13 into13 R13 making13 the13 contained13 objects13 available13 for13 plotting13 and13 other13 analysisObjects13 loaded13 by13 ITload(run_num) and NPload(run_num)

Objects Variables Comments

op13 (class13 PMop13 list) $pop113 $post113 Population13 and13 posterior13 predictions13 for13 each13 output13 equation13 ie13 113 213

13 $id Subject13 identiZication

13 $time Observation13 time13 in13 relative13 decimal13 hours

13 $obs Observation

13 $pred Prediction13 based13 on13 median13 of13 population13 or13 posterior13 parameter13 value13 distributions

Userrsquos13 Guide13 13 1913 13

Objects Variables Comments

13 $block Dosing13 block13 usually13 113 unless13 data13 Zile13 contains13 EVID=413 dose13 reset13 events13 in13 which13 case13 each13 such13 reset13 within13 a13 given13 ID13 will13 increment13 the13 dosing13 block13 by13 113 for13 that13 ID

13 $obsSD Calculated13 standard13 deviation13 (error)13 of13 the13 observation13 based13 on13 the13 assay13 error13 polynomial

13 $d Difference13 between13 pred13 and13 obs

13 $ds Squared13 difference13 between13 pred13 and13 obs

13 $wd $d13 weighted13 by13 the13 $obsSD

13 $wds $ds13 weighted13 by13 the13 $obsSD

Zinal13 (class13 PMZinal13 list) $popPoints (NPAG13 only)13 Dataframe13 of13 the13 Zinal13 cycle13 joint13 population13 density13 of13 grid13 points13 with13 column13 names13 equal13 to13 the13 name13 of13 each13 random13 parameter13 plus13 $prob13 for13 the13 associated13 probability13 of13 that13 point13

$popMean The13 Zinal13 cycle13 mean13 for13 each13 random13 parameter13 distribution

$popSD The13 Zinal13 cycle13 standard13 deviation13 for13 each13 random13 parameter13 distribution

$popCV The13 Zinal13 cycle13 coefZicient13 of13 variation13 for13 each13 random13 parameter13 distribution

$popVar The13 Zinal13 cycle13 variance13 for13 each13 random13 parameter13 distribution

$popCov The13 Zinal13 cycle13 covariance13 matrix13 for13 each13 random13 parameter13 distribution

$popCor The13 Zinal13 cycle13 correlation13 matrix13 for13 each13 random13 parameter13 distribution

$popMedian The13 Zinal13 cycle13 median13 for13 each13 random13 parameter13 distribution

$gridpts (NPAG13 only)13 The13 initial13 number13 of13 support13 points

$ab Matrix13 of13 boundaries13 for13 random13 parameter13 values13 13 For13 NPAG13 this13 is13 speciZied13 by13 the13 user13 prior13 to13 the13 run13 for13 IT2B13 it13 is13 calculated13 as13 a13 user13 speciZied13 multiple13 of13 the13 SD13 for13 the13 parameter13 value13 distribution

Userrsquos13 Guide13 13 2013 13

Objects Variables Comments

cycle13 (class13 PMcycle13 list) $names Vector13 of13 names13 of13 the13 random13 parameters

$ll Matrix13 of13 cycle13 number13 and13 -shy‐2Log-shy‐likelihood13 at13 each13 cycle

$gamlam A13 matrix13 of13 cycle13 number13 and13 gamma13 or13 lambda13 at13 each13 cycle13 (see13 item13 1613 under13 NPAG13 Runs13 below13 for13 a13 discussion13 of13 gamma13 and13 lambda)

$mean A13 matrix13 of13 cycle13 number13 and13 the13 mean13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 mean

$sd A13 matrix13 of13 cycle13 number13 and13 the13 standard13 deviation13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$median A13 matrix13 of13 cycle13 number13 and13 the13 median13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$aic A13 matrix13 of13 cycle13 number13 and13 Akaike13 Information13 Criterion13 at13 each13 cycle

$bic A13 matrix13 of13 cycle13 number13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle

cov13 (class13 PMcov13 dataframe)

$id Subject13 identiZication

$time Time13 for13 each13 covariate13 entry

covariates Covariate13 values13 for13 each13 subject13 at13 each13 time13 extracted13 from13 the13 raw13 data13 Zile

parameters Mean13 median13 or13 mode13 of13 Bayesian13 posterior13 distribution13 for13 each13 random13 parameter13 in13 the13 model13 13 Mode13 summaries13 are13 available13 for13 NPAG13 output13 only13 and13 the13 default13 is13 median13 13 Values13 are13 recycled13 for13 each13 row13 within13 a13 given13 subject13 with13 the13 number13 of13 rows13 driven13 by13 the13 number13 of13 covariate13 entries

Userrsquos13 Guide13 13 2113 13

Objects Variables Comments

pop13 (class13 PMpop13 dataframe)

post13 (class13 PMpost13 dataframe)

NPAG13 only

$id Subject13 identiZication

$pred113 Population13 prior13 (PMpop)13 or13 Bayesian13 posterior13 (PMpost)13 predictions13 for13 each13 output13 equation13 based13 on13 mean13 median13 and13 mode13 as13 speciZied13 by13 the13 user13 and13 with13 frequency13 also13 speciZied13 by13 the13 user13 in13 the13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

$block Same13 as13 for13 PMop13 objects13 above

NPdata13 (class13 NPAG13 list)13 ITdata13 (class13 IT2B13 list

Raw13 data13 used13 to13 make13 the13 above13 objects13 13 Please13 use13 NPparse13 or13 ITparse13 in13 R13 for13 discussion13 of13 the13 data13 contained13 in13 these13 objects

Since13 R13 is13 an13 object13 oriented13 language13 to13 access13 the13 observations13 in13 a13 PMop13 object13 for13 example13 use13 the13 following13 syntax13 op$post1$obsNote13 that13 you13 will13 place13 an13 integer13 within13 the13 parentheses13 of13 the13 loading13 functions13 eg13 NPload(1)13 which13 will13 sufZix13 all13 the13 above13 objects13 with13 that13 integer13 eg13 op113 Zinal113 NPdata113 13 This13 allows13 several13 models13 to13 be13 loaded13 into13 R13 simultaneously13 each13 with13 a13 unique13 sufZix13 and13 which13 can13 be13 compared13 with13 the13 PMcompare()13 command13 (see13 Model13 Diagnostics13 below)

Making New Pmetrics ObjectsOnce13 you13 have13 loaded13 the13 raw13 (NPdata13 or13 ITdata)13 or13 processed13 (op13 Uinal13 cycle13 pop13 post)13 data13 objects13 described13 above13 with13 NPload(run_num)13 or13 ITload(run_num)13 should13 you13 wish13 to13 remake13 the13 processed13 objects13 with13 parameters13 other13 than13 the13 defaults13 you13 can13 easily13 do13 so13 with13 the13 make 13 family13 of13 commands13 13 For13 example13 the13 default13 for13 PMop13 observed13 vs13 predicted13 objects13 is13 to13 use13 the13 prediction13 based13 on13 the13 median13 of13 the13 population13 or13 posterior13 distribution13 13 If13 you13 wish13 to13 use13 the13 mean13 of13 the13 distribution13 remake13 the13 PMop13 object13 using makeOP()13 13 If13 you13 wish13 to13 see13 all13 the13 cycle13 information13 in13 a13 PMcycle13 object13 not13 omitting13 the13 Zirst13 1013 of13 cycles13 by13 default13 remake13 it13 using13 makeCycle()13 13

For13 all13 of13 the13 following13 commands13 the13 data13 input13 is13 either13 NPdata13 or13 ITdata13 with13 additional13 function13 arguments13 speciZic13 to13 each13 command13 13 Accessing13 the13 help13 for13 each13 function13 in13 R13 will13 provide13 further13 details13 on13 the13 arguments13 defaults13 and13 output13 of13 each13 command

Userrsquos13 Guide13 13 2213 13

Command Description R13 help

makeAUC Make13 a13 dataframe13 of13 class13 PMauc13 containing13 subject13 ID13 and13 AUC13 from13 a13 variety13 of13 inputs13 including13 objects13 of13 PMop13 PMsim13 or13 a13 suitable13 dataframe

makeAUC

makeCov Generate13 a13 dataframe13 of13 class13 PMcov13 with13 subject-shy‐speciZic13 covariates13 extracted13 from13 the13 data13 csv13 Zile13 This13 object13 can13 be13 plotted13 and13 used13 to13 test13 for13 covariates13 which13 are13 signiZicantly13 associated13 with13 model13 parameters13 13

makeCov

makeCycle Create13 a13 PMcycle13 object13 described13 in13 the13 previous13 section makeCycle

makeFinal Create13 a13 PMZinal13 object13 described13 in13 the13 previous13 section makeFinal

makeOP Create13 a13 PMop13 object13 described13 in13 the13 previous13 section makeOP

makeNCA Create13 a13 dataframe13 (class13 PMnca)13 with13 the13 output13 of13 a13 non-shy‐compartmental13 analysis13 using13 PMpost13 and13 NPAG13 data13 objects13 as13 input13 13 The13 PMnca13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull auc13 Area13 under13 the13 time-shy‐observation13 curve13 using13 the13

trapezoidal13 approximation13 from13 time13 013 until13 the13 second13 dose13 or13 if13 only13 one13 dose13 until13 the13 last13 observation

bull aumc13 Area13 under13 the13 Zirst13 moment13 curvebull k13 Slope13 by13 least-shy‐squares13 linear13 regression13 of13 the13 Zinal13

613 log-shy‐transformed13 observations13 vs13 timebull auclast13 Area13 under13 the13 curve13 from13 the13 time13 of13 the13

last13 observation13 to13 inZinity13 calculated13 as13 [Final13 obs]kbull aumclast13 Area13 under13 the13 Zirst13 moment13 curve13 from13

the13 time13 of13 the13 last13 observation13 to13 inZinitybull aucinf13 Area13 under13 the13 curve13 from13 time13 013 to13 inZinity13

caluculated13 as13 auc13 +13 auclastbull aumcinf13 Area13 under13 the13 Zirst13 moment13 curve13 from13

time13 013 to13 inZinitybull mrt13 Mean13 residence13 time13 calculated13 as13 1kbull cmax13 Maximum13 predicted13 concentration13 after13 the13

Zirst13 dosebull tmax13 Time13 to13 cmaxbull cl13 Clearance13 calculated13 as13 doseaucinfbull vdss13 Volume13 of13 distribution13 at13 steady13 state13

calculated13 as13 clmrtbull thalf13 Half13 life13 of13 elimination13 calculated13 as13 ln(2)kbull dose13 First13 dose13 amount13 for13 each13 subject

makeNCA

Userrsquos13 Guide13 13 2313 13

Command Description R13 help

makeErrorPoly This13 function13 plots13 Zirst13 second13 and13 third13 order13 polynomial13 functions13 Zitted13 to13 pairs13 of13 observations13 and13 associated13 standard13 deviations13 for13 a13 given13 output13 assay13 In13 this13 way13 the13 standard13 deviation13 associated13 with13 any13 observation13 may13 be13 calculated13 and13 used13 to13 appropriately13 weight13 that13 observation13 in13 the13 model13 building13 process13 Observations13 are13 weighted13 by13 the13 reciprocal13 of13 the13 variance13 or13 squared13 standard13 deviation13 13 Output13 of13 the13 function13 is13 a13 plot13 of13 the13 measured13 observations13 and13 Zitted13 polynomial13 curves13 and13 a13 list13 with13 the13 Zirst13 second13 and13 third13 order13 coefZicients

makeErrorPoly

makePTA This13 function13 performs13 a13 Probability13 of13 Target13 Attainment13 analysis13 for13 a13 set13 of13 simulated13 doses13 and13 time-shy‐concentration13 proZiles13 13 Targets13 (eg13 Minimum13 Inhibitory13 Concentrations)13 the13 type13 of13 target13 attainment13 (ie13 time13 above13 target13 Cmaxtarget13 13 AUCtarget13 Cmintarget13 or13 Cxtarget13 where13 x13 is13 any13 time13 point)13 and13 the13 success13 threshold13 (eg13 time13 gt13 0713 or13 Cmaxtarget13 gt13 10)13 can13 all13 be13 speciZied13 13 Output13 is13 a13 list13 (class13 PMpta)13 with13 two13 objectsbull Results13 a13 413 dimensional13 array13 with13 dimension13 size13 of13

[number13 of13 doses13 number13 of13 targets13 number13 of13 simulated13 proZiles13 1]13 which13 gives13 the13 target13 attainment13 (eg13 Cmaxtarget)13 for13 each13 dose13 target13 and13 proZile

bull Outcome13 For13 each13 dose13 and13 target13 a13 summary13 of13 the13 target13 attainment13 for13 all13 the13 proZiles13 including13 mean13 standard13 deviation13 and13 proportion13 above13 the13 success13 threshold

PMpta13 objects13 can13 be13 summarized13 with13 summary(x)13 and13 plotted13 with13 plot(x)13

makePTA

Userrsquos13 Guide13 13 2413 13

Command Description R13 help

makePopmakePost(NPAG13 only)

These13 functions13 create13 dataframes13 of13 class13 PMpop13 and13 PMpost13 respectively13 13 The13 PMpop13 or13 PMpost13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull time13 Times13 for13 predicted13 concentrations13 13 These13

times13 are13 not13 necessarily13 at13 observed13 times13 but13 at13 a13 frequency13 speciZied13 in13 the13 NPAG13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

bull pred113 Predictions13 for13 output13 113 13 For13 PMpop13 objects13 predictions13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 population13 prior13 distribution13 13 For13 PMpost13 objects13 they13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject

bull pred213 pred313 etc13 If13 additional13 outputs13 exist13 they13 will13 each13 be13 columns13 in13 the13 dataframe13 just13 as13 for13 pred113 13

makePopmakePost

NPAG RunsIn13 the13 past13 users13 had13 to13 run13 NPAG13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 NPrun()13 13 However13 if13 NPrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable

1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 NPAG13 creates13 a13 temporary13 instruction13 Zile13 in13 case13 something13 happens13 so13 that13 instructions13 entered13 to13 date13 can13

be13 recovered13 13 Accept13 the13 default13 by13 choosing13 113 13 You13 can13 save13 with13 a13 meaningful13 Zilename13 later13 13 If13 it13 already13 exists13 you13 will13 be13 asked13 if13 you13 wish13 to13 overwrite13 the13 Zile13 which13 is13 usually13 the13 thing13 to13 do

Userrsquos13 Guide13 13 2513 13

8 If13 you13 have13 previously13 run13 IT2B13 you13 can13 automatically13 import13 the13 suggested13 parameter13 ranges13 13 Choose13 113 to13 do13 this13 and13 013 to13 run13 NPAG13 without13 a13 previous13 IT2B13 run81 If13 you13 choose13 option13 113 you13 must13 specify13 the13 name13 of13 a13 FROMxxxx13 Zile13 typically13 FROM000113 that13 you13 can13

Zind13 in13 an13 output13 directory13 after13 a13 successful13 IT2B13 run13 13 Note13 that13 the13 program13 will13 then13 assume13 that13 you13 are13 using13 the13 same13 wrk13 Ziles13 that13 IT2B13 made13 from13 your13 data13 csv13 Zile13 13 It13 is13 strongly13 recommended13 to13 override13 this13 and13 specify13 a13 data13 csv13 Zile13 13 At13 this13 point13 you13 will13 jump13 to13 1013 below13 and13 continue13 on13 however13 your13 answers13 will13 often13 be13 supplied13 by13 the13 instructions13 contained13 in13 the13 FROMxxxx13 Zile13 and13 you13 need13 merely13 conZirm13 them

9 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13 have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 NPrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis91 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13

for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

10 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 NPAG13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

11 Enter13 the13 name13 of13 your13 csv13 Zile13 now12 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile13 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset131 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects132 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry14 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset15 Enter13 the13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo 13 followed13 by13

return16 Select13 how13 you13 would13 like13 to13 model13 assay13 (observation)13 error13 for13 each13 output13 equation13 13 You13 have13 four13 choices13 13

In13 all13 four13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0161 Error13 model13 113 (SD)13 13 Choose13 this13 option13 if13 you13 have13 already13 run13 IT2B13 and13 multiplied13 your13 assay13 error13

polynomial13 by13 gamma13 (see13 next13 option13 for13 a13 description13 of13 gamma)162 Error13 model13 213 (SD13 13 gamma)13 13 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13

observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 If13 you13 choose13 this13 option13 you13 then13 can13 specify13 the13 starting13 value13 of13 gamma13 13 Good13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality

163 Error13 model13 313 (SD213 +13 lamda2)0513 13 Lamda13 is13 an13 alternative13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present

Userrsquos13 Guide13 13 2613 13

164 Error13 model13 413 SD13 =13 gamma13 13 This13 model13 is13 rarely13 used13 and13 is13 equivalent13 to13 specifying13 a13 model13 with13 C013 only13 ie13 a13 constant13 error13 regardless13 of13 concentration

17 Once13 you13 select13 the13 assay13 error13 model13 for13 each13 output13 equation13 you13 are13 then13 offered13 four13 more13 options13 on13 which13 assay13 error13 polynomial13 coefZicients13 to13 use13 13 Choices13 113 and13 213 are13 the13 most13 commonly13 used171 Choice13 113 The13 default13 13 Use13 coefZicients13 in13 the13 subject13 record13 (C013 C113 C213 C313 in13 the13 data13 csv13 Zile)13 and13 if13

missing13 use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 (item13 1813 below)172 Choice13 213 Use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 for13 all13 subjects13 regardless13 of13 what13 is13 in13 the13

data13 csv13 Zile173 Choice13 313 13 To13 multiply13 data13 csv13 values13 and13 default13 entered13 values13 by13 a13 Zixed13 gamma13 and13 use13 them13 13 174 Choice13 013 Specify13 coefZicients13 on13 a13 subject13 by13 subject13 basis13 either13 those13 in13 the13 data13 csv13 Zile13 already13 the13

default13 values13 entered13 into13 the13 program13 or13 other13 values18 For13 each13 output13 equation13 after13 you13 have13 selected13 the13 option13 in13 item13 1713 you13 will13 be13 prompted13 to13 supply13 the13

required13 information13 including13 the13 general13 default13 values13 for13 missing13 or13 overridden13 values13 in13 the13 data13 csv13 Zile19 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13

usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13

20 Enter13 the13 grid13 point13 index13 13 This13 number13 corresponds13 to13 the13 number13 of13 grid13 (support)13 points13 which13 will13 initially13 Zill13 the13 model13 parameter13 space13 13 The13 larger13 the13 number13 of13 random13 parameters13 to13 be13 estimated13 the13 more13 points13 are13 required13 13 The13 program13 will13 make13 a13 suggestion13 based13 on13 the13 number13 of13 random13 parameters13 in13 the13 model13 13 The13 more13 you13 choose13 the13 slower13 the13 run13 will13 be13 but13 results13 may13 improve13 13 It13 is13 reasonable13 to13 choose13 fewer13 points13 early13 in13 model13 exploration13 and13 increase13 in13 later13 phases13 or13 if13 poor13 model13 Zits13 or13 lack13 of13 convergence13 are13 noted13 The13 choices13 are13 113 to13 713 corresponding13 respectively13 to13 212913 500313 1000713 2001113 4000913 and13 8002113 points13 13 If13 you13 choose13 713 you13 then13 have13 an13 additional13 choice13 to13 select13 one13 or13 more13 multiples13 of13 8002113 points

21 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 013 or13 greater13 13 If13 you13 enter13 an13 integer13 greater13 than13 013 the13 engine13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13 If13 you13 enter13 013 this13 is13 the13 way13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 an13 independent13 data13 set13 and13 a13 non-shy‐uniform13 prior13 must13 be13 speciZied13 (see13 3013 below)13 13 This13 means13 that13 the13 engine13 will13 only13 calculate13 the13 individual13 Bayesian13 posteriors13 for13 the13 new13 subjects13 using13 the13 population13 joint13 density13 from13 a13 previous13 run13 as13 a13 Bayesian13 prior

22 Information13 about13 convergence13 criteria13 13 Answer13 113 or13 some13 other13 keystroke13 plus13 Return13 to13 acknowledge13 that13 you13 have13 read13 it

23 In13 order13 to13 predict13 concentrations13 from13 a13 non-shy‐parametric13 distribution13 you13 have13 the13 option13 to13 use13 the13 1)13 mean13 2)13 median13 or13 3)13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject13 13 We13 typically13 use13 the13 median13 Zirst13 and13 then13 the13 mean13 in13 a13 separate13 run13 and13 compare13 the13 differences13 13

24 Select13 the13 time13 interval13 to13 generate13 predicted13 concentrations13 13 Additionally13 there13 will13 also13 be13 predictions13 made13 at13 the13 time13 of13 each13 observation13 13 In13 general13 for13 most13 models13 predictions13 every13 1213 minutes13 provide13 sufZicient13 granularity13 13 Smaller13 values13 can13 result13 in13 very13 large13 Ziles13 for13 big13 populations

25 Select13 the13 default13 MIC13 to13 be13 used13 for13 AUCMIC13 ratio13 reporting13 13 This13 should13 generally13 be13 set13 to13 the13 default13 of13 113 by13 choosing13 113 13 You13 can13 always13 extract13 the13 AUC13 later13 and13 divide13 it13 by13 any13 MIC13 you13 choose

26 Enter13 the13 value13 in13 hours13 that13 you13 want13 for13 calculations13 of13 AUCs13 from13 predicted13 concentration13 proZiles13 13 The13 default13 is13 2413 hours13 which13 you13 can13 accept13 by13 entering13 113 or13 013 if13 you13 want13 to13 specify13 a13 different13 interval

27 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

28 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

Userrsquos13 Guide13 13 2713 13

29 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

30 For13 the13 prior13 density13 choose13 113 if13 it13 is13 to13 be13 uniform13 13 This13 means13 that13 the13 initial13 grid13 points13 will13 be13 evenly13 distributed13 with13 equal13 probability13 within13 the13 boundaries13 speciZied13 (in13 1513 above)13 13 If13 you13 choose13 013 you13 will13 be13 prompted13 for13 the13 name13 of13 a13 Zile13 that13 contains13 the13 prior13 density13 13 This13 will13 be13 DEN000113 unless13 you13 have13 changed13 its13 name13 13 It13 will13 be13 found13 in13 the13 output13 directory13 of13 a13 prior13 NPAG13 run13 13 The13 model13 used13 to13 generate13 the13 DEN000113 Zile13 must13 be13 exactly13 the13 same13 as13 the13 current13 model13 including13 parameter13 boundaries13 13 However13 this13 option13 is13 useful13 to13 specify13 a13 non-shy‐uniform13 density13 for13 two13 reasons13 13 The13 Zirst13 is13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 a13 new13 set13 of13 subjects13 13 Do13 this13 in13 combination13 with13 setting13 the13 number13 of13 cycles13 to13 013 (see13 2113 above)13 13 The13 second13 use13 for13 a13 non-shy‐uniform13 prior13 is13 to13 continue13 a13 previous13 run13 13 For13 example13 if13 you13 only13 set13 the13 number13 of13 cycles13 to13 5013 to13 get13 a13 rough13 idea13 of13 model13 Zit13 you13 may13 continue13 where13 you13 left13 off13 by13 specifying13 the13 DEN000113 Zile13 from13 the13 50-shy‐cycle13 run13 and13 continuing13 with13 as13 many13 additional13 cycles13 as13 you13 specify13 in13 item13 2113 13 So13 in13 the13 example13 if13 you13 specify13 10013 cycles13 in13 2113 the13 total13 number13 of13 cycles13 will13 be13 5013 +13 10013 =13 150

31 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 NPrun(instr=ldquoyourfilerdquo)13 option13 and13 including13 ldquoyourZilerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

32 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 NPAG13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 NPAG13 analysis

33 The13 NPAG13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

IT2B RunsIn13 the13 past13 users13 had13 to13 run13 IT2B13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 ITrun()13 13 However13 if13 ITrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13

have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 ITrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis

Userrsquos13 Guide13 13 2813 13

71 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13 for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

8 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 IT2B13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

9 Enter13 the13 name13 of13 your13 csv13 Zile13 now10 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile11 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset111 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects112 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry12 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset13 Enter13 the13 initial13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo13 followed13

by13 return14 The13 estimated13 mean13 for13 each13 parameter13 value13 distribution13 during13 the13 Zirst13 iteration13 will13 be13 the13 median13 of13 the13

range13 speciZied13 in13 1313 13 You13 now13 have13 the13 option13 to13 specify13 the13 standard13 deviation13 for13 the13 parameter13 value13 distribution13 which13 by13 default13 is13 half13 of13 the13 range13 in13 1313 13 Choose13 113 to13 accept13 this13 (the13 usual13 answer)13 or13 013 to13 change13 it13 to13 something13 else13 expressed13 as13 a13 multiple13 of13 the13 range

15 In13 IT2B13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 You13 can13 now13 choose13 113 if13 every13 subject13 has13 the13 same13 coefZicients13 or13 013 to13 use13 a13 unique13 set13 of13 coefZicients13 for13 each13 subject13 13 The13 Zirst13 case13 is13 the13 more13 usual13 when13 all13 13 samples13 from13 all13 subjects13 are13 analyzed13 in13 the13 same13 lab13 13 If13 13 samples13 are13 analyzed13 in13 different13 labs13 and13 you13 have13 the13 assay13 data13 from13 each13 lab13 then13 you13 would13 enter13 013 13 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 (see13 151313 below)13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0151 If13 you13 choose13 113 (one13 set13 of13 coefZicients13 for13 all13 subjects)13 you13 will13 then13 be13 presented13 with13 313 additional13

choices1511 Choice13 113 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13 observation13

including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 and13 to13 Zix13 gamma13 to13 1

1512 Choice13 213 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 but13 to13 estimate13 gamma13 based13 on13 the13 data13 13 This13 is13 the13 usual13 option

1513 Choice13 313 Choose13 this13 option13 if13 you13 wish13 to13 estimate13 the13 assay13 error13 coefZicients13 based13 on13 your13 data13 for13 use13 in13 future13 runs13 13 Although13 you13 can13 access13 this13 option13 by13 using13 either13 ITrun()13 or13 ERRrun()13 in13 R13 the13 instruction13 Ziles13 that13 you13 save13 and13 the13 generated13 output13 Ziles13 will13 be13 different13 13 Therefore13 we13 recommend13 that13 if13 you13 intend13 to13 choose13 this13 option13 use13 ERRrun()13 in13 R13 which13 will13 generate13 an13 ASS000113 Zile13 that13 contains13 the13 estimates13 for13 C013 C113 C213 and13 C313 13 You13 can13 then13 include13 this13 Zile13 in13 the13 working13 directory13 (along13 with13 a13 model13 txt13 Zile13 and13 a13 data13 csv13 Zile)13 to13 do13 an13 IT2B13 run13 supplying13 the13 Zile13 name13 in13 16113 below

Userrsquos13 Guide13 13 2913 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

please13 feel13 free13 to13 contact13 us13 at13 any13 time13 preferably13 through13 the13 Pmetrics13 forum13 at13 httpwwwlapkorg13 13 or13 directly13 by13 email13 at13 contactlapkorgThis13 manual13 is13 also13 not13 intended13 to13 be13 a13 theoretical13 treatise13 on13 the13 algorithms13 used13 in13 IT2B13 or13 NPAG13 13 For13 that13 the13 user13 is13 directed13 to13 our13 website13 at13 wwwlapkorg

Getting Help and UpdatesThere13 is13 an13 active13 LAPK13 forum13 available13 from13 our13 website13 at13 httpwwwlapkorg13 with13 all13 kinds13 of13 useful13 tips13 and13 help13 with13 Pmetrics13 13 Register13 (separately13 from13 your13 LAPK13 registration)13 and13 feel13 free13 to13 post13 13 Within13 R13 you13 can13 also13 use13 help(ldquocommandrdquo)13 or13 command13 in13 the13 R13 console13 to13 see13 detailed13 help13 Ziles13 for13 any13 Pmetrics13 command13 13 Many13 commands13 have13 examples13 included13 in13 this13 documentation13 and13 you13 can13 execute13 the13 examples13 with13 example(command)13 Note13 that13 here13 quotation13 marks13 are13 unnecessary13 around13 command13 You13 can13 also13 type13 PMmanual()13 to13 launch13 this13 manual13 from13 within13 Pmetrics13 as13 well13 as13 a13 catalogue13 of13 all13 Pmetrics13 functions13 13 Finally13 PMnews()13 will13 display13 the13 Pmetrics13 changelog

Pmetrics13 will13 check13 for13 updates13 automatically13 every13 time13 you13 load13 it13 with13 library(Pmetrics)13 13 If13 an13 update13 is13 available13 it13 will13 provide13 a13 brief13 message13 to13 inform13 you13 13 You13 can13 then13 use13 PMupdate() to13 update13 Pmetrics13 from13 within13 R13 without13 having13 to13 visit13 our13 website13 13 You13 will13 be13 prompted13 for13 your13 LAPK13 user13 email13 address13 and13 password13 13 When13 bugs13 arise13 in13 Pmetrics13 you13 may13 see13 a13 start13 up13 message13 to13 inform13 you13 of13 the13 bug13 and13 a13 patch13 can13 be13 installed13 by13 the13 command13 PMpatch()13 if13 available13 13 Note13 that13 patches13 must13 be13 reinstalled13 with13 this13 command13 every13 time13 you13 launch13 Pmetrics13 until13 the13 bug13 is13 corrected13 in13 the13 next13 versionAs13 of13 version13 113 Pmetrics13 has13 graphical13 user13 interface13 (GUI)13 capability13 for13 many13 functions13 13 Using13 PMcode(ldquofunctionrdquo)13 will13 launch13 the13 GUI13 in13 your13 default13 browser13 13 While13 you13 are13 interacting13 with13 the13 GUI13 R13 is13 ldquolisteningrdquo13 and13 no13 other13 activity13 is13 possible13 13 The13 GUI13 is13 designed13 to13 generate13 Pmetrics13 R13 code13 in13 response13 to13 your13 input13 in13 a13 friendly13 intuitive13 environment13 13 That13 code13 can13 be13 copied13 and13 pasted13 into13 your13 Pmetrics13 R13 script13 13 You13 can13 also13 see13 live13 plot13 previews13 with13 the13 GUI13 13 All13 this13 is13 made13 possible13 with13 the13 lsquoshinyrsquo13 package13 for13 RCurrently13 the13 following13 GUIs13 are13 available13 13 PMcode(ldquoNPrunrdquo) PMcode(ldquoITrunrdquo) PMcode(ldquoplotrdquo)13 13 More13 are13 coming

Pmetrics ComponentsThere13 are13 three13 main13 software13 programs13 that13 Pmetrics13 controlsbull IT2B13 is13 the13 ITerative13 2-shy‐stage13 Bayesian13 parametric13 population13 PK13 modeling13 program13 13 It13 is13 generally13 used13 to13

estimate13 parameter13 ranges13 to13 pass13 to13 NPAG13 13 It13 will13 estimate13 values13 for13 population13 model13 parameters13 under13 the13 assumption13 that13 the13 underlying13 distributions13 of13 those13 values13 are13 normal13 or13 transformed13 to13 normal

bull NPAG13 is13 the13 Non-shy‐parametric13 Adaptive13 Grid13 software13 13 It13 will13 create13 a13 non-shy‐parametric13 population13 model13 consisting13 of13 discrete13 support13 points13 each13 with13 a13 set13 of13 estimates13 for13 all13 parameters13 in13 the13 model13 plus13 an13 associated13 probability13 (weight)13 of13 that13 set13 of13 estimates13 13 There13 can13 be13 at13 most13 one13 point13 for13 each13 subject13 in13 the13 study13 population13 13 There13 is13 no13 need13 for13 any13 assumption13 about13 the13 underlying13 distribution13 of13 model13 parameter13 values

bull The13 simulator13 is13 a13 semi-shy‐parametric13 Monte13 Carlo13 simulation13 software13 program13 that13 can13 use13 the13 output13 of13 IT2B13 or13 NPAG13 to13 build13 randomly13 generated13 response13 proZiles13 (eg13 time-shy‐concentration13 curves)13 for13 a13 given13 population13 model13 parameter13 estimates13 and13 data13 input13 13 Simulation13 from13 a13 non-shy‐parametric13 joint13 density13 model13 ie13 NPAG13 output13 is13 possible13 with13 each13 point13 serving13 as13 the13 mean13 of13 a13 multivariate13 normal13 distribution13 weighted13 according13 to13 the13 weight13 of13 the13 point13 13 The13 covariance13 matrix13 of13 the13 entire13 set13 of13 support13 points13 is13 divided13 equally13 among13 the13 points13 for13 the13 purposes13 of13 simulation

Pmetrics13 has13 groups13 of13 R13 functions13 named13 logically13 to13 run13 each13 of13 these13 programs13 and13 to13 extract13 the13 output13 13 Again13 these13 are13 extensively13 documented13 within13 R13 by13 using13 the13 help(command)13 or13 command13 syntax13 bull ITrun13 ITparse13 ITload13 ITreport13 ERRrunbull NPrun13 NPparse13 NPload13 NPreportbull SIMrun13 SIMparse

Userrsquos13 Guide13 13 513 13

For13 IT2B13 and13 NPAG13 the13 ldquorunrdquo13 functions13 generate13 batch13 Ziles13 which13 when13 executed13 launch13 the13 software13 programs13 to13 do13 the13 analysis13 ERRrun13 is13 a13 special13 implementation13 of13 IT2B13 designed13 to13 estimate13 the13 assay13 error13 polynomial13 coefZicients13 from13 the13 data13 when13 they13 cannot13 be13 calculated13 from13 assay13 validation13 data13 (using13 makeErrorPoly())13 supplied13 by13 the13 analytical13 laboratory13 The13 batch13 Ziles13 contain13 all13 the13 information13 necessary13 to13 complete13 a13 run13 tidy13 the13 output13 into13 a13 datetime13 stamped13 directory13 with13 meaningful13 subdirectories13 extract13 the13 information13 generate13 a13 report13 and13 a13 saved13 Rdata13 Zile13 of13 parsed13 output13 which13 can13 be13 quickly13 and13 easily13 loaded13 into13 R13 13 On13 Mac13 (Unix)13 systems13 the13 batch13 Zile13 will13 automatically13 launch13 in13 a13 Terminal13 window13 13 On13 Windows13 systems13 the13 batch13 Zile13 must13 be13 launched13 manually13 13 In13 both13 cases13 the13 execution13 of13 the13 program13 to13 do13 the13 actual13 model13 parameter13 estimation13 is13 independent13 of13 R13 so13 that13 the13 user13 is13 free13 to13 use13 R13 for13 other13 purposesFor13 the13 Simulator13 the13 ldquorunrdquo13 function13 will13 execute13 the13 program13 directly13 within13 RFor13 all13 programs13 the13 ldquoparserdquo13 functions13 will13 extract13 the13 primary13 output13 from13 the13 program13 into13 meaningful13 R13 data13 objects13 13 For13 IT2B13 and13 NPAG13 this13 is13 done13 automatically13 at13 the13 end13 of13 a13 successful13 run13 and13 the13 objects13 are13 saved13 in13 the13 output13 subdirectory13 as13 IT2BoutRdata13 or13 NPAGoutRdata13 respectivelyFor13 IT2B13 and13 NPAG13 the13 ldquoloadrdquo13 functions13 can13 be13 used13 to13 load13 the13 above13 Rdata13 Ziles13 after13 a13 successful13 run13 13 The13 ldquoreportrdquo13 functions13 are13 automatically13 run13 at13 the13 end13 of13 a13 successful13 run13 and13 these13 will13 generate13 an13 HTML13 page13 with13 summaries13 of13 the13 run13 as13 well13 as13 the13 Rdata13 Ziles13 and13 other13 objects13 13 The13 default13 browser13 will13 be13 automatically13 launched13 for13 viewing13 of13 the13 HTML13 report13 pageWithin13 Pmetrics13 there13 are13 also13 functions13 to13 manipulate13 data13 csv13 Ziles13 and13 process13 and13 plot13 extracted13 databull Manipulate13 data13 csv13 Ziles13 PMreadMatrix13 PMcheck13 PMZixMatrix13 PMwriteMatrix13 PMmatrixRelTime13

PMwrk2csvbull Process13 data13 makeAUC13 makeCov13 makeCycle13 makeFinal13 makeOP13 makeNCA13 makeErrorPolybull Plot13 data13 plotPMcov13 plotPMcycle13 plotPMZinal13 plotPMmatrix13 plotPMop13 plotPMsim13 plotPMdiag13

plotPMptabull Model13 selection13 and13 diagnostics13 PMcompare13 plotPMop13 (with13 residual13 option)13 PMdiag13 PMstepbull Pmetrics13 function13 defaults13 PMwriteDefaultsAgain13 all13 functions13 have13 extensive13 help13 Ziles13 and13 examples13 which13 can13 be13 examined13 in13 R13 by13 using13 the13 help(command)13 or13 command13 syntax13 13

Customizing Pmetrics FunctionsWhen13 Pmetrics13 is13 loaded13 with13 a13 library(Pmetrics)13 command13 it13 will13 also13 load13 the13 Defaults13 package13 13 If13 not13 present13 it13 will13 automatically13 download13 it13 from13 CRAN13 13 This13 package13 allows13 you13 to13 change13 the13 default13 for13 any13 Pmetrics13 function13 argument13 13 See13 Defaults13 for13 more13 help13 but13 some13 key13 functions13 are13 summarized13 here

setDefaults(name) Where13 name13 is13 something13 like13 PMreadMatrix13 and13 is13 a13 list13 of13 arguments13 whose13 default13 you13 wish13 to13 change13 13 So13 if13 you13 want13 PMreadMatrix13 to13 read13 semicolon13 delimited13 Ziles13 by13 default13 instead13 of13 comma13 separated13 Ziles13 use13 setDefaults(PMreadMatrix delim=rdquordquo)

getDefaults()13 or13 getDefaults(name) 13 The13 Zirst13 command13 will13 list13 all13 functions13 that13 have13 alternative13 defaults13 and13 the13 second13 will13 list13 the13 alternatives13 for13 a13 given13 function13 13 unsetDefaults(name)13 13 Restores13 the13 defaults13 to13 normal13 for13 a13 given13 function

The13 above13 functions13 will13 manipulate13 defaults13 for13 a13 single13 session13 in13 R13 13 They13 are13 all13 included13 in13 the13 Defaults13 package13 13 If13 you13 want13 to13 make13 the13 defaults13 durable13 from13 session13 to13 session13 use13 the13 following13 function13 in13 PmetricsPMwriteDefaults()13 13 This13 will13 save13 your13 defaults13 and13 they13 will13 be13 restored13 every13 time13 you13 load13 Pmetrics

Userrsquos13 Guide13 13 613 13

Userrsquos13 Guide13 13 713 13

You13 supply13 these13 files13 Pmetrics13 does13 the13 rest

General WorkflowThe13 general13 Pmetrics13 workZlow13 for13 IT2B13 and13 NPAG13 is13 shown13 in13 the13 following13 diagram

Data13 csv13 file Model13 txt13 file

PreparaCon13 program

Engine13 program

InstrucCon13 file

Output

ITrun()

13 NPrun

()

ITload()13 NPload()

R13 is13 used13 to13 specify13 the13 working13 directory13 containing13 the13 data13 csv13 and13 model13 txt13 Ziles13 Through13 the13 batch13 Zile13 generated13 by13 R13 the13 preparation13 program13 is13 compiled13 and13 executed13 13 The13 instruction13 Zile13 is13 generated13 automatically13 by13 the13 contents13 of13 the13 data13 and13 model13 Ziles13 and13 by13 arguments13 to13 the13 NPrun()13 ITrun()13 or13 ERRrun()13 commands13 The13 batch13 Zile13 will13 then13 compile13 and13 execute13 the13 engine13 Zile13 according13 to13 the13 instructions13 which13 will13 generate13 several13 output13 Ziles13 upon13 completion13 13 Finally13 the13 batch13 Zile13 will13 call13 the13 R13 script13 to13 generate13 the13 summary13 report13 and13 several13 data13 objects13 including13 the13 IT2BoutRdata13 or13 NPAGoutRdata13 Ziles13 which13 can13 be13 loaded13 into13 R13 subsequently13 using13 ITload()13 or13 NPload()Both13 input13 Ziles13 (data13 model)13 are13 text13 Ziles13 which13 can13 be13 edited13 directly

Userrsquos13 Guide13 13 813 13

Pmetrics Input FilesData13 csv13 Files

Pmetrics13 accepts13 input13 as13 a13 spreadsheet13 ldquomatrixrdquo13 format13 It13 is13 designed13 for13 input13 of13 multiple13 records13 in13 a13 concise13 way13 13 Please13 keep13 the13 number13 of13 characters13 in13 the13 Uile13 name13 le13 8Files13 are13 in13 comma-shy‐separated-shy‐values13 (csv)13 format13 13 Examples13 of13 programs13 that13 can13 save13 csv13 Ziles13 are13 any13 text13 editor13 (eg13 TextEdit13 on13 Mac13 Notepad13 on13 Windows)13 or13 spreadsheet13 program13 (eg13 Excel)13 13 Click13 on13 hyperlinked13 items13 to13 see13 an13 explanation13 13

IMPORTANT13 The13 order13 capitalization13 and13 names13 of13 the13 header13 and13 the13 Zirst13 1213 columns13 are13 Zixed13 13 All13 entries13 must13 be13 numeric13 with13 the13 exception13 of13 ID13 and13 ldquordquo13 for13 non-shy‐required13 placeholder13 entries

POPDATA13 DEC13 11ID EVID TIME DUR DOSE ADDL II INPUT OUT OUTEQ C0 C1 C2 C3 COVhellipGH 1 0 0 400 1 GH 0 05 042 1 001 01 0 0GH 0 1 046 1 001 01 0 0GH 0 2 247 1 001 01 0 0GH 4 0 0 150 1 GH 1 35 05 150 1 001 01 0 0GH 0 512 055 1 001 01 0 0GH 0 24 052 1 001 01 0 01423 1 0 1 400 -shy‐1 12 1 1423 1 01 0 100 2 1423 0 1 -shy‐99 1 001 01 0 01423 0 2 038 1 001 01 0 01423 0 2 16 2 005 02 -shy‐011 0002POPDATA13 DEC_1113 13 This13 is13 the13 header13 for13 the13 Zile13 and13 must13 be13 in13 the13 Zirst13 line13 13 It13 identiZies13 the13 versionID13 13 This13 Zield13 must13 be13 preceded13 by13 the13 ldquordquo13 symbol13 to13 conZirm13 that13 this13 is13 the13 header13 row13 It13 can13 be13

numeric13 or13 character13 and13 identiZies13 each13 individual13 13 All13 rows13 must13 contain13 an13 ID13 and13 all13 records13 from13 one13 individual13 must13 be13 contiguous13 13 Any13 subsequent13 row13 that13 begins13 with13 ldquordquo13 will13 be13 ignored13 which13 is13 helpful13 if13 you13 want13 to13 exclude13 data13 from13 the13 analysis13 but13 preserve13 the13 integrity13 of13 the13 original13 dataset13 or13 to13 add13 comment13 lines13 13 IDs13 should13 be13 1113 characters13 or13 less13 but13 may13 be13 any13 alphanumeric13 combination13 13 There13 can13 be13 at13 most13 80013 subjects13 per13 run

EVID13 This13 is13 the13 event13 ID13 Zield13 13 It13 can13 be13 013 113 or13 413 13 Every13 row13 must13 have13 an13 entry13 013 =13 observation13 113 =13 input13 (eg13 dose)13 213 313 are13 currently13 unused13 413 =13 reset13 where13 all13 compartment13 values13 are13 set13 to13 013 and13 the13 time13 counter13 is13 reset13 to13 013 13 This13 is13

useful13 when13 an13 individual13 has13 multiple13 sampling13 episodes13 that13 are13 widely13 spaced13 in13 time13 with13 no13 new13 information13 gathered13 13 This13 is13 a13 dose13 event13 so13 dose13 information13 needs13 to13 be13 complete

TIME13 This13 is13 the13 elapsed13 time13 in13 decimal13 hours13 since13 the13 Zirst13 event13 13 It13 is13 not13 currently13 clock13 time13 (eg13 2130)13 although13 this13 is13 planned13 13 Every13 row13 must13 have13 an13 entry13 and13 within13 a13 given13 ID13 rows13 must13 be13 sorted13 chronologically13 earliest13 to13 latest13 13

DUR13 This13 is13 the13 duration13 of13 an13 infusion13 in13 hours13 13 If13 EVID=113 there13 must13 be13 an13 entry13 otherwise13 it13 is13 ignored13 13 For13 a13 bolus13 (ie13 an13 oral13 dose)13 set13 the13 value13 equal13 to13 0

Userrsquos13 Guide13 13 913 13

DOSE13 This13 is13 the13 dose13 amount13 13 If13 EVID=113 there13 must13 be13 an13 entry13 otherwise13 it13 is13 ignoredADDL13 This13 speciZies13 the13 number13 of13 additional13 doses13 to13 give13 at13 interval13 II13 13 It13 may13 be13 missing13 for13 dose13

events13 (EVID=113 or13 4)13 in13 which13 case13 it13 is13 assumed13 to13 be13 013 13 It13 is13 ignored13 for13 observation13 (EVID=0)13 events13 13 Be13 sure13 to13 adjust13 the13 time13 entry13 for13 the13 subsequent13 row13 if13 necessary13 to13 account13 for13 the13 extra13 doses13 13 If13 set13 to13 -shy‐113 the13 dose13 is13 assumed13 to13 be13 given13 under13 steady-shy‐state13 conditions13 13 ADDL=-shy‐113 can13 only13 be13 used13 for13 the13 Zirst13 dose13 event13 for13 a13 given13 subject13 or13 an13 EVID=413 event13 as13 you13 cannot13 suddenly13 be13 at13 steady13 state13 in13 the13 middle13 of13 dosing13 record13 unless13 all13 compartmentstimes13 are13 reset13 to13 013 (as13 for13 an13 EVID=413 event)

II13 This13 is13 the13 interdose13 interval13 and13 is13 only13 relevant13 if13 ADDL13 is13 not13 equal13 to13 013 in13 which13 case13 it13 cannot13 be13 missing13 13 If13 ADDL=013 or13 is13 missing13 II13 is13 ignored

INPUT13 This13 deZines13 which13 input13 (ie13 drug)13 the13 DOSE13 corresponds13 to13 13 Inputs13 are13 deZined13 in13 the13 model13 Zile

OUT 13 This13 is13 the13 observation13 or13 output13 value13 13 If13 EVID=013 there13 must13 be13 an13 entry13 if13 missing13 this13 must13 be13 coded13 as13 -shy‐9913 13 It13 will13 be13 ignored13 for13 any13 other13 EVID13 and13 therefore13 can13 be13 ldquordquo13 13 There13 can13 be13 at13 most13 15013 observations13 for13 a13 given13 subject

OUTEQ13 This13 is13 the13 output13 equation13 number13 that13 corresponds13 to13 the13 OUT13 value13 13 Output13 equations13 are13 deZined13 in13 the13 model13 Zile

C013 C113 C213 C313 These13 are13 the13 coefZicients13 for13 the13 assay13 error13 polynomial13 for13 that13 observation13 13 Each13 subject13 may13 have13 up13 to13 one13 set13 of13 coefZicients13 per13 output13 equation13 13 If13 more13 than13 one13 set13 is13 detected13 for13 a13 given13 subject13 and13 output13 equation13 the13 last13 set13 will13 be13 used13 13 If13 there13 are13 no13 available13 coefZicients13 these13 cells13 may13 be13 left13 blank13 or13 Zilled13 with13 ldquordquo13 as13 a13 placeholder

COV13 Any13 column13 after13 the13 assay13 error13 coefZicients13 is13 assumed13 to13 be13 a13 covariate13 one13 column13 per13 covariate

Model13 Files

Model13 Ziles13 for13 Pmetrics13 are13 ultimately13 Fortran13 text13 Ziles13 with13 a13 header13 version13 of13 TSMULT13 13 As13 of13 Pmetrics13 version13 03013 we13 have13 adopted13 a13 very13 simple13 user13 format13 that13 Pmetrics13 will13 use13 to13 generate13 the13 Fortran13 code13 automatically13 for13 you13 13 Version13 0413 additionally13 eliminates13 the13 previously13 separate13 instruction13 Zile13 A13 model13 library13 is13 available13 on13 our13 website13 at13 httpwwwlapkorgpmetricsphp13 13 Naming13 your13 model13 files13 The13 default13 model13 Zile13 name13 is13 ldquomodeltxtrdquo13 but13 you13 can13 call13 them13 whatever13 you13 wish13 13 However13 please13 keep13 the13 number13 of13 characters13 in13 the13 model13 Uile13 name13 le13 813 When13 you13 use13 a13 model13 Zile13 in13 NPrun() ITrun ERRrun() or SIMrun()13 Pmetrics13 will13 make13 a13 Fortran13 model13 Zile13 of13 the13 same13 name13 temporarily13 renaming13 your13 Zile13 13 At13 the13 end13 of13 the13 run13 your13 original13 model13 Zile13 will13 be13 in13 the13 inputs13 subfolder13 of13 the13 run13 folder13 and13 the13 generated13 Fortran13 model13 Zile13 will13 be13 called13 ldquomodelforrdquo13 and13 moved13 to13 the13 etc13 subfolder13 of13 the13 run13 folder13 13 If13 your13 model13 is13 called13 ldquomymodeltxtrdquo13 then13 the13 Fortran13 Zile13 will13 be13 ldquomymodelforrdquoYou13 can13 still13 use13 appropriate13 Fortran13 model13 Ziles13 directly13 but13 we13 suggest13 you13 keep13 the13 for13 extension13 for13 all13 Fortran13 Ziles13 to13 avoid13 confusion13 with13 the13 new13 format13 13 If13 you13 use13 a13 for13 Zile13 as13 your13 model13 you13 will13 have13 to13 specify13 its13 name13 explicitly13 in13 the13 NPrun() ITrun ERRrun() or SIMrun()13 command13 since13 the13 default13 model13 name13 again13 is13 ldquomodeltxtrdquo13 13 If13 you13 use13 a13 for13 Zile13 directly13 it13 will13 be13 in13 the13 inputs13 subfolder13 of13 the13 run13 folder13 not13 in13 etc13 since13 you13 did13 not13 use13 the13 simpler13 template13 as13 your13 model13 Zile

Structure13 of13 model13 files13 The13 new13 model13 Zile13 is13 a13 text13 Zile13 with13 1113 blocks13 each13 marked13 by13 13 followed13 by13 a13 header13 tagPRImary13 variablesCOVariatesSECcondary13 variablesBOLus13 inputsINItial13 conditions

Userrsquos13 Guide13 13 1013 13

F13 (bioavailability)LAG13 timeDIFferential13 equationsOUTputsERRorEXTraFor13 each13 header13 only13 the13 capital13 letters13 are13 required13 for13 recognition13 by13 Pmetrics13 The13 blocks13 can13 be13 in13 any13 order13 and13 header13 names13 are13 case-shy‐insensitive13 (ie13 the13 capitalization13 here13 is13 just13 to13 show13 which13 letters13 are13 required)13 Fortran13 is13 also13 case-shy‐insensitive13 so13 in13 variable13 names13 and13 expressions13 case13 is13 ignored13 13 Details13 of13 each13 block13 are13 next13 followed13 by13 a13 complete13 example

Primary13 variables

Primary13 variables13 are13 the13 model13 parameters13 that13 are13 to13 be13 estimated13 by13 Pmetrics13 or13 are13 designated13 as13 Zixed13 parameters13 with13 user13 speciZied13 values13 It13 should13 be13 a13 list13 of13 variable13 names13 one13 name13 to13 a13 line13 Variable13 names13 should13 be13 1113 characters13 or13 fewer13 Some13 variable13 names13 are13 reserved13 for13 use13 by13 Pmetrics13 and13 cannot13 be13 used13 as13 primary13 variable13 names13 13 13 The13 number13 of13 primary13 variables13 must13 be13 between13 213 and13 3213 with13 at13 most13 3013 random13 or13 2013 Uixed13 13 On13 each13 row13 following13 the13 variable13 name13 include13 the13 range13 for13 the13 parameter13 that13 deZines13 the13 search13 space13 13 For13 NPAG13 this13 is13 absolute13 ie13 the13 algorithm13 will13 not13 search13 outside13 this13 range13 13 For13 IT2B13 the13 range13 is13 a13 starting13 range13 13 The13 simulator13 will13 ignore13 the13 ranges13 ExamplePriKE13 013 5V13 00113 100KA13 013 5KCP13 013 5KPC13 013 13 5Tlag113 013 2IC313 013 10000FA113 013 1

Covariates

Covariates13 are13 subject13 speciZic13 data13 such13 as13 body13 weight13 contained13 in13 the13 data13 csv13 Zile13 The13 covariate13 names13 which13 are13 the13 column13 names13 in13 the13 data13 Zile13 can13 be13 included13 here13 for13 use13 in13 secondary13 variable13 equations13 The13 order13 should13 be13 the13 same13 as13 in13 the13 data13 Zile13 and13 although13 the13 names13 do13 not13 have13 to13 be13 the13 same13 we13 strongly13 encourage13 you13 to13 make13 them13 the13 same13 to13 avoid13 confusionCovariates13 are13 applied13 at13 each13 dose13 event13 13 The13 Zirst13 dose13 event13 for13 each13 subject13 must13 have13 a13 value13 for13 every13 covariate13 in13 the13 data13 Zile13 13 By13 default13 missing13 covariate13 values13 for13 subsequent13 dose13 events13 are13 linearly13 interpolated13 between13 existing13 values13 or13 carried13 forward13 if13 the13 Zirst13 value13 is13 the13 only13 non-shy‐missing13 entry13 13 To13 suppress13 interpolation13 and13 carry13 forward13 the13 previous13 value13 in13 a13 piece-shy‐wise13 constant13 fashion13 include13 an13 exclamation13 point13 ()13 in13 any13 declaration13 lineNote13 that13 any13 covariate13 relationship13 to13 any13 parameter13 may13 be13 described13 as13 the13 user13 wishes13 by13 mathematical13 equations13 and13 Fortran13 code13 allowing13 for13 exploration13 of13 complex13 non-shy‐linear13 time-shy‐dependent13 andor13 conditional13 relationshipsExampleCovwtcypIC()

Userrsquos13 Guide13 13 1113 13

where13 IC13 will13 be13 piece-shy‐wise13 constant13 and13 the13 other13 two13 will13 be13 linearly13 interpolated13 for13 missing13 values

Secondary13 variables

Secondary13 variables13 are13 those13 that13 are13 deZined13 by13 equations13 that13 are13 combinations13 of13 primary13 covariates13 and13 other13 secondary13 variables13 If13 using13 other13 secondary13 variables13 deZine13 them13 Zirst13 within13 this13 block13 Equation13 syntax13 must13 be13 Fortran13 It13 is13 permissible13 to13 have13 conditional13 statements13 but13 because13 expressions13 in13 this13 block13 are13 translated13 into13 variable13 declarations13 in13 Fortran13 expressions13 other13 than13 of13 the13 form13 X13 =13 function(Y)13 must13 be13 preZixed13 by13 a13 +13 and13 contain13 only13 variables13 which13 have13 been13 previously13 deZined13 in13 the13 Primary13 Covariate13 or13 Secondary13 blocksExampleSecCL13 =13 Ke13 13 V13 13 wt075+IF(cyp13 GT13 1)13 CL13 =13 CL13 13 cyp

Bolus13 inputs

By13 default13 inputs13 with13 DUR13 (duration)13 of13 013 in13 the13 data13 csv13 Zile13 are13 delivered13 instantaneously13 to13 the13 model13 compartment13 equal13 to13 the13 input13 number13 ie13 input13 113 goes13 to13 compartment13 113 input13 213 goes13 to13 compartment13 213 etc13 This13 can13 be13 overridden13 with13 NBOLUS(input13 number)13 =13 compartment13 numberExampleBolNBCOMP(1)13 =13 2

Ini1al13 condi1ons

By13 default13 all13 model13 compartments13 have13 zero13 amounts13 at13 time13 013 This13 can13 be13 changed13 by13 specifying13 the13 compartment13 amount13 as13 X()13 =13 expression13 where13 13 is13 the13 compartment13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignoredExampleIniX(2)13 =13 ICV13 (ie13 IC13 is13 a13 covariate13 with13 the13 measured13 trough13 concentration13 prior13 to13 an13 observed13 dose)X(3)13 =13 IC313 (ie13 IC313 is13 a13 Zitted13 amount13 in13 this13 unobserved13 compartment)In13 the13 Zirst13 case13 the13 initial13 condition13 for13 compartment13 213 becomes13 the13 value13 of13 the13 IC13 covariate13 (deZined13 in13 Covariate13 block)13 multiplied13 by13 the13 current13 estimate13 of13 V13 during13 each13 iteration13 13 This13 is13 useful13 when13 a13 subject13 has13 been13 taking13 a13 drug13 as13 an13 outpatient13 and13 comes13 in13 to13 the13 lab13 for13 PK13 sampling13 with13 measurement13 of13 a13 concentration13 immediately13 prior13 to13 a13 witnessed13 dose13 which13 is13 in13 turn13 followed13 by13 more13 sampling13 13 In13 this13 case13 IC13 or13 any13 other13 covariate13 can13 be13 set13 to13 the13 initial13 measured13 concentration13 and13 if13 V13 is13 the13 volume13 of13 compartment13 213 the13 initial13 condition13 (amount)13 in13 compartment13 213 will13 now13 be13 set13 to13 the13 measured13 concentration13 of13 drug13 multiplied13 by13 the13 estimated13 volume13 for13 each13 iteration13 until13 convergenceIn13 the13 second13 case13 the13 initial13 condition13 for13 compartment13 313 becomes13 another13 variable13 IC313 deZined13 in13 the13 Primary13 block13 to13 Zit13 in13 the13 model13 given13 the13 observed13 data

F13 (bioavailability)

Specify13 the13 bioavailability13 term13 if13 present13 Use13 the13 form13 FA()13 =13 expression13 where13 13 is13 the13 input13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignored

Userrsquos13 Guide13 13 1213 13

ExampleFFA(1)13 =13 FA1

Lag13 1me

Specify13 the13 lag13 term13 if13 present13 which13 is13 the13 delay13 after13 an13 absorbed13 dose13 before13 observed13 concentrations13 Use13 the13 form13 TLAG()13 =13 expression13 where13 13 is13 the13 input13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignoredExampleLagTLAG(1)13 =13 Tlag1

Differen1al13 equa1ons

Specify13 a13 model13 in13 terms13 of13 ordinary13 differential13 equations13 in13 Fortran13 format13 XP()13 is13 the13 notation13 for13 dX()dt13 where13 13 is13 the13 compartment13 number13 X()13 is13 the13 amount13 in13 the13 compartment13 There13 can13 be13 a13 maximum13 of13 2013 such13 equationsExampleDifXP(1)13 =13 -shy‐KAX(1)XP(2)13 =13 RATEIV(1)13 +13 KAX(1)13 -shy‐13 (KE+KCP)X(2)13 +13 KPCX(3)XP(3)13 =13 KCPX(2)13 -shy‐13 KPCX(3)RATEIV(1)13 is13 the13 notation13 to13 indicate13 an13 infusion13 of13 input13 113 (typically13 drug13 1)13 13 The13 duration13 of13 the13 infusion13 and13 total13 dose13 is13 deZined13 in13 the13 data13 csv13 Zile13 Up13 to13 713 inputs13 are13 currently13 allowed13 13 These13 can13 be13 used13 in13 the13 model13 Zile13 as13 RATEIV(1)13 RATEIV(2)13 etc13 13 The13 compartments13 for13 13 receiving13 the13 inputs13 of13 oral13 (bolus)13 doses13 are13 deZined13 in13 the13 Bolus13 block

Outputs

Output13 equations13 in13 Fortran13 format13 Outputs13 are13 of13 the13 form13 Y()13 =13 expression13 where13 13 is13 the13 output13 equation13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignored13 There13 can13 be13 a13 maximum13 of13 613 outputs13 13 They13 are13 referred13 to13 as13 Y(1)13 Y(2)13 etcExampleOutY(1)13 =13 X(2)V

Error

This13 block13 contains13 all13 the13 information13 Pmetrics13 requires13 for13 the13 structure13 of13 the13 error13 model13 13 In13 Pmetrics13 each13 observation13 is13 weighted13 by13 1error213 13 13 There13 are13 two13 choices13 for13 the13 error13 term

113 13 error13 =13 SD13 13 gamma213 13 error13 =13 (SD213 +13 lamda2)0513 (Note13 that13 lambda13 is13 only13 available13 in13 NPAG13 currently)

where13 SD13 is13 the13 standard13 deviation13 (SD)13 of13 each13 observation13 [obs]13 and13 gamma13 and13 lambda13 are13 terms13 to13 capture13 extra13 process13 noise13 related13 to13 the13 observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 SD13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 The13 13 values13 for13 the13 coefZicients13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13

Userrsquos13 Guide13 13 1313 13

coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly() 13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0In13 the13 multiplicative13 model13 13 gamma13 is13 a13 scalar13 on13 SD13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 Lambda13 is13 an13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 We13 tend13 to13 prefer13 lambda

To13 specify13 the13 model13 in13 this13 block13 the13 Zirst13 line13 needs13 to13 be13 either13 L=[number]13 or13 G=[number]13 for13 a13 lambda13 or13 gamma13 error13 model13 13 The13 [number]13 term13 is13 the13 starting13 value13 for13 lambda13 or13 gamma13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present13 13 For13 gamma13 good13 starting13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality13 13 If13 you13 include13 an13 exclamation13 point13 ()13 in13 the13 declaration13 then13 lambda13 or13 gamma13 will13 be13 Zixed13 and13 not13 estimated13 13 Note13 that13 you13 can13 only13 Zix13 lambda13 currently13 to13 zeroThe13 next13 line(s)13 contain13 the13 values13 for13 C013 C113 C213 and13 C313 separated13 by13 commas13 13 There13 should13 be13 one13 line13 of13 coefZicients13 for13 each13 output13 equation13 13 By13 default13 Pmetrics13 will13 use13 values13 for13 these13 coefZicients13 found13 in13 the13 data13 Zile13 13 If13 none13 are13 present13 or13 if13 the13 model13 declaration13 line13 contains13 an13 exclamation13 point13 ()13 the13 values13 here13 will13 be13 used

Example13 113 estimated13 lambda13 starting13 at13 0413 one13 output13 use13 data13 Zile13 coefZicients13 but13 if13 missing13 use13 010100ErrL=04010100

Example13 213 Zixed13 gamma13 of13 213 two13 outputs13 use13 data13 Zile13 coefZicients13 but13 if13 missing13 use13 01010013 for13 the13 Zirst13 output13 but13 use13 0313 0113 013 013 for13 output13 213 regardless13 of13 what13 is13 in13 the13 data13 ZileErrG=2010100030100

Extra

This13 block13 is13 for13 advanced13 Fortran13 programmers13 only13 13 Occasionally13 for13 very13 complex13 models13 additional13 Fortran13 subroutines13 are13 required13 13 They13 can13 be13 placed13 here13 13 The13 code13 must13 specify13 complete13 Fortran13 subroutines13 which13 can13 be13 called13 from13 other13 blocks13 with13 appropriate13 call13 functions13 13

Reserved13 Names

The13 following13 cannot13 be13 used13 as13 primary13 covariate13 or13 secondary13 variable13 names13 They13 can13 be13 used13 in13 equations13 however

Reserved13 Variable Func1on13 in13 Pmetricsndim internal

t time

Userrsquos13 Guide13 13 1413 13

x array13 of13 compartment13 amounts

xp array13 of13 Zirst13 derivative13 of13 compartment13 amounts

rpar internal

ipar internal

p array13 of13 primary13 parameters

r input13 rates

b input13 boluses

npl internal

numeqt output13 equation13 number

ndrug input13 number

nadd covariate13 number

rateiv intravenous13 input13 for13 inputs13 when13 DURgt013 in13 data13 Ziles

cv covariate13 values13 array

n number13 of13 compartments

nd internal

ni internal

nup internal

nuic internal

np number13 of13 primary13 parameters

nbcomp bolus13 compartment13 array

psym names13 of13 primary13 parameters

fa biovailability

tlag lag13 time

tin internal

tout internal

Complete13 Example

Here13 is13 a13 complete13 example13 of13 a13 model13 Zile13 as13 of13 Pmetrics13 version13 04013 and13 higher

Userrsquos13 Guide13 13 1513 13

NotesBy13 omitting13 a13 Diffeq13 block13 with13 ODEs13 Pmetrics13 understands13 that13 you13 are13 specifying13 the13 model13 to13 be13 solved13 algebraically13 In13 this13 case13 at13 least13 KE13 and13 V13 must13 be13 in13 the13 Primary13 or13 Secondary13 variables13 KA13 KCP13 and13 KPC13 are13 optional13 and13 specify13 absorption13 and13 transfer13 to13 and13 from13 the13 central13 to13 a13 peripheral13 compartment13 respectively

PriKE13 013 5V013 0113 100KA13 013 5Tlag113 013 3Cov13 wt

SecV13 =13 V0wt

LagTLAG(1)13 =13 Tlag1

OutY(1)13 =13 X(2)V

ErrL=04010100

Userrsquos13 Guide13 13 1613 13

Brief13 Fortran13 Tutorial

Much13 more13 detailed13 help13 is13 available13 from13 httpwwwcsmtuedu~sheneCOURSEScs201NOTESfortranhtml

Arithmetic Operator Meaning

+ addition

- subtraction

multiplication

division

exponentiation

Relational Operator Alternative Operator Meaning

lt LT less than

lt= LE less than or equal

gt GT greater than

gt= GE greater than or equal

== EQ equal

= NE not equal

Selective Execution Example

IF (logical-expression) one-statement IF (T gt= 100) CL = 10

IF (logical-expression) THEN statementsEND IF

IF (T gt= 100) THEN CL = 10 V = 10END IF

IF (logical-expression) THEN statements-1ELSE statements-2END IF

IF (T gt= 100) THEN CL = 10ELSE CL = CLEND IF

Userrsquos13 Guide13 13 1713 13

How to use R and PmetricsSeCng13 up13 a13 Pmetrics13 project

When13 beginning13 a13 new13 modeling13 project13 it13 is13 convenient13 to13 use13 the13 command13 PMtree(ldquoproject namerdquo)13 13 This13 command13 will13 set13 up13 a13 new13 directory13 in13 the13 current13 working13 directory13 named13 whatever13 you13 have13 included13 as13 the13 ldquoproject13 namerdquo13 13 For13 example13 a13 directory13 called13 ldquoDrugXrdquo13 will13 be13 created13 by13 PMtree(ldquoDrugXrdquo)13 13 Beneath13 this13 directory13 several13 subdirectories13 will13 be13 also13 created13 Rscript13 Runs13 Sim13 and13 src13 13 The13 Rscript13 subdirectory13 will13 contain13 a13 skeleton13 R13 script13 to13 begin13 Pmetrics13 runs13 in13 the13 new13 project13 13 The13 Runs13 subdirectory13 should13 contain13 all13 Ziles13 required13 for13 a13 run13 (described13 next)13 and13 it13 will13 also13 contain13 the13 resulting13 numerically13 ordered13 run13 directories13 created13 after13 each13 Pmetrics13 NPAG13 or13 IT2B13 run13 13 The13 Sim13 subdirectory13 can13 contain13 any13 Ziles13 related13 to13 simulations13 and13 the13 src13 subdirectory13 should13 contain13 original13 and13 manipulated13 source13 data13 Ziles13 13 Of13 course13 you13 are13 free13 to13 edit13 this13 directory13 tree13 structure13 as13 you13 please13 or13 make13 your13 own13 entirely

GeCng13 the13 required13 files13 to13 run13 Pmetrics

When13 you13 wish13 to13 execute13 a13 Pmetrics13 run13 you13 must13 ensure13 that13 appropriate13 Pmetrics13 model13 txt13 and13 data13 csv13 Ziles13 are13 in13 the13 working13 directory13 ie13 the13 Runs13 subdirectory13 of13 the13 project13 directory13 13 13 13 R13 can13 be13 used13 to13 help13 prepare13 the13 data13 csv13 Zile13 by13 importing13 and13 manipulating13 spreadsheets13 (eg13 readcsv())13 13 The13 Pmetrics13 function13 PMcheck()13 can13 be13 used13 to13 check13 a13 csv13 Zile13 or13 an13 R13 dataframe13 that13 is13 to13 be13 saved13 as13 a13 Pmetrics13 data13 13 csv13 Zile13 for13 errors13 13 13 13 13 13 It13 can13 also13 check13 a13 model13 Zile13 for13 errors13 in13 the13 context13 of13 a13 dataZile13 eg13 covariates13 that13 do13 not13 match13 13 PMfixMatrix()13 attempts13 to13 automatically13 rid13 data13 Ziles13 of13 errors13 13 The13 function13 PMwriteMatrix() 13 can13 be13 used13 to13 write13 the13 R13 data13 object13 in13 the13 correct13 format13 for13 use13 by13 IT2B13 NPAG13 or13 the13 Simulator13 13 You13 can13 also13 download13 sample13 data13 and13 scripts13 from13 the13 Pmetrics13 downloads13 section13 of13 our13 website13 once13 you13 sign13 in13 with13 your13 LAPK13 user13 email13 address13 and13 password13 13 Edit13 prior13 versions13 of13 model13 Ziles13 to13 make13 new13 model13 Ziles

Using13 scripts13 to13 control13 Pmetrics

As13 you13 will13 see13 in13 the13 skeleton13 R13 script13 made13 by13 PMtree() and13 placed13 in13 the13 Rscript13 subdirectory13 if13 this13 is13 a13 Zirst-shy‐time13 run13 the13 R13 commands13 to13 run13 IT2B13 or13 NPAG13 are13 as13 follows13 13 Recall13 that13 the13 ldquordquo13 character13 is13 a13 comment13 character

library(Pmetrics)Run 1 - add your run description heresetwd(ldquoworking directoryrdquo)NPrun() for NPAG or ITrun() for IT2B

The13 Zirst13 line13 will13 load13 the13 Pmetrics13 library13 of13 functions13 13 The13 second13 line13 sets13 the13 working13 directory13 to13 the13 speciZied13 path13 13 The13 third13 line13 generates13 the13 batch13 Zile13 to13 run13 NPAG13 or13 IT2B13 and13 saves13 it13 to13 the13 working13 directory13

NOTE13 13 On13 Mac13 systems13 the13 batch13 Zile13 will13 be13 automatically13 launched13 in13 a13 Terminal13 window13 13 On13 Windows13 systems13 the13 batch13 Zile13 must13 be13 launched13 manually13 by13 double13 clicking13 the13 np_runbat13 or13 it_runbat13 Zile13 in13 the13 working13 directory

ITrun() 13 and13 NPrun()13 both13 return13 the13 full13 path13 of13 the13 output13 directory13 to13 the13 clipboard13 13 By13 default13 runs13 are13 placed13 in13 folders13 numbered13 sequentially13 beginning13 with13 ldquo1rdquoNow13 the13 output13 of13 IT2B13 or13 NPAG13 needs13 to13 be13 loaded13 into13 R13 so13 the13 next13 command13 does13 this

NPload(run_number) or ITload(run_number)

Details13 of13 these13 commands13 and13 what13 is13 loaded13 are13 described13 in13 the13 R13 documentation13 (NPload 13 or13 ITload)13 and13 in13 the13 following13 section13 13 The13 run_number13 should13 be13 included13 within13 the13 parentheses13 to13 be13 appended13 to13 the13 names13

Userrsquos13 Guide13 13 1813 13

of13 loaded13 R13 objects13 allowing13 for13 comparison13 between13 runs13 eg13 NPload(1)13 13 Finally13 at13 this13 point13 other13 Pmetrics13 commands13 can13 be13 added13 to13 the13 script13 to13 process13 the13 data13 such13 as13 the13 following

plot(final1)plot(cycle1)plot(op1type=rdquopoprdquo) or plot(op1$pop1)plot(op1) default is to plot posterior predictions for output 1plot(op1type=rdquopoprdquoresid=T)

Of13 course13 the13 full13 power13 of13 R13 can13 be13 used13 in13 scripts13 to13 analyze13 data13 but13 these13 simple13 statements13 serve13 as13 examplesIf13 you13 do13 not13 use13 the13 PMtree() structure13 we13 suggest13 that13 the13 R13 script13 for13 a13 particular13 project13 be13 saved13 into13 a13 folder13 called13 ldquoRscriptrdquo13 or13 some13 other13 meaningful13 name13 in13 the13 working13 directory13 13 Folders13 are13 not13 be13 moved13 by13 the13 batch13 Zile13 13 Within13 the13 script13 number13 runs13 sequentially13 and13 use13 comments13 liberally13 to13 13 distinguish13 runs13 as13 shown13 below

library(Pmetrics)

Run 1 - Ka Kel V all subjectssetwd(ldquoworking directoryrdquo)NPrun() assumes model=rdquomodeltxtrdquo and data=rdquodatacsvrdquoNPload(1)

Remember13 in13 R13 that13 the13 command13 example(function) will13 provide13 examples13 for13 the13 speciZied13 function13 13 Most13 Pmetrics13 functions13 have13 examples

Pmetrics Data ObjectsAfter13 a13 successful13 IT2B13 or13 NPAG13 run13 an13 R13 dataZile13 is13 saved13 in13 the13 output13 subdirectory13 of13 the13 newly13 created13 numerically13 ordered13 folder13 in13 the13 working13 directory13 13 After13 IT2B13 this13 Zile13 is13 called13 ldquoIT2BoutRdatardquo13 and13 after13 NPAG13 it13 is13 called13 ldquoNPAGoutRdatardquo13 13 As13 mentioned13 in13 the13 previous13 section13 these13 data13 Ziles13 can13 be13 loaded13 by13 ensuring13 that13 the13 Runs13 folder13 is13 set13 as13 the13 working13 directory13 and13 then13 using13 the13 Pmetrics13 commands13 ITload(run_num)13 or13 NPload(run_num)

Both13 commands13 load13 their13 respective13 Rdata13 Ziles13 into13 R13 making13 the13 contained13 objects13 available13 for13 plotting13 and13 other13 analysisObjects13 loaded13 by13 ITload(run_num) and NPload(run_num)

Objects Variables Comments

op13 (class13 PMop13 list) $pop113 $post113 Population13 and13 posterior13 predictions13 for13 each13 output13 equation13 ie13 113 213

13 $id Subject13 identiZication

13 $time Observation13 time13 in13 relative13 decimal13 hours

13 $obs Observation

13 $pred Prediction13 based13 on13 median13 of13 population13 or13 posterior13 parameter13 value13 distributions

Userrsquos13 Guide13 13 1913 13

Objects Variables Comments

13 $block Dosing13 block13 usually13 113 unless13 data13 Zile13 contains13 EVID=413 dose13 reset13 events13 in13 which13 case13 each13 such13 reset13 within13 a13 given13 ID13 will13 increment13 the13 dosing13 block13 by13 113 for13 that13 ID

13 $obsSD Calculated13 standard13 deviation13 (error)13 of13 the13 observation13 based13 on13 the13 assay13 error13 polynomial

13 $d Difference13 between13 pred13 and13 obs

13 $ds Squared13 difference13 between13 pred13 and13 obs

13 $wd $d13 weighted13 by13 the13 $obsSD

13 $wds $ds13 weighted13 by13 the13 $obsSD

Zinal13 (class13 PMZinal13 list) $popPoints (NPAG13 only)13 Dataframe13 of13 the13 Zinal13 cycle13 joint13 population13 density13 of13 grid13 points13 with13 column13 names13 equal13 to13 the13 name13 of13 each13 random13 parameter13 plus13 $prob13 for13 the13 associated13 probability13 of13 that13 point13

$popMean The13 Zinal13 cycle13 mean13 for13 each13 random13 parameter13 distribution

$popSD The13 Zinal13 cycle13 standard13 deviation13 for13 each13 random13 parameter13 distribution

$popCV The13 Zinal13 cycle13 coefZicient13 of13 variation13 for13 each13 random13 parameter13 distribution

$popVar The13 Zinal13 cycle13 variance13 for13 each13 random13 parameter13 distribution

$popCov The13 Zinal13 cycle13 covariance13 matrix13 for13 each13 random13 parameter13 distribution

$popCor The13 Zinal13 cycle13 correlation13 matrix13 for13 each13 random13 parameter13 distribution

$popMedian The13 Zinal13 cycle13 median13 for13 each13 random13 parameter13 distribution

$gridpts (NPAG13 only)13 The13 initial13 number13 of13 support13 points

$ab Matrix13 of13 boundaries13 for13 random13 parameter13 values13 13 For13 NPAG13 this13 is13 speciZied13 by13 the13 user13 prior13 to13 the13 run13 for13 IT2B13 it13 is13 calculated13 as13 a13 user13 speciZied13 multiple13 of13 the13 SD13 for13 the13 parameter13 value13 distribution

Userrsquos13 Guide13 13 2013 13

Objects Variables Comments

cycle13 (class13 PMcycle13 list) $names Vector13 of13 names13 of13 the13 random13 parameters

$ll Matrix13 of13 cycle13 number13 and13 -shy‐2Log-shy‐likelihood13 at13 each13 cycle

$gamlam A13 matrix13 of13 cycle13 number13 and13 gamma13 or13 lambda13 at13 each13 cycle13 (see13 item13 1613 under13 NPAG13 Runs13 below13 for13 a13 discussion13 of13 gamma13 and13 lambda)

$mean A13 matrix13 of13 cycle13 number13 and13 the13 mean13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 mean

$sd A13 matrix13 of13 cycle13 number13 and13 the13 standard13 deviation13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$median A13 matrix13 of13 cycle13 number13 and13 the13 median13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$aic A13 matrix13 of13 cycle13 number13 and13 Akaike13 Information13 Criterion13 at13 each13 cycle

$bic A13 matrix13 of13 cycle13 number13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle

cov13 (class13 PMcov13 dataframe)

$id Subject13 identiZication

$time Time13 for13 each13 covariate13 entry

covariates Covariate13 values13 for13 each13 subject13 at13 each13 time13 extracted13 from13 the13 raw13 data13 Zile

parameters Mean13 median13 or13 mode13 of13 Bayesian13 posterior13 distribution13 for13 each13 random13 parameter13 in13 the13 model13 13 Mode13 summaries13 are13 available13 for13 NPAG13 output13 only13 and13 the13 default13 is13 median13 13 Values13 are13 recycled13 for13 each13 row13 within13 a13 given13 subject13 with13 the13 number13 of13 rows13 driven13 by13 the13 number13 of13 covariate13 entries

Userrsquos13 Guide13 13 2113 13

Objects Variables Comments

pop13 (class13 PMpop13 dataframe)

post13 (class13 PMpost13 dataframe)

NPAG13 only

$id Subject13 identiZication

$pred113 Population13 prior13 (PMpop)13 or13 Bayesian13 posterior13 (PMpost)13 predictions13 for13 each13 output13 equation13 based13 on13 mean13 median13 and13 mode13 as13 speciZied13 by13 the13 user13 and13 with13 frequency13 also13 speciZied13 by13 the13 user13 in13 the13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

$block Same13 as13 for13 PMop13 objects13 above

NPdata13 (class13 NPAG13 list)13 ITdata13 (class13 IT2B13 list

Raw13 data13 used13 to13 make13 the13 above13 objects13 13 Please13 use13 NPparse13 or13 ITparse13 in13 R13 for13 discussion13 of13 the13 data13 contained13 in13 these13 objects

Since13 R13 is13 an13 object13 oriented13 language13 to13 access13 the13 observations13 in13 a13 PMop13 object13 for13 example13 use13 the13 following13 syntax13 op$post1$obsNote13 that13 you13 will13 place13 an13 integer13 within13 the13 parentheses13 of13 the13 loading13 functions13 eg13 NPload(1)13 which13 will13 sufZix13 all13 the13 above13 objects13 with13 that13 integer13 eg13 op113 Zinal113 NPdata113 13 This13 allows13 several13 models13 to13 be13 loaded13 into13 R13 simultaneously13 each13 with13 a13 unique13 sufZix13 and13 which13 can13 be13 compared13 with13 the13 PMcompare()13 command13 (see13 Model13 Diagnostics13 below)

Making New Pmetrics ObjectsOnce13 you13 have13 loaded13 the13 raw13 (NPdata13 or13 ITdata)13 or13 processed13 (op13 Uinal13 cycle13 pop13 post)13 data13 objects13 described13 above13 with13 NPload(run_num)13 or13 ITload(run_num)13 should13 you13 wish13 to13 remake13 the13 processed13 objects13 with13 parameters13 other13 than13 the13 defaults13 you13 can13 easily13 do13 so13 with13 the13 make 13 family13 of13 commands13 13 For13 example13 the13 default13 for13 PMop13 observed13 vs13 predicted13 objects13 is13 to13 use13 the13 prediction13 based13 on13 the13 median13 of13 the13 population13 or13 posterior13 distribution13 13 If13 you13 wish13 to13 use13 the13 mean13 of13 the13 distribution13 remake13 the13 PMop13 object13 using makeOP()13 13 If13 you13 wish13 to13 see13 all13 the13 cycle13 information13 in13 a13 PMcycle13 object13 not13 omitting13 the13 Zirst13 1013 of13 cycles13 by13 default13 remake13 it13 using13 makeCycle()13 13

For13 all13 of13 the13 following13 commands13 the13 data13 input13 is13 either13 NPdata13 or13 ITdata13 with13 additional13 function13 arguments13 speciZic13 to13 each13 command13 13 Accessing13 the13 help13 for13 each13 function13 in13 R13 will13 provide13 further13 details13 on13 the13 arguments13 defaults13 and13 output13 of13 each13 command

Userrsquos13 Guide13 13 2213 13

Command Description R13 help

makeAUC Make13 a13 dataframe13 of13 class13 PMauc13 containing13 subject13 ID13 and13 AUC13 from13 a13 variety13 of13 inputs13 including13 objects13 of13 PMop13 PMsim13 or13 a13 suitable13 dataframe

makeAUC

makeCov Generate13 a13 dataframe13 of13 class13 PMcov13 with13 subject-shy‐speciZic13 covariates13 extracted13 from13 the13 data13 csv13 Zile13 This13 object13 can13 be13 plotted13 and13 used13 to13 test13 for13 covariates13 which13 are13 signiZicantly13 associated13 with13 model13 parameters13 13

makeCov

makeCycle Create13 a13 PMcycle13 object13 described13 in13 the13 previous13 section makeCycle

makeFinal Create13 a13 PMZinal13 object13 described13 in13 the13 previous13 section makeFinal

makeOP Create13 a13 PMop13 object13 described13 in13 the13 previous13 section makeOP

makeNCA Create13 a13 dataframe13 (class13 PMnca)13 with13 the13 output13 of13 a13 non-shy‐compartmental13 analysis13 using13 PMpost13 and13 NPAG13 data13 objects13 as13 input13 13 The13 PMnca13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull auc13 Area13 under13 the13 time-shy‐observation13 curve13 using13 the13

trapezoidal13 approximation13 from13 time13 013 until13 the13 second13 dose13 or13 if13 only13 one13 dose13 until13 the13 last13 observation

bull aumc13 Area13 under13 the13 Zirst13 moment13 curvebull k13 Slope13 by13 least-shy‐squares13 linear13 regression13 of13 the13 Zinal13

613 log-shy‐transformed13 observations13 vs13 timebull auclast13 Area13 under13 the13 curve13 from13 the13 time13 of13 the13

last13 observation13 to13 inZinity13 calculated13 as13 [Final13 obs]kbull aumclast13 Area13 under13 the13 Zirst13 moment13 curve13 from13

the13 time13 of13 the13 last13 observation13 to13 inZinitybull aucinf13 Area13 under13 the13 curve13 from13 time13 013 to13 inZinity13

caluculated13 as13 auc13 +13 auclastbull aumcinf13 Area13 under13 the13 Zirst13 moment13 curve13 from13

time13 013 to13 inZinitybull mrt13 Mean13 residence13 time13 calculated13 as13 1kbull cmax13 Maximum13 predicted13 concentration13 after13 the13

Zirst13 dosebull tmax13 Time13 to13 cmaxbull cl13 Clearance13 calculated13 as13 doseaucinfbull vdss13 Volume13 of13 distribution13 at13 steady13 state13

calculated13 as13 clmrtbull thalf13 Half13 life13 of13 elimination13 calculated13 as13 ln(2)kbull dose13 First13 dose13 amount13 for13 each13 subject

makeNCA

Userrsquos13 Guide13 13 2313 13

Command Description R13 help

makeErrorPoly This13 function13 plots13 Zirst13 second13 and13 third13 order13 polynomial13 functions13 Zitted13 to13 pairs13 of13 observations13 and13 associated13 standard13 deviations13 for13 a13 given13 output13 assay13 In13 this13 way13 the13 standard13 deviation13 associated13 with13 any13 observation13 may13 be13 calculated13 and13 used13 to13 appropriately13 weight13 that13 observation13 in13 the13 model13 building13 process13 Observations13 are13 weighted13 by13 the13 reciprocal13 of13 the13 variance13 or13 squared13 standard13 deviation13 13 Output13 of13 the13 function13 is13 a13 plot13 of13 the13 measured13 observations13 and13 Zitted13 polynomial13 curves13 and13 a13 list13 with13 the13 Zirst13 second13 and13 third13 order13 coefZicients

makeErrorPoly

makePTA This13 function13 performs13 a13 Probability13 of13 Target13 Attainment13 analysis13 for13 a13 set13 of13 simulated13 doses13 and13 time-shy‐concentration13 proZiles13 13 Targets13 (eg13 Minimum13 Inhibitory13 Concentrations)13 the13 type13 of13 target13 attainment13 (ie13 time13 above13 target13 Cmaxtarget13 13 AUCtarget13 Cmintarget13 or13 Cxtarget13 where13 x13 is13 any13 time13 point)13 and13 the13 success13 threshold13 (eg13 time13 gt13 0713 or13 Cmaxtarget13 gt13 10)13 can13 all13 be13 speciZied13 13 Output13 is13 a13 list13 (class13 PMpta)13 with13 two13 objectsbull Results13 a13 413 dimensional13 array13 with13 dimension13 size13 of13

[number13 of13 doses13 number13 of13 targets13 number13 of13 simulated13 proZiles13 1]13 which13 gives13 the13 target13 attainment13 (eg13 Cmaxtarget)13 for13 each13 dose13 target13 and13 proZile

bull Outcome13 For13 each13 dose13 and13 target13 a13 summary13 of13 the13 target13 attainment13 for13 all13 the13 proZiles13 including13 mean13 standard13 deviation13 and13 proportion13 above13 the13 success13 threshold

PMpta13 objects13 can13 be13 summarized13 with13 summary(x)13 and13 plotted13 with13 plot(x)13

makePTA

Userrsquos13 Guide13 13 2413 13

Command Description R13 help

makePopmakePost(NPAG13 only)

These13 functions13 create13 dataframes13 of13 class13 PMpop13 and13 PMpost13 respectively13 13 The13 PMpop13 or13 PMpost13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull time13 Times13 for13 predicted13 concentrations13 13 These13

times13 are13 not13 necessarily13 at13 observed13 times13 but13 at13 a13 frequency13 speciZied13 in13 the13 NPAG13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

bull pred113 Predictions13 for13 output13 113 13 For13 PMpop13 objects13 predictions13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 population13 prior13 distribution13 13 For13 PMpost13 objects13 they13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject

bull pred213 pred313 etc13 If13 additional13 outputs13 exist13 they13 will13 each13 be13 columns13 in13 the13 dataframe13 just13 as13 for13 pred113 13

makePopmakePost

NPAG RunsIn13 the13 past13 users13 had13 to13 run13 NPAG13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 NPrun()13 13 However13 if13 NPrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable

1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 NPAG13 creates13 a13 temporary13 instruction13 Zile13 in13 case13 something13 happens13 so13 that13 instructions13 entered13 to13 date13 can13

be13 recovered13 13 Accept13 the13 default13 by13 choosing13 113 13 You13 can13 save13 with13 a13 meaningful13 Zilename13 later13 13 If13 it13 already13 exists13 you13 will13 be13 asked13 if13 you13 wish13 to13 overwrite13 the13 Zile13 which13 is13 usually13 the13 thing13 to13 do

Userrsquos13 Guide13 13 2513 13

8 If13 you13 have13 previously13 run13 IT2B13 you13 can13 automatically13 import13 the13 suggested13 parameter13 ranges13 13 Choose13 113 to13 do13 this13 and13 013 to13 run13 NPAG13 without13 a13 previous13 IT2B13 run81 If13 you13 choose13 option13 113 you13 must13 specify13 the13 name13 of13 a13 FROMxxxx13 Zile13 typically13 FROM000113 that13 you13 can13

Zind13 in13 an13 output13 directory13 after13 a13 successful13 IT2B13 run13 13 Note13 that13 the13 program13 will13 then13 assume13 that13 you13 are13 using13 the13 same13 wrk13 Ziles13 that13 IT2B13 made13 from13 your13 data13 csv13 Zile13 13 It13 is13 strongly13 recommended13 to13 override13 this13 and13 specify13 a13 data13 csv13 Zile13 13 At13 this13 point13 you13 will13 jump13 to13 1013 below13 and13 continue13 on13 however13 your13 answers13 will13 often13 be13 supplied13 by13 the13 instructions13 contained13 in13 the13 FROMxxxx13 Zile13 and13 you13 need13 merely13 conZirm13 them

9 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13 have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 NPrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis91 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13

for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

10 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 NPAG13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

11 Enter13 the13 name13 of13 your13 csv13 Zile13 now12 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile13 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset131 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects132 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry14 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset15 Enter13 the13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo 13 followed13 by13

return16 Select13 how13 you13 would13 like13 to13 model13 assay13 (observation)13 error13 for13 each13 output13 equation13 13 You13 have13 four13 choices13 13

In13 all13 four13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0161 Error13 model13 113 (SD)13 13 Choose13 this13 option13 if13 you13 have13 already13 run13 IT2B13 and13 multiplied13 your13 assay13 error13

polynomial13 by13 gamma13 (see13 next13 option13 for13 a13 description13 of13 gamma)162 Error13 model13 213 (SD13 13 gamma)13 13 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13

observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 If13 you13 choose13 this13 option13 you13 then13 can13 specify13 the13 starting13 value13 of13 gamma13 13 Good13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality

163 Error13 model13 313 (SD213 +13 lamda2)0513 13 Lamda13 is13 an13 alternative13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present

Userrsquos13 Guide13 13 2613 13

164 Error13 model13 413 SD13 =13 gamma13 13 This13 model13 is13 rarely13 used13 and13 is13 equivalent13 to13 specifying13 a13 model13 with13 C013 only13 ie13 a13 constant13 error13 regardless13 of13 concentration

17 Once13 you13 select13 the13 assay13 error13 model13 for13 each13 output13 equation13 you13 are13 then13 offered13 four13 more13 options13 on13 which13 assay13 error13 polynomial13 coefZicients13 to13 use13 13 Choices13 113 and13 213 are13 the13 most13 commonly13 used171 Choice13 113 The13 default13 13 Use13 coefZicients13 in13 the13 subject13 record13 (C013 C113 C213 C313 in13 the13 data13 csv13 Zile)13 and13 if13

missing13 use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 (item13 1813 below)172 Choice13 213 Use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 for13 all13 subjects13 regardless13 of13 what13 is13 in13 the13

data13 csv13 Zile173 Choice13 313 13 To13 multiply13 data13 csv13 values13 and13 default13 entered13 values13 by13 a13 Zixed13 gamma13 and13 use13 them13 13 174 Choice13 013 Specify13 coefZicients13 on13 a13 subject13 by13 subject13 basis13 either13 those13 in13 the13 data13 csv13 Zile13 already13 the13

default13 values13 entered13 into13 the13 program13 or13 other13 values18 For13 each13 output13 equation13 after13 you13 have13 selected13 the13 option13 in13 item13 1713 you13 will13 be13 prompted13 to13 supply13 the13

required13 information13 including13 the13 general13 default13 values13 for13 missing13 or13 overridden13 values13 in13 the13 data13 csv13 Zile19 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13

usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13

20 Enter13 the13 grid13 point13 index13 13 This13 number13 corresponds13 to13 the13 number13 of13 grid13 (support)13 points13 which13 will13 initially13 Zill13 the13 model13 parameter13 space13 13 The13 larger13 the13 number13 of13 random13 parameters13 to13 be13 estimated13 the13 more13 points13 are13 required13 13 The13 program13 will13 make13 a13 suggestion13 based13 on13 the13 number13 of13 random13 parameters13 in13 the13 model13 13 The13 more13 you13 choose13 the13 slower13 the13 run13 will13 be13 but13 results13 may13 improve13 13 It13 is13 reasonable13 to13 choose13 fewer13 points13 early13 in13 model13 exploration13 and13 increase13 in13 later13 phases13 or13 if13 poor13 model13 Zits13 or13 lack13 of13 convergence13 are13 noted13 The13 choices13 are13 113 to13 713 corresponding13 respectively13 to13 212913 500313 1000713 2001113 4000913 and13 8002113 points13 13 If13 you13 choose13 713 you13 then13 have13 an13 additional13 choice13 to13 select13 one13 or13 more13 multiples13 of13 8002113 points

21 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 013 or13 greater13 13 If13 you13 enter13 an13 integer13 greater13 than13 013 the13 engine13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13 If13 you13 enter13 013 this13 is13 the13 way13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 an13 independent13 data13 set13 and13 a13 non-shy‐uniform13 prior13 must13 be13 speciZied13 (see13 3013 below)13 13 This13 means13 that13 the13 engine13 will13 only13 calculate13 the13 individual13 Bayesian13 posteriors13 for13 the13 new13 subjects13 using13 the13 population13 joint13 density13 from13 a13 previous13 run13 as13 a13 Bayesian13 prior

22 Information13 about13 convergence13 criteria13 13 Answer13 113 or13 some13 other13 keystroke13 plus13 Return13 to13 acknowledge13 that13 you13 have13 read13 it

23 In13 order13 to13 predict13 concentrations13 from13 a13 non-shy‐parametric13 distribution13 you13 have13 the13 option13 to13 use13 the13 1)13 mean13 2)13 median13 or13 3)13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject13 13 We13 typically13 use13 the13 median13 Zirst13 and13 then13 the13 mean13 in13 a13 separate13 run13 and13 compare13 the13 differences13 13

24 Select13 the13 time13 interval13 to13 generate13 predicted13 concentrations13 13 Additionally13 there13 will13 also13 be13 predictions13 made13 at13 the13 time13 of13 each13 observation13 13 In13 general13 for13 most13 models13 predictions13 every13 1213 minutes13 provide13 sufZicient13 granularity13 13 Smaller13 values13 can13 result13 in13 very13 large13 Ziles13 for13 big13 populations

25 Select13 the13 default13 MIC13 to13 be13 used13 for13 AUCMIC13 ratio13 reporting13 13 This13 should13 generally13 be13 set13 to13 the13 default13 of13 113 by13 choosing13 113 13 You13 can13 always13 extract13 the13 AUC13 later13 and13 divide13 it13 by13 any13 MIC13 you13 choose

26 Enter13 the13 value13 in13 hours13 that13 you13 want13 for13 calculations13 of13 AUCs13 from13 predicted13 concentration13 proZiles13 13 The13 default13 is13 2413 hours13 which13 you13 can13 accept13 by13 entering13 113 or13 013 if13 you13 want13 to13 specify13 a13 different13 interval

27 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

28 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

Userrsquos13 Guide13 13 2713 13

29 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

30 For13 the13 prior13 density13 choose13 113 if13 it13 is13 to13 be13 uniform13 13 This13 means13 that13 the13 initial13 grid13 points13 will13 be13 evenly13 distributed13 with13 equal13 probability13 within13 the13 boundaries13 speciZied13 (in13 1513 above)13 13 If13 you13 choose13 013 you13 will13 be13 prompted13 for13 the13 name13 of13 a13 Zile13 that13 contains13 the13 prior13 density13 13 This13 will13 be13 DEN000113 unless13 you13 have13 changed13 its13 name13 13 It13 will13 be13 found13 in13 the13 output13 directory13 of13 a13 prior13 NPAG13 run13 13 The13 model13 used13 to13 generate13 the13 DEN000113 Zile13 must13 be13 exactly13 the13 same13 as13 the13 current13 model13 including13 parameter13 boundaries13 13 However13 this13 option13 is13 useful13 to13 specify13 a13 non-shy‐uniform13 density13 for13 two13 reasons13 13 The13 Zirst13 is13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 a13 new13 set13 of13 subjects13 13 Do13 this13 in13 combination13 with13 setting13 the13 number13 of13 cycles13 to13 013 (see13 2113 above)13 13 The13 second13 use13 for13 a13 non-shy‐uniform13 prior13 is13 to13 continue13 a13 previous13 run13 13 For13 example13 if13 you13 only13 set13 the13 number13 of13 cycles13 to13 5013 to13 get13 a13 rough13 idea13 of13 model13 Zit13 you13 may13 continue13 where13 you13 left13 off13 by13 specifying13 the13 DEN000113 Zile13 from13 the13 50-shy‐cycle13 run13 and13 continuing13 with13 as13 many13 additional13 cycles13 as13 you13 specify13 in13 item13 2113 13 So13 in13 the13 example13 if13 you13 specify13 10013 cycles13 in13 2113 the13 total13 number13 of13 cycles13 will13 be13 5013 +13 10013 =13 150

31 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 NPrun(instr=ldquoyourfilerdquo)13 option13 and13 including13 ldquoyourZilerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

32 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 NPAG13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 NPAG13 analysis

33 The13 NPAG13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

IT2B RunsIn13 the13 past13 users13 had13 to13 run13 IT2B13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 ITrun()13 13 However13 if13 ITrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13

have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 ITrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis

Userrsquos13 Guide13 13 2813 13

71 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13 for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

8 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 IT2B13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

9 Enter13 the13 name13 of13 your13 csv13 Zile13 now10 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile11 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset111 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects112 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry12 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset13 Enter13 the13 initial13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo13 followed13

by13 return14 The13 estimated13 mean13 for13 each13 parameter13 value13 distribution13 during13 the13 Zirst13 iteration13 will13 be13 the13 median13 of13 the13

range13 speciZied13 in13 1313 13 You13 now13 have13 the13 option13 to13 specify13 the13 standard13 deviation13 for13 the13 parameter13 value13 distribution13 which13 by13 default13 is13 half13 of13 the13 range13 in13 1313 13 Choose13 113 to13 accept13 this13 (the13 usual13 answer)13 or13 013 to13 change13 it13 to13 something13 else13 expressed13 as13 a13 multiple13 of13 the13 range

15 In13 IT2B13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 You13 can13 now13 choose13 113 if13 every13 subject13 has13 the13 same13 coefZicients13 or13 013 to13 use13 a13 unique13 set13 of13 coefZicients13 for13 each13 subject13 13 The13 Zirst13 case13 is13 the13 more13 usual13 when13 all13 13 samples13 from13 all13 subjects13 are13 analyzed13 in13 the13 same13 lab13 13 If13 13 samples13 are13 analyzed13 in13 different13 labs13 and13 you13 have13 the13 assay13 data13 from13 each13 lab13 then13 you13 would13 enter13 013 13 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 (see13 151313 below)13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0151 If13 you13 choose13 113 (one13 set13 of13 coefZicients13 for13 all13 subjects)13 you13 will13 then13 be13 presented13 with13 313 additional13

choices1511 Choice13 113 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13 observation13

including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 and13 to13 Zix13 gamma13 to13 1

1512 Choice13 213 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 but13 to13 estimate13 gamma13 based13 on13 the13 data13 13 This13 is13 the13 usual13 option

1513 Choice13 313 Choose13 this13 option13 if13 you13 wish13 to13 estimate13 the13 assay13 error13 coefZicients13 based13 on13 your13 data13 for13 use13 in13 future13 runs13 13 Although13 you13 can13 access13 this13 option13 by13 using13 either13 ITrun()13 or13 ERRrun()13 in13 R13 the13 instruction13 Ziles13 that13 you13 save13 and13 the13 generated13 output13 Ziles13 will13 be13 different13 13 Therefore13 we13 recommend13 that13 if13 you13 intend13 to13 choose13 this13 option13 use13 ERRrun()13 in13 R13 which13 will13 generate13 an13 ASS000113 Zile13 that13 contains13 the13 estimates13 for13 C013 C113 C213 and13 C313 13 You13 can13 then13 include13 this13 Zile13 in13 the13 working13 directory13 (along13 with13 a13 model13 txt13 Zile13 and13 a13 data13 csv13 Zile)13 to13 do13 an13 IT2B13 run13 supplying13 the13 Zile13 name13 in13 16113 below

Userrsquos13 Guide13 13 2913 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

For13 IT2B13 and13 NPAG13 the13 ldquorunrdquo13 functions13 generate13 batch13 Ziles13 which13 when13 executed13 launch13 the13 software13 programs13 to13 do13 the13 analysis13 ERRrun13 is13 a13 special13 implementation13 of13 IT2B13 designed13 to13 estimate13 the13 assay13 error13 polynomial13 coefZicients13 from13 the13 data13 when13 they13 cannot13 be13 calculated13 from13 assay13 validation13 data13 (using13 makeErrorPoly())13 supplied13 by13 the13 analytical13 laboratory13 The13 batch13 Ziles13 contain13 all13 the13 information13 necessary13 to13 complete13 a13 run13 tidy13 the13 output13 into13 a13 datetime13 stamped13 directory13 with13 meaningful13 subdirectories13 extract13 the13 information13 generate13 a13 report13 and13 a13 saved13 Rdata13 Zile13 of13 parsed13 output13 which13 can13 be13 quickly13 and13 easily13 loaded13 into13 R13 13 On13 Mac13 (Unix)13 systems13 the13 batch13 Zile13 will13 automatically13 launch13 in13 a13 Terminal13 window13 13 On13 Windows13 systems13 the13 batch13 Zile13 must13 be13 launched13 manually13 13 In13 both13 cases13 the13 execution13 of13 the13 program13 to13 do13 the13 actual13 model13 parameter13 estimation13 is13 independent13 of13 R13 so13 that13 the13 user13 is13 free13 to13 use13 R13 for13 other13 purposesFor13 the13 Simulator13 the13 ldquorunrdquo13 function13 will13 execute13 the13 program13 directly13 within13 RFor13 all13 programs13 the13 ldquoparserdquo13 functions13 will13 extract13 the13 primary13 output13 from13 the13 program13 into13 meaningful13 R13 data13 objects13 13 For13 IT2B13 and13 NPAG13 this13 is13 done13 automatically13 at13 the13 end13 of13 a13 successful13 run13 and13 the13 objects13 are13 saved13 in13 the13 output13 subdirectory13 as13 IT2BoutRdata13 or13 NPAGoutRdata13 respectivelyFor13 IT2B13 and13 NPAG13 the13 ldquoloadrdquo13 functions13 can13 be13 used13 to13 load13 the13 above13 Rdata13 Ziles13 after13 a13 successful13 run13 13 The13 ldquoreportrdquo13 functions13 are13 automatically13 run13 at13 the13 end13 of13 a13 successful13 run13 and13 these13 will13 generate13 an13 HTML13 page13 with13 summaries13 of13 the13 run13 as13 well13 as13 the13 Rdata13 Ziles13 and13 other13 objects13 13 The13 default13 browser13 will13 be13 automatically13 launched13 for13 viewing13 of13 the13 HTML13 report13 pageWithin13 Pmetrics13 there13 are13 also13 functions13 to13 manipulate13 data13 csv13 Ziles13 and13 process13 and13 plot13 extracted13 databull Manipulate13 data13 csv13 Ziles13 PMreadMatrix13 PMcheck13 PMZixMatrix13 PMwriteMatrix13 PMmatrixRelTime13

PMwrk2csvbull Process13 data13 makeAUC13 makeCov13 makeCycle13 makeFinal13 makeOP13 makeNCA13 makeErrorPolybull Plot13 data13 plotPMcov13 plotPMcycle13 plotPMZinal13 plotPMmatrix13 plotPMop13 plotPMsim13 plotPMdiag13

plotPMptabull Model13 selection13 and13 diagnostics13 PMcompare13 plotPMop13 (with13 residual13 option)13 PMdiag13 PMstepbull Pmetrics13 function13 defaults13 PMwriteDefaultsAgain13 all13 functions13 have13 extensive13 help13 Ziles13 and13 examples13 which13 can13 be13 examined13 in13 R13 by13 using13 the13 help(command)13 or13 command13 syntax13 13

Customizing Pmetrics FunctionsWhen13 Pmetrics13 is13 loaded13 with13 a13 library(Pmetrics)13 command13 it13 will13 also13 load13 the13 Defaults13 package13 13 If13 not13 present13 it13 will13 automatically13 download13 it13 from13 CRAN13 13 This13 package13 allows13 you13 to13 change13 the13 default13 for13 any13 Pmetrics13 function13 argument13 13 See13 Defaults13 for13 more13 help13 but13 some13 key13 functions13 are13 summarized13 here

setDefaults(name) Where13 name13 is13 something13 like13 PMreadMatrix13 and13 is13 a13 list13 of13 arguments13 whose13 default13 you13 wish13 to13 change13 13 So13 if13 you13 want13 PMreadMatrix13 to13 read13 semicolon13 delimited13 Ziles13 by13 default13 instead13 of13 comma13 separated13 Ziles13 use13 setDefaults(PMreadMatrix delim=rdquordquo)

getDefaults()13 or13 getDefaults(name) 13 The13 Zirst13 command13 will13 list13 all13 functions13 that13 have13 alternative13 defaults13 and13 the13 second13 will13 list13 the13 alternatives13 for13 a13 given13 function13 13 unsetDefaults(name)13 13 Restores13 the13 defaults13 to13 normal13 for13 a13 given13 function

The13 above13 functions13 will13 manipulate13 defaults13 for13 a13 single13 session13 in13 R13 13 They13 are13 all13 included13 in13 the13 Defaults13 package13 13 If13 you13 want13 to13 make13 the13 defaults13 durable13 from13 session13 to13 session13 use13 the13 following13 function13 in13 PmetricsPMwriteDefaults()13 13 This13 will13 save13 your13 defaults13 and13 they13 will13 be13 restored13 every13 time13 you13 load13 Pmetrics

Userrsquos13 Guide13 13 613 13

Userrsquos13 Guide13 13 713 13

You13 supply13 these13 files13 Pmetrics13 does13 the13 rest

General WorkflowThe13 general13 Pmetrics13 workZlow13 for13 IT2B13 and13 NPAG13 is13 shown13 in13 the13 following13 diagram

Data13 csv13 file Model13 txt13 file

PreparaCon13 program

Engine13 program

InstrucCon13 file

Output

ITrun()

13 NPrun

()

ITload()13 NPload()

R13 is13 used13 to13 specify13 the13 working13 directory13 containing13 the13 data13 csv13 and13 model13 txt13 Ziles13 Through13 the13 batch13 Zile13 generated13 by13 R13 the13 preparation13 program13 is13 compiled13 and13 executed13 13 The13 instruction13 Zile13 is13 generated13 automatically13 by13 the13 contents13 of13 the13 data13 and13 model13 Ziles13 and13 by13 arguments13 to13 the13 NPrun()13 ITrun()13 or13 ERRrun()13 commands13 The13 batch13 Zile13 will13 then13 compile13 and13 execute13 the13 engine13 Zile13 according13 to13 the13 instructions13 which13 will13 generate13 several13 output13 Ziles13 upon13 completion13 13 Finally13 the13 batch13 Zile13 will13 call13 the13 R13 script13 to13 generate13 the13 summary13 report13 and13 several13 data13 objects13 including13 the13 IT2BoutRdata13 or13 NPAGoutRdata13 Ziles13 which13 can13 be13 loaded13 into13 R13 subsequently13 using13 ITload()13 or13 NPload()Both13 input13 Ziles13 (data13 model)13 are13 text13 Ziles13 which13 can13 be13 edited13 directly

Userrsquos13 Guide13 13 813 13

Pmetrics Input FilesData13 csv13 Files

Pmetrics13 accepts13 input13 as13 a13 spreadsheet13 ldquomatrixrdquo13 format13 It13 is13 designed13 for13 input13 of13 multiple13 records13 in13 a13 concise13 way13 13 Please13 keep13 the13 number13 of13 characters13 in13 the13 Uile13 name13 le13 8Files13 are13 in13 comma-shy‐separated-shy‐values13 (csv)13 format13 13 Examples13 of13 programs13 that13 can13 save13 csv13 Ziles13 are13 any13 text13 editor13 (eg13 TextEdit13 on13 Mac13 Notepad13 on13 Windows)13 or13 spreadsheet13 program13 (eg13 Excel)13 13 Click13 on13 hyperlinked13 items13 to13 see13 an13 explanation13 13

IMPORTANT13 The13 order13 capitalization13 and13 names13 of13 the13 header13 and13 the13 Zirst13 1213 columns13 are13 Zixed13 13 All13 entries13 must13 be13 numeric13 with13 the13 exception13 of13 ID13 and13 ldquordquo13 for13 non-shy‐required13 placeholder13 entries

POPDATA13 DEC13 11ID EVID TIME DUR DOSE ADDL II INPUT OUT OUTEQ C0 C1 C2 C3 COVhellipGH 1 0 0 400 1 GH 0 05 042 1 001 01 0 0GH 0 1 046 1 001 01 0 0GH 0 2 247 1 001 01 0 0GH 4 0 0 150 1 GH 1 35 05 150 1 001 01 0 0GH 0 512 055 1 001 01 0 0GH 0 24 052 1 001 01 0 01423 1 0 1 400 -shy‐1 12 1 1423 1 01 0 100 2 1423 0 1 -shy‐99 1 001 01 0 01423 0 2 038 1 001 01 0 01423 0 2 16 2 005 02 -shy‐011 0002POPDATA13 DEC_1113 13 This13 is13 the13 header13 for13 the13 Zile13 and13 must13 be13 in13 the13 Zirst13 line13 13 It13 identiZies13 the13 versionID13 13 This13 Zield13 must13 be13 preceded13 by13 the13 ldquordquo13 symbol13 to13 conZirm13 that13 this13 is13 the13 header13 row13 It13 can13 be13

numeric13 or13 character13 and13 identiZies13 each13 individual13 13 All13 rows13 must13 contain13 an13 ID13 and13 all13 records13 from13 one13 individual13 must13 be13 contiguous13 13 Any13 subsequent13 row13 that13 begins13 with13 ldquordquo13 will13 be13 ignored13 which13 is13 helpful13 if13 you13 want13 to13 exclude13 data13 from13 the13 analysis13 but13 preserve13 the13 integrity13 of13 the13 original13 dataset13 or13 to13 add13 comment13 lines13 13 IDs13 should13 be13 1113 characters13 or13 less13 but13 may13 be13 any13 alphanumeric13 combination13 13 There13 can13 be13 at13 most13 80013 subjects13 per13 run

EVID13 This13 is13 the13 event13 ID13 Zield13 13 It13 can13 be13 013 113 or13 413 13 Every13 row13 must13 have13 an13 entry13 013 =13 observation13 113 =13 input13 (eg13 dose)13 213 313 are13 currently13 unused13 413 =13 reset13 where13 all13 compartment13 values13 are13 set13 to13 013 and13 the13 time13 counter13 is13 reset13 to13 013 13 This13 is13

useful13 when13 an13 individual13 has13 multiple13 sampling13 episodes13 that13 are13 widely13 spaced13 in13 time13 with13 no13 new13 information13 gathered13 13 This13 is13 a13 dose13 event13 so13 dose13 information13 needs13 to13 be13 complete

TIME13 This13 is13 the13 elapsed13 time13 in13 decimal13 hours13 since13 the13 Zirst13 event13 13 It13 is13 not13 currently13 clock13 time13 (eg13 2130)13 although13 this13 is13 planned13 13 Every13 row13 must13 have13 an13 entry13 and13 within13 a13 given13 ID13 rows13 must13 be13 sorted13 chronologically13 earliest13 to13 latest13 13

DUR13 This13 is13 the13 duration13 of13 an13 infusion13 in13 hours13 13 If13 EVID=113 there13 must13 be13 an13 entry13 otherwise13 it13 is13 ignored13 13 For13 a13 bolus13 (ie13 an13 oral13 dose)13 set13 the13 value13 equal13 to13 0

Userrsquos13 Guide13 13 913 13

DOSE13 This13 is13 the13 dose13 amount13 13 If13 EVID=113 there13 must13 be13 an13 entry13 otherwise13 it13 is13 ignoredADDL13 This13 speciZies13 the13 number13 of13 additional13 doses13 to13 give13 at13 interval13 II13 13 It13 may13 be13 missing13 for13 dose13

events13 (EVID=113 or13 4)13 in13 which13 case13 it13 is13 assumed13 to13 be13 013 13 It13 is13 ignored13 for13 observation13 (EVID=0)13 events13 13 Be13 sure13 to13 adjust13 the13 time13 entry13 for13 the13 subsequent13 row13 if13 necessary13 to13 account13 for13 the13 extra13 doses13 13 If13 set13 to13 -shy‐113 the13 dose13 is13 assumed13 to13 be13 given13 under13 steady-shy‐state13 conditions13 13 ADDL=-shy‐113 can13 only13 be13 used13 for13 the13 Zirst13 dose13 event13 for13 a13 given13 subject13 or13 an13 EVID=413 event13 as13 you13 cannot13 suddenly13 be13 at13 steady13 state13 in13 the13 middle13 of13 dosing13 record13 unless13 all13 compartmentstimes13 are13 reset13 to13 013 (as13 for13 an13 EVID=413 event)

II13 This13 is13 the13 interdose13 interval13 and13 is13 only13 relevant13 if13 ADDL13 is13 not13 equal13 to13 013 in13 which13 case13 it13 cannot13 be13 missing13 13 If13 ADDL=013 or13 is13 missing13 II13 is13 ignored

INPUT13 This13 deZines13 which13 input13 (ie13 drug)13 the13 DOSE13 corresponds13 to13 13 Inputs13 are13 deZined13 in13 the13 model13 Zile

OUT 13 This13 is13 the13 observation13 or13 output13 value13 13 If13 EVID=013 there13 must13 be13 an13 entry13 if13 missing13 this13 must13 be13 coded13 as13 -shy‐9913 13 It13 will13 be13 ignored13 for13 any13 other13 EVID13 and13 therefore13 can13 be13 ldquordquo13 13 There13 can13 be13 at13 most13 15013 observations13 for13 a13 given13 subject

OUTEQ13 This13 is13 the13 output13 equation13 number13 that13 corresponds13 to13 the13 OUT13 value13 13 Output13 equations13 are13 deZined13 in13 the13 model13 Zile

C013 C113 C213 C313 These13 are13 the13 coefZicients13 for13 the13 assay13 error13 polynomial13 for13 that13 observation13 13 Each13 subject13 may13 have13 up13 to13 one13 set13 of13 coefZicients13 per13 output13 equation13 13 If13 more13 than13 one13 set13 is13 detected13 for13 a13 given13 subject13 and13 output13 equation13 the13 last13 set13 will13 be13 used13 13 If13 there13 are13 no13 available13 coefZicients13 these13 cells13 may13 be13 left13 blank13 or13 Zilled13 with13 ldquordquo13 as13 a13 placeholder

COV13 Any13 column13 after13 the13 assay13 error13 coefZicients13 is13 assumed13 to13 be13 a13 covariate13 one13 column13 per13 covariate

Model13 Files

Model13 Ziles13 for13 Pmetrics13 are13 ultimately13 Fortran13 text13 Ziles13 with13 a13 header13 version13 of13 TSMULT13 13 As13 of13 Pmetrics13 version13 03013 we13 have13 adopted13 a13 very13 simple13 user13 format13 that13 Pmetrics13 will13 use13 to13 generate13 the13 Fortran13 code13 automatically13 for13 you13 13 Version13 0413 additionally13 eliminates13 the13 previously13 separate13 instruction13 Zile13 A13 model13 library13 is13 available13 on13 our13 website13 at13 httpwwwlapkorgpmetricsphp13 13 Naming13 your13 model13 files13 The13 default13 model13 Zile13 name13 is13 ldquomodeltxtrdquo13 but13 you13 can13 call13 them13 whatever13 you13 wish13 13 However13 please13 keep13 the13 number13 of13 characters13 in13 the13 model13 Uile13 name13 le13 813 When13 you13 use13 a13 model13 Zile13 in13 NPrun() ITrun ERRrun() or SIMrun()13 Pmetrics13 will13 make13 a13 Fortran13 model13 Zile13 of13 the13 same13 name13 temporarily13 renaming13 your13 Zile13 13 At13 the13 end13 of13 the13 run13 your13 original13 model13 Zile13 will13 be13 in13 the13 inputs13 subfolder13 of13 the13 run13 folder13 and13 the13 generated13 Fortran13 model13 Zile13 will13 be13 called13 ldquomodelforrdquo13 and13 moved13 to13 the13 etc13 subfolder13 of13 the13 run13 folder13 13 If13 your13 model13 is13 called13 ldquomymodeltxtrdquo13 then13 the13 Fortran13 Zile13 will13 be13 ldquomymodelforrdquoYou13 can13 still13 use13 appropriate13 Fortran13 model13 Ziles13 directly13 but13 we13 suggest13 you13 keep13 the13 for13 extension13 for13 all13 Fortran13 Ziles13 to13 avoid13 confusion13 with13 the13 new13 format13 13 If13 you13 use13 a13 for13 Zile13 as13 your13 model13 you13 will13 have13 to13 specify13 its13 name13 explicitly13 in13 the13 NPrun() ITrun ERRrun() or SIMrun()13 command13 since13 the13 default13 model13 name13 again13 is13 ldquomodeltxtrdquo13 13 If13 you13 use13 a13 for13 Zile13 directly13 it13 will13 be13 in13 the13 inputs13 subfolder13 of13 the13 run13 folder13 not13 in13 etc13 since13 you13 did13 not13 use13 the13 simpler13 template13 as13 your13 model13 Zile

Structure13 of13 model13 files13 The13 new13 model13 Zile13 is13 a13 text13 Zile13 with13 1113 blocks13 each13 marked13 by13 13 followed13 by13 a13 header13 tagPRImary13 variablesCOVariatesSECcondary13 variablesBOLus13 inputsINItial13 conditions

Userrsquos13 Guide13 13 1013 13

F13 (bioavailability)LAG13 timeDIFferential13 equationsOUTputsERRorEXTraFor13 each13 header13 only13 the13 capital13 letters13 are13 required13 for13 recognition13 by13 Pmetrics13 The13 blocks13 can13 be13 in13 any13 order13 and13 header13 names13 are13 case-shy‐insensitive13 (ie13 the13 capitalization13 here13 is13 just13 to13 show13 which13 letters13 are13 required)13 Fortran13 is13 also13 case-shy‐insensitive13 so13 in13 variable13 names13 and13 expressions13 case13 is13 ignored13 13 Details13 of13 each13 block13 are13 next13 followed13 by13 a13 complete13 example

Primary13 variables

Primary13 variables13 are13 the13 model13 parameters13 that13 are13 to13 be13 estimated13 by13 Pmetrics13 or13 are13 designated13 as13 Zixed13 parameters13 with13 user13 speciZied13 values13 It13 should13 be13 a13 list13 of13 variable13 names13 one13 name13 to13 a13 line13 Variable13 names13 should13 be13 1113 characters13 or13 fewer13 Some13 variable13 names13 are13 reserved13 for13 use13 by13 Pmetrics13 and13 cannot13 be13 used13 as13 primary13 variable13 names13 13 13 The13 number13 of13 primary13 variables13 must13 be13 between13 213 and13 3213 with13 at13 most13 3013 random13 or13 2013 Uixed13 13 On13 each13 row13 following13 the13 variable13 name13 include13 the13 range13 for13 the13 parameter13 that13 deZines13 the13 search13 space13 13 For13 NPAG13 this13 is13 absolute13 ie13 the13 algorithm13 will13 not13 search13 outside13 this13 range13 13 For13 IT2B13 the13 range13 is13 a13 starting13 range13 13 The13 simulator13 will13 ignore13 the13 ranges13 ExamplePriKE13 013 5V13 00113 100KA13 013 5KCP13 013 5KPC13 013 13 5Tlag113 013 2IC313 013 10000FA113 013 1

Covariates

Covariates13 are13 subject13 speciZic13 data13 such13 as13 body13 weight13 contained13 in13 the13 data13 csv13 Zile13 The13 covariate13 names13 which13 are13 the13 column13 names13 in13 the13 data13 Zile13 can13 be13 included13 here13 for13 use13 in13 secondary13 variable13 equations13 The13 order13 should13 be13 the13 same13 as13 in13 the13 data13 Zile13 and13 although13 the13 names13 do13 not13 have13 to13 be13 the13 same13 we13 strongly13 encourage13 you13 to13 make13 them13 the13 same13 to13 avoid13 confusionCovariates13 are13 applied13 at13 each13 dose13 event13 13 The13 Zirst13 dose13 event13 for13 each13 subject13 must13 have13 a13 value13 for13 every13 covariate13 in13 the13 data13 Zile13 13 By13 default13 missing13 covariate13 values13 for13 subsequent13 dose13 events13 are13 linearly13 interpolated13 between13 existing13 values13 or13 carried13 forward13 if13 the13 Zirst13 value13 is13 the13 only13 non-shy‐missing13 entry13 13 To13 suppress13 interpolation13 and13 carry13 forward13 the13 previous13 value13 in13 a13 piece-shy‐wise13 constant13 fashion13 include13 an13 exclamation13 point13 ()13 in13 any13 declaration13 lineNote13 that13 any13 covariate13 relationship13 to13 any13 parameter13 may13 be13 described13 as13 the13 user13 wishes13 by13 mathematical13 equations13 and13 Fortran13 code13 allowing13 for13 exploration13 of13 complex13 non-shy‐linear13 time-shy‐dependent13 andor13 conditional13 relationshipsExampleCovwtcypIC()

Userrsquos13 Guide13 13 1113 13

where13 IC13 will13 be13 piece-shy‐wise13 constant13 and13 the13 other13 two13 will13 be13 linearly13 interpolated13 for13 missing13 values

Secondary13 variables

Secondary13 variables13 are13 those13 that13 are13 deZined13 by13 equations13 that13 are13 combinations13 of13 primary13 covariates13 and13 other13 secondary13 variables13 If13 using13 other13 secondary13 variables13 deZine13 them13 Zirst13 within13 this13 block13 Equation13 syntax13 must13 be13 Fortran13 It13 is13 permissible13 to13 have13 conditional13 statements13 but13 because13 expressions13 in13 this13 block13 are13 translated13 into13 variable13 declarations13 in13 Fortran13 expressions13 other13 than13 of13 the13 form13 X13 =13 function(Y)13 must13 be13 preZixed13 by13 a13 +13 and13 contain13 only13 variables13 which13 have13 been13 previously13 deZined13 in13 the13 Primary13 Covariate13 or13 Secondary13 blocksExampleSecCL13 =13 Ke13 13 V13 13 wt075+IF(cyp13 GT13 1)13 CL13 =13 CL13 13 cyp

Bolus13 inputs

By13 default13 inputs13 with13 DUR13 (duration)13 of13 013 in13 the13 data13 csv13 Zile13 are13 delivered13 instantaneously13 to13 the13 model13 compartment13 equal13 to13 the13 input13 number13 ie13 input13 113 goes13 to13 compartment13 113 input13 213 goes13 to13 compartment13 213 etc13 This13 can13 be13 overridden13 with13 NBOLUS(input13 number)13 =13 compartment13 numberExampleBolNBCOMP(1)13 =13 2

Ini1al13 condi1ons

By13 default13 all13 model13 compartments13 have13 zero13 amounts13 at13 time13 013 This13 can13 be13 changed13 by13 specifying13 the13 compartment13 amount13 as13 X()13 =13 expression13 where13 13 is13 the13 compartment13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignoredExampleIniX(2)13 =13 ICV13 (ie13 IC13 is13 a13 covariate13 with13 the13 measured13 trough13 concentration13 prior13 to13 an13 observed13 dose)X(3)13 =13 IC313 (ie13 IC313 is13 a13 Zitted13 amount13 in13 this13 unobserved13 compartment)In13 the13 Zirst13 case13 the13 initial13 condition13 for13 compartment13 213 becomes13 the13 value13 of13 the13 IC13 covariate13 (deZined13 in13 Covariate13 block)13 multiplied13 by13 the13 current13 estimate13 of13 V13 during13 each13 iteration13 13 This13 is13 useful13 when13 a13 subject13 has13 been13 taking13 a13 drug13 as13 an13 outpatient13 and13 comes13 in13 to13 the13 lab13 for13 PK13 sampling13 with13 measurement13 of13 a13 concentration13 immediately13 prior13 to13 a13 witnessed13 dose13 which13 is13 in13 turn13 followed13 by13 more13 sampling13 13 In13 this13 case13 IC13 or13 any13 other13 covariate13 can13 be13 set13 to13 the13 initial13 measured13 concentration13 and13 if13 V13 is13 the13 volume13 of13 compartment13 213 the13 initial13 condition13 (amount)13 in13 compartment13 213 will13 now13 be13 set13 to13 the13 measured13 concentration13 of13 drug13 multiplied13 by13 the13 estimated13 volume13 for13 each13 iteration13 until13 convergenceIn13 the13 second13 case13 the13 initial13 condition13 for13 compartment13 313 becomes13 another13 variable13 IC313 deZined13 in13 the13 Primary13 block13 to13 Zit13 in13 the13 model13 given13 the13 observed13 data

F13 (bioavailability)

Specify13 the13 bioavailability13 term13 if13 present13 Use13 the13 form13 FA()13 =13 expression13 where13 13 is13 the13 input13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignored

Userrsquos13 Guide13 13 1213 13

ExampleFFA(1)13 =13 FA1

Lag13 1me

Specify13 the13 lag13 term13 if13 present13 which13 is13 the13 delay13 after13 an13 absorbed13 dose13 before13 observed13 concentrations13 Use13 the13 form13 TLAG()13 =13 expression13 where13 13 is13 the13 input13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignoredExampleLagTLAG(1)13 =13 Tlag1

Differen1al13 equa1ons

Specify13 a13 model13 in13 terms13 of13 ordinary13 differential13 equations13 in13 Fortran13 format13 XP()13 is13 the13 notation13 for13 dX()dt13 where13 13 is13 the13 compartment13 number13 X()13 is13 the13 amount13 in13 the13 compartment13 There13 can13 be13 a13 maximum13 of13 2013 such13 equationsExampleDifXP(1)13 =13 -shy‐KAX(1)XP(2)13 =13 RATEIV(1)13 +13 KAX(1)13 -shy‐13 (KE+KCP)X(2)13 +13 KPCX(3)XP(3)13 =13 KCPX(2)13 -shy‐13 KPCX(3)RATEIV(1)13 is13 the13 notation13 to13 indicate13 an13 infusion13 of13 input13 113 (typically13 drug13 1)13 13 The13 duration13 of13 the13 infusion13 and13 total13 dose13 is13 deZined13 in13 the13 data13 csv13 Zile13 Up13 to13 713 inputs13 are13 currently13 allowed13 13 These13 can13 be13 used13 in13 the13 model13 Zile13 as13 RATEIV(1)13 RATEIV(2)13 etc13 13 The13 compartments13 for13 13 receiving13 the13 inputs13 of13 oral13 (bolus)13 doses13 are13 deZined13 in13 the13 Bolus13 block

Outputs

Output13 equations13 in13 Fortran13 format13 Outputs13 are13 of13 the13 form13 Y()13 =13 expression13 where13 13 is13 the13 output13 equation13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignored13 There13 can13 be13 a13 maximum13 of13 613 outputs13 13 They13 are13 referred13 to13 as13 Y(1)13 Y(2)13 etcExampleOutY(1)13 =13 X(2)V

Error

This13 block13 contains13 all13 the13 information13 Pmetrics13 requires13 for13 the13 structure13 of13 the13 error13 model13 13 In13 Pmetrics13 each13 observation13 is13 weighted13 by13 1error213 13 13 There13 are13 two13 choices13 for13 the13 error13 term

113 13 error13 =13 SD13 13 gamma213 13 error13 =13 (SD213 +13 lamda2)0513 (Note13 that13 lambda13 is13 only13 available13 in13 NPAG13 currently)

where13 SD13 is13 the13 standard13 deviation13 (SD)13 of13 each13 observation13 [obs]13 and13 gamma13 and13 lambda13 are13 terms13 to13 capture13 extra13 process13 noise13 related13 to13 the13 observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 SD13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 The13 13 values13 for13 the13 coefZicients13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13

Userrsquos13 Guide13 13 1313 13

coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly() 13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0In13 the13 multiplicative13 model13 13 gamma13 is13 a13 scalar13 on13 SD13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 Lambda13 is13 an13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 We13 tend13 to13 prefer13 lambda

To13 specify13 the13 model13 in13 this13 block13 the13 Zirst13 line13 needs13 to13 be13 either13 L=[number]13 or13 G=[number]13 for13 a13 lambda13 or13 gamma13 error13 model13 13 The13 [number]13 term13 is13 the13 starting13 value13 for13 lambda13 or13 gamma13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present13 13 For13 gamma13 good13 starting13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality13 13 If13 you13 include13 an13 exclamation13 point13 ()13 in13 the13 declaration13 then13 lambda13 or13 gamma13 will13 be13 Zixed13 and13 not13 estimated13 13 Note13 that13 you13 can13 only13 Zix13 lambda13 currently13 to13 zeroThe13 next13 line(s)13 contain13 the13 values13 for13 C013 C113 C213 and13 C313 separated13 by13 commas13 13 There13 should13 be13 one13 line13 of13 coefZicients13 for13 each13 output13 equation13 13 By13 default13 Pmetrics13 will13 use13 values13 for13 these13 coefZicients13 found13 in13 the13 data13 Zile13 13 If13 none13 are13 present13 or13 if13 the13 model13 declaration13 line13 contains13 an13 exclamation13 point13 ()13 the13 values13 here13 will13 be13 used

Example13 113 estimated13 lambda13 starting13 at13 0413 one13 output13 use13 data13 Zile13 coefZicients13 but13 if13 missing13 use13 010100ErrL=04010100

Example13 213 Zixed13 gamma13 of13 213 two13 outputs13 use13 data13 Zile13 coefZicients13 but13 if13 missing13 use13 01010013 for13 the13 Zirst13 output13 but13 use13 0313 0113 013 013 for13 output13 213 regardless13 of13 what13 is13 in13 the13 data13 ZileErrG=2010100030100

Extra

This13 block13 is13 for13 advanced13 Fortran13 programmers13 only13 13 Occasionally13 for13 very13 complex13 models13 additional13 Fortran13 subroutines13 are13 required13 13 They13 can13 be13 placed13 here13 13 The13 code13 must13 specify13 complete13 Fortran13 subroutines13 which13 can13 be13 called13 from13 other13 blocks13 with13 appropriate13 call13 functions13 13

Reserved13 Names

The13 following13 cannot13 be13 used13 as13 primary13 covariate13 or13 secondary13 variable13 names13 They13 can13 be13 used13 in13 equations13 however

Reserved13 Variable Func1on13 in13 Pmetricsndim internal

t time

Userrsquos13 Guide13 13 1413 13

x array13 of13 compartment13 amounts

xp array13 of13 Zirst13 derivative13 of13 compartment13 amounts

rpar internal

ipar internal

p array13 of13 primary13 parameters

r input13 rates

b input13 boluses

npl internal

numeqt output13 equation13 number

ndrug input13 number

nadd covariate13 number

rateiv intravenous13 input13 for13 inputs13 when13 DURgt013 in13 data13 Ziles

cv covariate13 values13 array

n number13 of13 compartments

nd internal

ni internal

nup internal

nuic internal

np number13 of13 primary13 parameters

nbcomp bolus13 compartment13 array

psym names13 of13 primary13 parameters

fa biovailability

tlag lag13 time

tin internal

tout internal

Complete13 Example

Here13 is13 a13 complete13 example13 of13 a13 model13 Zile13 as13 of13 Pmetrics13 version13 04013 and13 higher

Userrsquos13 Guide13 13 1513 13

NotesBy13 omitting13 a13 Diffeq13 block13 with13 ODEs13 Pmetrics13 understands13 that13 you13 are13 specifying13 the13 model13 to13 be13 solved13 algebraically13 In13 this13 case13 at13 least13 KE13 and13 V13 must13 be13 in13 the13 Primary13 or13 Secondary13 variables13 KA13 KCP13 and13 KPC13 are13 optional13 and13 specify13 absorption13 and13 transfer13 to13 and13 from13 the13 central13 to13 a13 peripheral13 compartment13 respectively

PriKE13 013 5V013 0113 100KA13 013 5Tlag113 013 3Cov13 wt

SecV13 =13 V0wt

LagTLAG(1)13 =13 Tlag1

OutY(1)13 =13 X(2)V

ErrL=04010100

Userrsquos13 Guide13 13 1613 13

Brief13 Fortran13 Tutorial

Much13 more13 detailed13 help13 is13 available13 from13 httpwwwcsmtuedu~sheneCOURSEScs201NOTESfortranhtml

Arithmetic Operator Meaning

+ addition

- subtraction

multiplication

division

exponentiation

Relational Operator Alternative Operator Meaning

lt LT less than

lt= LE less than or equal

gt GT greater than

gt= GE greater than or equal

== EQ equal

= NE not equal

Selective Execution Example

IF (logical-expression) one-statement IF (T gt= 100) CL = 10

IF (logical-expression) THEN statementsEND IF

IF (T gt= 100) THEN CL = 10 V = 10END IF

IF (logical-expression) THEN statements-1ELSE statements-2END IF

IF (T gt= 100) THEN CL = 10ELSE CL = CLEND IF

Userrsquos13 Guide13 13 1713 13

How to use R and PmetricsSeCng13 up13 a13 Pmetrics13 project

When13 beginning13 a13 new13 modeling13 project13 it13 is13 convenient13 to13 use13 the13 command13 PMtree(ldquoproject namerdquo)13 13 This13 command13 will13 set13 up13 a13 new13 directory13 in13 the13 current13 working13 directory13 named13 whatever13 you13 have13 included13 as13 the13 ldquoproject13 namerdquo13 13 For13 example13 a13 directory13 called13 ldquoDrugXrdquo13 will13 be13 created13 by13 PMtree(ldquoDrugXrdquo)13 13 Beneath13 this13 directory13 several13 subdirectories13 will13 be13 also13 created13 Rscript13 Runs13 Sim13 and13 src13 13 The13 Rscript13 subdirectory13 will13 contain13 a13 skeleton13 R13 script13 to13 begin13 Pmetrics13 runs13 in13 the13 new13 project13 13 The13 Runs13 subdirectory13 should13 contain13 all13 Ziles13 required13 for13 a13 run13 (described13 next)13 and13 it13 will13 also13 contain13 the13 resulting13 numerically13 ordered13 run13 directories13 created13 after13 each13 Pmetrics13 NPAG13 or13 IT2B13 run13 13 The13 Sim13 subdirectory13 can13 contain13 any13 Ziles13 related13 to13 simulations13 and13 the13 src13 subdirectory13 should13 contain13 original13 and13 manipulated13 source13 data13 Ziles13 13 Of13 course13 you13 are13 free13 to13 edit13 this13 directory13 tree13 structure13 as13 you13 please13 or13 make13 your13 own13 entirely

GeCng13 the13 required13 files13 to13 run13 Pmetrics

When13 you13 wish13 to13 execute13 a13 Pmetrics13 run13 you13 must13 ensure13 that13 appropriate13 Pmetrics13 model13 txt13 and13 data13 csv13 Ziles13 are13 in13 the13 working13 directory13 ie13 the13 Runs13 subdirectory13 of13 the13 project13 directory13 13 13 13 R13 can13 be13 used13 to13 help13 prepare13 the13 data13 csv13 Zile13 by13 importing13 and13 manipulating13 spreadsheets13 (eg13 readcsv())13 13 The13 Pmetrics13 function13 PMcheck()13 can13 be13 used13 to13 check13 a13 csv13 Zile13 or13 an13 R13 dataframe13 that13 is13 to13 be13 saved13 as13 a13 Pmetrics13 data13 13 csv13 Zile13 for13 errors13 13 13 13 13 13 It13 can13 also13 check13 a13 model13 Zile13 for13 errors13 in13 the13 context13 of13 a13 dataZile13 eg13 covariates13 that13 do13 not13 match13 13 PMfixMatrix()13 attempts13 to13 automatically13 rid13 data13 Ziles13 of13 errors13 13 The13 function13 PMwriteMatrix() 13 can13 be13 used13 to13 write13 the13 R13 data13 object13 in13 the13 correct13 format13 for13 use13 by13 IT2B13 NPAG13 or13 the13 Simulator13 13 You13 can13 also13 download13 sample13 data13 and13 scripts13 from13 the13 Pmetrics13 downloads13 section13 of13 our13 website13 once13 you13 sign13 in13 with13 your13 LAPK13 user13 email13 address13 and13 password13 13 Edit13 prior13 versions13 of13 model13 Ziles13 to13 make13 new13 model13 Ziles

Using13 scripts13 to13 control13 Pmetrics

As13 you13 will13 see13 in13 the13 skeleton13 R13 script13 made13 by13 PMtree() and13 placed13 in13 the13 Rscript13 subdirectory13 if13 this13 is13 a13 Zirst-shy‐time13 run13 the13 R13 commands13 to13 run13 IT2B13 or13 NPAG13 are13 as13 follows13 13 Recall13 that13 the13 ldquordquo13 character13 is13 a13 comment13 character

library(Pmetrics)Run 1 - add your run description heresetwd(ldquoworking directoryrdquo)NPrun() for NPAG or ITrun() for IT2B

The13 Zirst13 line13 will13 load13 the13 Pmetrics13 library13 of13 functions13 13 The13 second13 line13 sets13 the13 working13 directory13 to13 the13 speciZied13 path13 13 The13 third13 line13 generates13 the13 batch13 Zile13 to13 run13 NPAG13 or13 IT2B13 and13 saves13 it13 to13 the13 working13 directory13

NOTE13 13 On13 Mac13 systems13 the13 batch13 Zile13 will13 be13 automatically13 launched13 in13 a13 Terminal13 window13 13 On13 Windows13 systems13 the13 batch13 Zile13 must13 be13 launched13 manually13 by13 double13 clicking13 the13 np_runbat13 or13 it_runbat13 Zile13 in13 the13 working13 directory

ITrun() 13 and13 NPrun()13 both13 return13 the13 full13 path13 of13 the13 output13 directory13 to13 the13 clipboard13 13 By13 default13 runs13 are13 placed13 in13 folders13 numbered13 sequentially13 beginning13 with13 ldquo1rdquoNow13 the13 output13 of13 IT2B13 or13 NPAG13 needs13 to13 be13 loaded13 into13 R13 so13 the13 next13 command13 does13 this

NPload(run_number) or ITload(run_number)

Details13 of13 these13 commands13 and13 what13 is13 loaded13 are13 described13 in13 the13 R13 documentation13 (NPload 13 or13 ITload)13 and13 in13 the13 following13 section13 13 The13 run_number13 should13 be13 included13 within13 the13 parentheses13 to13 be13 appended13 to13 the13 names13

Userrsquos13 Guide13 13 1813 13

of13 loaded13 R13 objects13 allowing13 for13 comparison13 between13 runs13 eg13 NPload(1)13 13 Finally13 at13 this13 point13 other13 Pmetrics13 commands13 can13 be13 added13 to13 the13 script13 to13 process13 the13 data13 such13 as13 the13 following

plot(final1)plot(cycle1)plot(op1type=rdquopoprdquo) or plot(op1$pop1)plot(op1) default is to plot posterior predictions for output 1plot(op1type=rdquopoprdquoresid=T)

Of13 course13 the13 full13 power13 of13 R13 can13 be13 used13 in13 scripts13 to13 analyze13 data13 but13 these13 simple13 statements13 serve13 as13 examplesIf13 you13 do13 not13 use13 the13 PMtree() structure13 we13 suggest13 that13 the13 R13 script13 for13 a13 particular13 project13 be13 saved13 into13 a13 folder13 called13 ldquoRscriptrdquo13 or13 some13 other13 meaningful13 name13 in13 the13 working13 directory13 13 Folders13 are13 not13 be13 moved13 by13 the13 batch13 Zile13 13 Within13 the13 script13 number13 runs13 sequentially13 and13 use13 comments13 liberally13 to13 13 distinguish13 runs13 as13 shown13 below

library(Pmetrics)

Run 1 - Ka Kel V all subjectssetwd(ldquoworking directoryrdquo)NPrun() assumes model=rdquomodeltxtrdquo and data=rdquodatacsvrdquoNPload(1)

Remember13 in13 R13 that13 the13 command13 example(function) will13 provide13 examples13 for13 the13 speciZied13 function13 13 Most13 Pmetrics13 functions13 have13 examples

Pmetrics Data ObjectsAfter13 a13 successful13 IT2B13 or13 NPAG13 run13 an13 R13 dataZile13 is13 saved13 in13 the13 output13 subdirectory13 of13 the13 newly13 created13 numerically13 ordered13 folder13 in13 the13 working13 directory13 13 After13 IT2B13 this13 Zile13 is13 called13 ldquoIT2BoutRdatardquo13 and13 after13 NPAG13 it13 is13 called13 ldquoNPAGoutRdatardquo13 13 As13 mentioned13 in13 the13 previous13 section13 these13 data13 Ziles13 can13 be13 loaded13 by13 ensuring13 that13 the13 Runs13 folder13 is13 set13 as13 the13 working13 directory13 and13 then13 using13 the13 Pmetrics13 commands13 ITload(run_num)13 or13 NPload(run_num)

Both13 commands13 load13 their13 respective13 Rdata13 Ziles13 into13 R13 making13 the13 contained13 objects13 available13 for13 plotting13 and13 other13 analysisObjects13 loaded13 by13 ITload(run_num) and NPload(run_num)

Objects Variables Comments

op13 (class13 PMop13 list) $pop113 $post113 Population13 and13 posterior13 predictions13 for13 each13 output13 equation13 ie13 113 213

13 $id Subject13 identiZication

13 $time Observation13 time13 in13 relative13 decimal13 hours

13 $obs Observation

13 $pred Prediction13 based13 on13 median13 of13 population13 or13 posterior13 parameter13 value13 distributions

Userrsquos13 Guide13 13 1913 13

Objects Variables Comments

13 $block Dosing13 block13 usually13 113 unless13 data13 Zile13 contains13 EVID=413 dose13 reset13 events13 in13 which13 case13 each13 such13 reset13 within13 a13 given13 ID13 will13 increment13 the13 dosing13 block13 by13 113 for13 that13 ID

13 $obsSD Calculated13 standard13 deviation13 (error)13 of13 the13 observation13 based13 on13 the13 assay13 error13 polynomial

13 $d Difference13 between13 pred13 and13 obs

13 $ds Squared13 difference13 between13 pred13 and13 obs

13 $wd $d13 weighted13 by13 the13 $obsSD

13 $wds $ds13 weighted13 by13 the13 $obsSD

Zinal13 (class13 PMZinal13 list) $popPoints (NPAG13 only)13 Dataframe13 of13 the13 Zinal13 cycle13 joint13 population13 density13 of13 grid13 points13 with13 column13 names13 equal13 to13 the13 name13 of13 each13 random13 parameter13 plus13 $prob13 for13 the13 associated13 probability13 of13 that13 point13

$popMean The13 Zinal13 cycle13 mean13 for13 each13 random13 parameter13 distribution

$popSD The13 Zinal13 cycle13 standard13 deviation13 for13 each13 random13 parameter13 distribution

$popCV The13 Zinal13 cycle13 coefZicient13 of13 variation13 for13 each13 random13 parameter13 distribution

$popVar The13 Zinal13 cycle13 variance13 for13 each13 random13 parameter13 distribution

$popCov The13 Zinal13 cycle13 covariance13 matrix13 for13 each13 random13 parameter13 distribution

$popCor The13 Zinal13 cycle13 correlation13 matrix13 for13 each13 random13 parameter13 distribution

$popMedian The13 Zinal13 cycle13 median13 for13 each13 random13 parameter13 distribution

$gridpts (NPAG13 only)13 The13 initial13 number13 of13 support13 points

$ab Matrix13 of13 boundaries13 for13 random13 parameter13 values13 13 For13 NPAG13 this13 is13 speciZied13 by13 the13 user13 prior13 to13 the13 run13 for13 IT2B13 it13 is13 calculated13 as13 a13 user13 speciZied13 multiple13 of13 the13 SD13 for13 the13 parameter13 value13 distribution

Userrsquos13 Guide13 13 2013 13

Objects Variables Comments

cycle13 (class13 PMcycle13 list) $names Vector13 of13 names13 of13 the13 random13 parameters

$ll Matrix13 of13 cycle13 number13 and13 -shy‐2Log-shy‐likelihood13 at13 each13 cycle

$gamlam A13 matrix13 of13 cycle13 number13 and13 gamma13 or13 lambda13 at13 each13 cycle13 (see13 item13 1613 under13 NPAG13 Runs13 below13 for13 a13 discussion13 of13 gamma13 and13 lambda)

$mean A13 matrix13 of13 cycle13 number13 and13 the13 mean13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 mean

$sd A13 matrix13 of13 cycle13 number13 and13 the13 standard13 deviation13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$median A13 matrix13 of13 cycle13 number13 and13 the13 median13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$aic A13 matrix13 of13 cycle13 number13 and13 Akaike13 Information13 Criterion13 at13 each13 cycle

$bic A13 matrix13 of13 cycle13 number13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle

cov13 (class13 PMcov13 dataframe)

$id Subject13 identiZication

$time Time13 for13 each13 covariate13 entry

covariates Covariate13 values13 for13 each13 subject13 at13 each13 time13 extracted13 from13 the13 raw13 data13 Zile

parameters Mean13 median13 or13 mode13 of13 Bayesian13 posterior13 distribution13 for13 each13 random13 parameter13 in13 the13 model13 13 Mode13 summaries13 are13 available13 for13 NPAG13 output13 only13 and13 the13 default13 is13 median13 13 Values13 are13 recycled13 for13 each13 row13 within13 a13 given13 subject13 with13 the13 number13 of13 rows13 driven13 by13 the13 number13 of13 covariate13 entries

Userrsquos13 Guide13 13 2113 13

Objects Variables Comments

pop13 (class13 PMpop13 dataframe)

post13 (class13 PMpost13 dataframe)

NPAG13 only

$id Subject13 identiZication

$pred113 Population13 prior13 (PMpop)13 or13 Bayesian13 posterior13 (PMpost)13 predictions13 for13 each13 output13 equation13 based13 on13 mean13 median13 and13 mode13 as13 speciZied13 by13 the13 user13 and13 with13 frequency13 also13 speciZied13 by13 the13 user13 in13 the13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

$block Same13 as13 for13 PMop13 objects13 above

NPdata13 (class13 NPAG13 list)13 ITdata13 (class13 IT2B13 list

Raw13 data13 used13 to13 make13 the13 above13 objects13 13 Please13 use13 NPparse13 or13 ITparse13 in13 R13 for13 discussion13 of13 the13 data13 contained13 in13 these13 objects

Since13 R13 is13 an13 object13 oriented13 language13 to13 access13 the13 observations13 in13 a13 PMop13 object13 for13 example13 use13 the13 following13 syntax13 op$post1$obsNote13 that13 you13 will13 place13 an13 integer13 within13 the13 parentheses13 of13 the13 loading13 functions13 eg13 NPload(1)13 which13 will13 sufZix13 all13 the13 above13 objects13 with13 that13 integer13 eg13 op113 Zinal113 NPdata113 13 This13 allows13 several13 models13 to13 be13 loaded13 into13 R13 simultaneously13 each13 with13 a13 unique13 sufZix13 and13 which13 can13 be13 compared13 with13 the13 PMcompare()13 command13 (see13 Model13 Diagnostics13 below)

Making New Pmetrics ObjectsOnce13 you13 have13 loaded13 the13 raw13 (NPdata13 or13 ITdata)13 or13 processed13 (op13 Uinal13 cycle13 pop13 post)13 data13 objects13 described13 above13 with13 NPload(run_num)13 or13 ITload(run_num)13 should13 you13 wish13 to13 remake13 the13 processed13 objects13 with13 parameters13 other13 than13 the13 defaults13 you13 can13 easily13 do13 so13 with13 the13 make 13 family13 of13 commands13 13 For13 example13 the13 default13 for13 PMop13 observed13 vs13 predicted13 objects13 is13 to13 use13 the13 prediction13 based13 on13 the13 median13 of13 the13 population13 or13 posterior13 distribution13 13 If13 you13 wish13 to13 use13 the13 mean13 of13 the13 distribution13 remake13 the13 PMop13 object13 using makeOP()13 13 If13 you13 wish13 to13 see13 all13 the13 cycle13 information13 in13 a13 PMcycle13 object13 not13 omitting13 the13 Zirst13 1013 of13 cycles13 by13 default13 remake13 it13 using13 makeCycle()13 13

For13 all13 of13 the13 following13 commands13 the13 data13 input13 is13 either13 NPdata13 or13 ITdata13 with13 additional13 function13 arguments13 speciZic13 to13 each13 command13 13 Accessing13 the13 help13 for13 each13 function13 in13 R13 will13 provide13 further13 details13 on13 the13 arguments13 defaults13 and13 output13 of13 each13 command

Userrsquos13 Guide13 13 2213 13

Command Description R13 help

makeAUC Make13 a13 dataframe13 of13 class13 PMauc13 containing13 subject13 ID13 and13 AUC13 from13 a13 variety13 of13 inputs13 including13 objects13 of13 PMop13 PMsim13 or13 a13 suitable13 dataframe

makeAUC

makeCov Generate13 a13 dataframe13 of13 class13 PMcov13 with13 subject-shy‐speciZic13 covariates13 extracted13 from13 the13 data13 csv13 Zile13 This13 object13 can13 be13 plotted13 and13 used13 to13 test13 for13 covariates13 which13 are13 signiZicantly13 associated13 with13 model13 parameters13 13

makeCov

makeCycle Create13 a13 PMcycle13 object13 described13 in13 the13 previous13 section makeCycle

makeFinal Create13 a13 PMZinal13 object13 described13 in13 the13 previous13 section makeFinal

makeOP Create13 a13 PMop13 object13 described13 in13 the13 previous13 section makeOP

makeNCA Create13 a13 dataframe13 (class13 PMnca)13 with13 the13 output13 of13 a13 non-shy‐compartmental13 analysis13 using13 PMpost13 and13 NPAG13 data13 objects13 as13 input13 13 The13 PMnca13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull auc13 Area13 under13 the13 time-shy‐observation13 curve13 using13 the13

trapezoidal13 approximation13 from13 time13 013 until13 the13 second13 dose13 or13 if13 only13 one13 dose13 until13 the13 last13 observation

bull aumc13 Area13 under13 the13 Zirst13 moment13 curvebull k13 Slope13 by13 least-shy‐squares13 linear13 regression13 of13 the13 Zinal13

613 log-shy‐transformed13 observations13 vs13 timebull auclast13 Area13 under13 the13 curve13 from13 the13 time13 of13 the13

last13 observation13 to13 inZinity13 calculated13 as13 [Final13 obs]kbull aumclast13 Area13 under13 the13 Zirst13 moment13 curve13 from13

the13 time13 of13 the13 last13 observation13 to13 inZinitybull aucinf13 Area13 under13 the13 curve13 from13 time13 013 to13 inZinity13

caluculated13 as13 auc13 +13 auclastbull aumcinf13 Area13 under13 the13 Zirst13 moment13 curve13 from13

time13 013 to13 inZinitybull mrt13 Mean13 residence13 time13 calculated13 as13 1kbull cmax13 Maximum13 predicted13 concentration13 after13 the13

Zirst13 dosebull tmax13 Time13 to13 cmaxbull cl13 Clearance13 calculated13 as13 doseaucinfbull vdss13 Volume13 of13 distribution13 at13 steady13 state13

calculated13 as13 clmrtbull thalf13 Half13 life13 of13 elimination13 calculated13 as13 ln(2)kbull dose13 First13 dose13 amount13 for13 each13 subject

makeNCA

Userrsquos13 Guide13 13 2313 13

Command Description R13 help

makeErrorPoly This13 function13 plots13 Zirst13 second13 and13 third13 order13 polynomial13 functions13 Zitted13 to13 pairs13 of13 observations13 and13 associated13 standard13 deviations13 for13 a13 given13 output13 assay13 In13 this13 way13 the13 standard13 deviation13 associated13 with13 any13 observation13 may13 be13 calculated13 and13 used13 to13 appropriately13 weight13 that13 observation13 in13 the13 model13 building13 process13 Observations13 are13 weighted13 by13 the13 reciprocal13 of13 the13 variance13 or13 squared13 standard13 deviation13 13 Output13 of13 the13 function13 is13 a13 plot13 of13 the13 measured13 observations13 and13 Zitted13 polynomial13 curves13 and13 a13 list13 with13 the13 Zirst13 second13 and13 third13 order13 coefZicients

makeErrorPoly

makePTA This13 function13 performs13 a13 Probability13 of13 Target13 Attainment13 analysis13 for13 a13 set13 of13 simulated13 doses13 and13 time-shy‐concentration13 proZiles13 13 Targets13 (eg13 Minimum13 Inhibitory13 Concentrations)13 the13 type13 of13 target13 attainment13 (ie13 time13 above13 target13 Cmaxtarget13 13 AUCtarget13 Cmintarget13 or13 Cxtarget13 where13 x13 is13 any13 time13 point)13 and13 the13 success13 threshold13 (eg13 time13 gt13 0713 or13 Cmaxtarget13 gt13 10)13 can13 all13 be13 speciZied13 13 Output13 is13 a13 list13 (class13 PMpta)13 with13 two13 objectsbull Results13 a13 413 dimensional13 array13 with13 dimension13 size13 of13

[number13 of13 doses13 number13 of13 targets13 number13 of13 simulated13 proZiles13 1]13 which13 gives13 the13 target13 attainment13 (eg13 Cmaxtarget)13 for13 each13 dose13 target13 and13 proZile

bull Outcome13 For13 each13 dose13 and13 target13 a13 summary13 of13 the13 target13 attainment13 for13 all13 the13 proZiles13 including13 mean13 standard13 deviation13 and13 proportion13 above13 the13 success13 threshold

PMpta13 objects13 can13 be13 summarized13 with13 summary(x)13 and13 plotted13 with13 plot(x)13

makePTA

Userrsquos13 Guide13 13 2413 13

Command Description R13 help

makePopmakePost(NPAG13 only)

These13 functions13 create13 dataframes13 of13 class13 PMpop13 and13 PMpost13 respectively13 13 The13 PMpop13 or13 PMpost13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull time13 Times13 for13 predicted13 concentrations13 13 These13

times13 are13 not13 necessarily13 at13 observed13 times13 but13 at13 a13 frequency13 speciZied13 in13 the13 NPAG13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

bull pred113 Predictions13 for13 output13 113 13 For13 PMpop13 objects13 predictions13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 population13 prior13 distribution13 13 For13 PMpost13 objects13 they13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject

bull pred213 pred313 etc13 If13 additional13 outputs13 exist13 they13 will13 each13 be13 columns13 in13 the13 dataframe13 just13 as13 for13 pred113 13

makePopmakePost

NPAG RunsIn13 the13 past13 users13 had13 to13 run13 NPAG13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 NPrun()13 13 However13 if13 NPrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable

1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 NPAG13 creates13 a13 temporary13 instruction13 Zile13 in13 case13 something13 happens13 so13 that13 instructions13 entered13 to13 date13 can13

be13 recovered13 13 Accept13 the13 default13 by13 choosing13 113 13 You13 can13 save13 with13 a13 meaningful13 Zilename13 later13 13 If13 it13 already13 exists13 you13 will13 be13 asked13 if13 you13 wish13 to13 overwrite13 the13 Zile13 which13 is13 usually13 the13 thing13 to13 do

Userrsquos13 Guide13 13 2513 13

8 If13 you13 have13 previously13 run13 IT2B13 you13 can13 automatically13 import13 the13 suggested13 parameter13 ranges13 13 Choose13 113 to13 do13 this13 and13 013 to13 run13 NPAG13 without13 a13 previous13 IT2B13 run81 If13 you13 choose13 option13 113 you13 must13 specify13 the13 name13 of13 a13 FROMxxxx13 Zile13 typically13 FROM000113 that13 you13 can13

Zind13 in13 an13 output13 directory13 after13 a13 successful13 IT2B13 run13 13 Note13 that13 the13 program13 will13 then13 assume13 that13 you13 are13 using13 the13 same13 wrk13 Ziles13 that13 IT2B13 made13 from13 your13 data13 csv13 Zile13 13 It13 is13 strongly13 recommended13 to13 override13 this13 and13 specify13 a13 data13 csv13 Zile13 13 At13 this13 point13 you13 will13 jump13 to13 1013 below13 and13 continue13 on13 however13 your13 answers13 will13 often13 be13 supplied13 by13 the13 instructions13 contained13 in13 the13 FROMxxxx13 Zile13 and13 you13 need13 merely13 conZirm13 them

9 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13 have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 NPrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis91 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13

for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

10 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 NPAG13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

11 Enter13 the13 name13 of13 your13 csv13 Zile13 now12 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile13 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset131 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects132 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry14 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset15 Enter13 the13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo 13 followed13 by13

return16 Select13 how13 you13 would13 like13 to13 model13 assay13 (observation)13 error13 for13 each13 output13 equation13 13 You13 have13 four13 choices13 13

In13 all13 four13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0161 Error13 model13 113 (SD)13 13 Choose13 this13 option13 if13 you13 have13 already13 run13 IT2B13 and13 multiplied13 your13 assay13 error13

polynomial13 by13 gamma13 (see13 next13 option13 for13 a13 description13 of13 gamma)162 Error13 model13 213 (SD13 13 gamma)13 13 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13

observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 If13 you13 choose13 this13 option13 you13 then13 can13 specify13 the13 starting13 value13 of13 gamma13 13 Good13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality

163 Error13 model13 313 (SD213 +13 lamda2)0513 13 Lamda13 is13 an13 alternative13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present

Userrsquos13 Guide13 13 2613 13

164 Error13 model13 413 SD13 =13 gamma13 13 This13 model13 is13 rarely13 used13 and13 is13 equivalent13 to13 specifying13 a13 model13 with13 C013 only13 ie13 a13 constant13 error13 regardless13 of13 concentration

17 Once13 you13 select13 the13 assay13 error13 model13 for13 each13 output13 equation13 you13 are13 then13 offered13 four13 more13 options13 on13 which13 assay13 error13 polynomial13 coefZicients13 to13 use13 13 Choices13 113 and13 213 are13 the13 most13 commonly13 used171 Choice13 113 The13 default13 13 Use13 coefZicients13 in13 the13 subject13 record13 (C013 C113 C213 C313 in13 the13 data13 csv13 Zile)13 and13 if13

missing13 use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 (item13 1813 below)172 Choice13 213 Use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 for13 all13 subjects13 regardless13 of13 what13 is13 in13 the13

data13 csv13 Zile173 Choice13 313 13 To13 multiply13 data13 csv13 values13 and13 default13 entered13 values13 by13 a13 Zixed13 gamma13 and13 use13 them13 13 174 Choice13 013 Specify13 coefZicients13 on13 a13 subject13 by13 subject13 basis13 either13 those13 in13 the13 data13 csv13 Zile13 already13 the13

default13 values13 entered13 into13 the13 program13 or13 other13 values18 For13 each13 output13 equation13 after13 you13 have13 selected13 the13 option13 in13 item13 1713 you13 will13 be13 prompted13 to13 supply13 the13

required13 information13 including13 the13 general13 default13 values13 for13 missing13 or13 overridden13 values13 in13 the13 data13 csv13 Zile19 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13

usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13

20 Enter13 the13 grid13 point13 index13 13 This13 number13 corresponds13 to13 the13 number13 of13 grid13 (support)13 points13 which13 will13 initially13 Zill13 the13 model13 parameter13 space13 13 The13 larger13 the13 number13 of13 random13 parameters13 to13 be13 estimated13 the13 more13 points13 are13 required13 13 The13 program13 will13 make13 a13 suggestion13 based13 on13 the13 number13 of13 random13 parameters13 in13 the13 model13 13 The13 more13 you13 choose13 the13 slower13 the13 run13 will13 be13 but13 results13 may13 improve13 13 It13 is13 reasonable13 to13 choose13 fewer13 points13 early13 in13 model13 exploration13 and13 increase13 in13 later13 phases13 or13 if13 poor13 model13 Zits13 or13 lack13 of13 convergence13 are13 noted13 The13 choices13 are13 113 to13 713 corresponding13 respectively13 to13 212913 500313 1000713 2001113 4000913 and13 8002113 points13 13 If13 you13 choose13 713 you13 then13 have13 an13 additional13 choice13 to13 select13 one13 or13 more13 multiples13 of13 8002113 points

21 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 013 or13 greater13 13 If13 you13 enter13 an13 integer13 greater13 than13 013 the13 engine13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13 If13 you13 enter13 013 this13 is13 the13 way13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 an13 independent13 data13 set13 and13 a13 non-shy‐uniform13 prior13 must13 be13 speciZied13 (see13 3013 below)13 13 This13 means13 that13 the13 engine13 will13 only13 calculate13 the13 individual13 Bayesian13 posteriors13 for13 the13 new13 subjects13 using13 the13 population13 joint13 density13 from13 a13 previous13 run13 as13 a13 Bayesian13 prior

22 Information13 about13 convergence13 criteria13 13 Answer13 113 or13 some13 other13 keystroke13 plus13 Return13 to13 acknowledge13 that13 you13 have13 read13 it

23 In13 order13 to13 predict13 concentrations13 from13 a13 non-shy‐parametric13 distribution13 you13 have13 the13 option13 to13 use13 the13 1)13 mean13 2)13 median13 or13 3)13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject13 13 We13 typically13 use13 the13 median13 Zirst13 and13 then13 the13 mean13 in13 a13 separate13 run13 and13 compare13 the13 differences13 13

24 Select13 the13 time13 interval13 to13 generate13 predicted13 concentrations13 13 Additionally13 there13 will13 also13 be13 predictions13 made13 at13 the13 time13 of13 each13 observation13 13 In13 general13 for13 most13 models13 predictions13 every13 1213 minutes13 provide13 sufZicient13 granularity13 13 Smaller13 values13 can13 result13 in13 very13 large13 Ziles13 for13 big13 populations

25 Select13 the13 default13 MIC13 to13 be13 used13 for13 AUCMIC13 ratio13 reporting13 13 This13 should13 generally13 be13 set13 to13 the13 default13 of13 113 by13 choosing13 113 13 You13 can13 always13 extract13 the13 AUC13 later13 and13 divide13 it13 by13 any13 MIC13 you13 choose

26 Enter13 the13 value13 in13 hours13 that13 you13 want13 for13 calculations13 of13 AUCs13 from13 predicted13 concentration13 proZiles13 13 The13 default13 is13 2413 hours13 which13 you13 can13 accept13 by13 entering13 113 or13 013 if13 you13 want13 to13 specify13 a13 different13 interval

27 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

28 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

Userrsquos13 Guide13 13 2713 13

29 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

30 For13 the13 prior13 density13 choose13 113 if13 it13 is13 to13 be13 uniform13 13 This13 means13 that13 the13 initial13 grid13 points13 will13 be13 evenly13 distributed13 with13 equal13 probability13 within13 the13 boundaries13 speciZied13 (in13 1513 above)13 13 If13 you13 choose13 013 you13 will13 be13 prompted13 for13 the13 name13 of13 a13 Zile13 that13 contains13 the13 prior13 density13 13 This13 will13 be13 DEN000113 unless13 you13 have13 changed13 its13 name13 13 It13 will13 be13 found13 in13 the13 output13 directory13 of13 a13 prior13 NPAG13 run13 13 The13 model13 used13 to13 generate13 the13 DEN000113 Zile13 must13 be13 exactly13 the13 same13 as13 the13 current13 model13 including13 parameter13 boundaries13 13 However13 this13 option13 is13 useful13 to13 specify13 a13 non-shy‐uniform13 density13 for13 two13 reasons13 13 The13 Zirst13 is13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 a13 new13 set13 of13 subjects13 13 Do13 this13 in13 combination13 with13 setting13 the13 number13 of13 cycles13 to13 013 (see13 2113 above)13 13 The13 second13 use13 for13 a13 non-shy‐uniform13 prior13 is13 to13 continue13 a13 previous13 run13 13 For13 example13 if13 you13 only13 set13 the13 number13 of13 cycles13 to13 5013 to13 get13 a13 rough13 idea13 of13 model13 Zit13 you13 may13 continue13 where13 you13 left13 off13 by13 specifying13 the13 DEN000113 Zile13 from13 the13 50-shy‐cycle13 run13 and13 continuing13 with13 as13 many13 additional13 cycles13 as13 you13 specify13 in13 item13 2113 13 So13 in13 the13 example13 if13 you13 specify13 10013 cycles13 in13 2113 the13 total13 number13 of13 cycles13 will13 be13 5013 +13 10013 =13 150

31 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 NPrun(instr=ldquoyourfilerdquo)13 option13 and13 including13 ldquoyourZilerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

32 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 NPAG13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 NPAG13 analysis

33 The13 NPAG13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

IT2B RunsIn13 the13 past13 users13 had13 to13 run13 IT2B13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 ITrun()13 13 However13 if13 ITrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13

have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 ITrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis

Userrsquos13 Guide13 13 2813 13

71 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13 for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

8 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 IT2B13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

9 Enter13 the13 name13 of13 your13 csv13 Zile13 now10 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile11 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset111 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects112 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry12 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset13 Enter13 the13 initial13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo13 followed13

by13 return14 The13 estimated13 mean13 for13 each13 parameter13 value13 distribution13 during13 the13 Zirst13 iteration13 will13 be13 the13 median13 of13 the13

range13 speciZied13 in13 1313 13 You13 now13 have13 the13 option13 to13 specify13 the13 standard13 deviation13 for13 the13 parameter13 value13 distribution13 which13 by13 default13 is13 half13 of13 the13 range13 in13 1313 13 Choose13 113 to13 accept13 this13 (the13 usual13 answer)13 or13 013 to13 change13 it13 to13 something13 else13 expressed13 as13 a13 multiple13 of13 the13 range

15 In13 IT2B13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 You13 can13 now13 choose13 113 if13 every13 subject13 has13 the13 same13 coefZicients13 or13 013 to13 use13 a13 unique13 set13 of13 coefZicients13 for13 each13 subject13 13 The13 Zirst13 case13 is13 the13 more13 usual13 when13 all13 13 samples13 from13 all13 subjects13 are13 analyzed13 in13 the13 same13 lab13 13 If13 13 samples13 are13 analyzed13 in13 different13 labs13 and13 you13 have13 the13 assay13 data13 from13 each13 lab13 then13 you13 would13 enter13 013 13 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 (see13 151313 below)13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0151 If13 you13 choose13 113 (one13 set13 of13 coefZicients13 for13 all13 subjects)13 you13 will13 then13 be13 presented13 with13 313 additional13

choices1511 Choice13 113 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13 observation13

including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 and13 to13 Zix13 gamma13 to13 1

1512 Choice13 213 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 but13 to13 estimate13 gamma13 based13 on13 the13 data13 13 This13 is13 the13 usual13 option

1513 Choice13 313 Choose13 this13 option13 if13 you13 wish13 to13 estimate13 the13 assay13 error13 coefZicients13 based13 on13 your13 data13 for13 use13 in13 future13 runs13 13 Although13 you13 can13 access13 this13 option13 by13 using13 either13 ITrun()13 or13 ERRrun()13 in13 R13 the13 instruction13 Ziles13 that13 you13 save13 and13 the13 generated13 output13 Ziles13 will13 be13 different13 13 Therefore13 we13 recommend13 that13 if13 you13 intend13 to13 choose13 this13 option13 use13 ERRrun()13 in13 R13 which13 will13 generate13 an13 ASS000113 Zile13 that13 contains13 the13 estimates13 for13 C013 C113 C213 and13 C313 13 You13 can13 then13 include13 this13 Zile13 in13 the13 working13 directory13 (along13 with13 a13 model13 txt13 Zile13 and13 a13 data13 csv13 Zile)13 to13 do13 an13 IT2B13 run13 supplying13 the13 Zile13 name13 in13 16113 below

Userrsquos13 Guide13 13 2913 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

Userrsquos13 Guide13 13 713 13

You13 supply13 these13 files13 Pmetrics13 does13 the13 rest

General WorkflowThe13 general13 Pmetrics13 workZlow13 for13 IT2B13 and13 NPAG13 is13 shown13 in13 the13 following13 diagram

Data13 csv13 file Model13 txt13 file

PreparaCon13 program

Engine13 program

InstrucCon13 file

Output

ITrun()

13 NPrun

()

ITload()13 NPload()

R13 is13 used13 to13 specify13 the13 working13 directory13 containing13 the13 data13 csv13 and13 model13 txt13 Ziles13 Through13 the13 batch13 Zile13 generated13 by13 R13 the13 preparation13 program13 is13 compiled13 and13 executed13 13 The13 instruction13 Zile13 is13 generated13 automatically13 by13 the13 contents13 of13 the13 data13 and13 model13 Ziles13 and13 by13 arguments13 to13 the13 NPrun()13 ITrun()13 or13 ERRrun()13 commands13 The13 batch13 Zile13 will13 then13 compile13 and13 execute13 the13 engine13 Zile13 according13 to13 the13 instructions13 which13 will13 generate13 several13 output13 Ziles13 upon13 completion13 13 Finally13 the13 batch13 Zile13 will13 call13 the13 R13 script13 to13 generate13 the13 summary13 report13 and13 several13 data13 objects13 including13 the13 IT2BoutRdata13 or13 NPAGoutRdata13 Ziles13 which13 can13 be13 loaded13 into13 R13 subsequently13 using13 ITload()13 or13 NPload()Both13 input13 Ziles13 (data13 model)13 are13 text13 Ziles13 which13 can13 be13 edited13 directly

Userrsquos13 Guide13 13 813 13

Pmetrics Input FilesData13 csv13 Files

Pmetrics13 accepts13 input13 as13 a13 spreadsheet13 ldquomatrixrdquo13 format13 It13 is13 designed13 for13 input13 of13 multiple13 records13 in13 a13 concise13 way13 13 Please13 keep13 the13 number13 of13 characters13 in13 the13 Uile13 name13 le13 8Files13 are13 in13 comma-shy‐separated-shy‐values13 (csv)13 format13 13 Examples13 of13 programs13 that13 can13 save13 csv13 Ziles13 are13 any13 text13 editor13 (eg13 TextEdit13 on13 Mac13 Notepad13 on13 Windows)13 or13 spreadsheet13 program13 (eg13 Excel)13 13 Click13 on13 hyperlinked13 items13 to13 see13 an13 explanation13 13

IMPORTANT13 The13 order13 capitalization13 and13 names13 of13 the13 header13 and13 the13 Zirst13 1213 columns13 are13 Zixed13 13 All13 entries13 must13 be13 numeric13 with13 the13 exception13 of13 ID13 and13 ldquordquo13 for13 non-shy‐required13 placeholder13 entries

POPDATA13 DEC13 11ID EVID TIME DUR DOSE ADDL II INPUT OUT OUTEQ C0 C1 C2 C3 COVhellipGH 1 0 0 400 1 GH 0 05 042 1 001 01 0 0GH 0 1 046 1 001 01 0 0GH 0 2 247 1 001 01 0 0GH 4 0 0 150 1 GH 1 35 05 150 1 001 01 0 0GH 0 512 055 1 001 01 0 0GH 0 24 052 1 001 01 0 01423 1 0 1 400 -shy‐1 12 1 1423 1 01 0 100 2 1423 0 1 -shy‐99 1 001 01 0 01423 0 2 038 1 001 01 0 01423 0 2 16 2 005 02 -shy‐011 0002POPDATA13 DEC_1113 13 This13 is13 the13 header13 for13 the13 Zile13 and13 must13 be13 in13 the13 Zirst13 line13 13 It13 identiZies13 the13 versionID13 13 This13 Zield13 must13 be13 preceded13 by13 the13 ldquordquo13 symbol13 to13 conZirm13 that13 this13 is13 the13 header13 row13 It13 can13 be13

numeric13 or13 character13 and13 identiZies13 each13 individual13 13 All13 rows13 must13 contain13 an13 ID13 and13 all13 records13 from13 one13 individual13 must13 be13 contiguous13 13 Any13 subsequent13 row13 that13 begins13 with13 ldquordquo13 will13 be13 ignored13 which13 is13 helpful13 if13 you13 want13 to13 exclude13 data13 from13 the13 analysis13 but13 preserve13 the13 integrity13 of13 the13 original13 dataset13 or13 to13 add13 comment13 lines13 13 IDs13 should13 be13 1113 characters13 or13 less13 but13 may13 be13 any13 alphanumeric13 combination13 13 There13 can13 be13 at13 most13 80013 subjects13 per13 run

EVID13 This13 is13 the13 event13 ID13 Zield13 13 It13 can13 be13 013 113 or13 413 13 Every13 row13 must13 have13 an13 entry13 013 =13 observation13 113 =13 input13 (eg13 dose)13 213 313 are13 currently13 unused13 413 =13 reset13 where13 all13 compartment13 values13 are13 set13 to13 013 and13 the13 time13 counter13 is13 reset13 to13 013 13 This13 is13

useful13 when13 an13 individual13 has13 multiple13 sampling13 episodes13 that13 are13 widely13 spaced13 in13 time13 with13 no13 new13 information13 gathered13 13 This13 is13 a13 dose13 event13 so13 dose13 information13 needs13 to13 be13 complete

TIME13 This13 is13 the13 elapsed13 time13 in13 decimal13 hours13 since13 the13 Zirst13 event13 13 It13 is13 not13 currently13 clock13 time13 (eg13 2130)13 although13 this13 is13 planned13 13 Every13 row13 must13 have13 an13 entry13 and13 within13 a13 given13 ID13 rows13 must13 be13 sorted13 chronologically13 earliest13 to13 latest13 13

DUR13 This13 is13 the13 duration13 of13 an13 infusion13 in13 hours13 13 If13 EVID=113 there13 must13 be13 an13 entry13 otherwise13 it13 is13 ignored13 13 For13 a13 bolus13 (ie13 an13 oral13 dose)13 set13 the13 value13 equal13 to13 0

Userrsquos13 Guide13 13 913 13

DOSE13 This13 is13 the13 dose13 amount13 13 If13 EVID=113 there13 must13 be13 an13 entry13 otherwise13 it13 is13 ignoredADDL13 This13 speciZies13 the13 number13 of13 additional13 doses13 to13 give13 at13 interval13 II13 13 It13 may13 be13 missing13 for13 dose13

events13 (EVID=113 or13 4)13 in13 which13 case13 it13 is13 assumed13 to13 be13 013 13 It13 is13 ignored13 for13 observation13 (EVID=0)13 events13 13 Be13 sure13 to13 adjust13 the13 time13 entry13 for13 the13 subsequent13 row13 if13 necessary13 to13 account13 for13 the13 extra13 doses13 13 If13 set13 to13 -shy‐113 the13 dose13 is13 assumed13 to13 be13 given13 under13 steady-shy‐state13 conditions13 13 ADDL=-shy‐113 can13 only13 be13 used13 for13 the13 Zirst13 dose13 event13 for13 a13 given13 subject13 or13 an13 EVID=413 event13 as13 you13 cannot13 suddenly13 be13 at13 steady13 state13 in13 the13 middle13 of13 dosing13 record13 unless13 all13 compartmentstimes13 are13 reset13 to13 013 (as13 for13 an13 EVID=413 event)

II13 This13 is13 the13 interdose13 interval13 and13 is13 only13 relevant13 if13 ADDL13 is13 not13 equal13 to13 013 in13 which13 case13 it13 cannot13 be13 missing13 13 If13 ADDL=013 or13 is13 missing13 II13 is13 ignored

INPUT13 This13 deZines13 which13 input13 (ie13 drug)13 the13 DOSE13 corresponds13 to13 13 Inputs13 are13 deZined13 in13 the13 model13 Zile

OUT 13 This13 is13 the13 observation13 or13 output13 value13 13 If13 EVID=013 there13 must13 be13 an13 entry13 if13 missing13 this13 must13 be13 coded13 as13 -shy‐9913 13 It13 will13 be13 ignored13 for13 any13 other13 EVID13 and13 therefore13 can13 be13 ldquordquo13 13 There13 can13 be13 at13 most13 15013 observations13 for13 a13 given13 subject

OUTEQ13 This13 is13 the13 output13 equation13 number13 that13 corresponds13 to13 the13 OUT13 value13 13 Output13 equations13 are13 deZined13 in13 the13 model13 Zile

C013 C113 C213 C313 These13 are13 the13 coefZicients13 for13 the13 assay13 error13 polynomial13 for13 that13 observation13 13 Each13 subject13 may13 have13 up13 to13 one13 set13 of13 coefZicients13 per13 output13 equation13 13 If13 more13 than13 one13 set13 is13 detected13 for13 a13 given13 subject13 and13 output13 equation13 the13 last13 set13 will13 be13 used13 13 If13 there13 are13 no13 available13 coefZicients13 these13 cells13 may13 be13 left13 blank13 or13 Zilled13 with13 ldquordquo13 as13 a13 placeholder

COV13 Any13 column13 after13 the13 assay13 error13 coefZicients13 is13 assumed13 to13 be13 a13 covariate13 one13 column13 per13 covariate

Model13 Files

Model13 Ziles13 for13 Pmetrics13 are13 ultimately13 Fortran13 text13 Ziles13 with13 a13 header13 version13 of13 TSMULT13 13 As13 of13 Pmetrics13 version13 03013 we13 have13 adopted13 a13 very13 simple13 user13 format13 that13 Pmetrics13 will13 use13 to13 generate13 the13 Fortran13 code13 automatically13 for13 you13 13 Version13 0413 additionally13 eliminates13 the13 previously13 separate13 instruction13 Zile13 A13 model13 library13 is13 available13 on13 our13 website13 at13 httpwwwlapkorgpmetricsphp13 13 Naming13 your13 model13 files13 The13 default13 model13 Zile13 name13 is13 ldquomodeltxtrdquo13 but13 you13 can13 call13 them13 whatever13 you13 wish13 13 However13 please13 keep13 the13 number13 of13 characters13 in13 the13 model13 Uile13 name13 le13 813 When13 you13 use13 a13 model13 Zile13 in13 NPrun() ITrun ERRrun() or SIMrun()13 Pmetrics13 will13 make13 a13 Fortran13 model13 Zile13 of13 the13 same13 name13 temporarily13 renaming13 your13 Zile13 13 At13 the13 end13 of13 the13 run13 your13 original13 model13 Zile13 will13 be13 in13 the13 inputs13 subfolder13 of13 the13 run13 folder13 and13 the13 generated13 Fortran13 model13 Zile13 will13 be13 called13 ldquomodelforrdquo13 and13 moved13 to13 the13 etc13 subfolder13 of13 the13 run13 folder13 13 If13 your13 model13 is13 called13 ldquomymodeltxtrdquo13 then13 the13 Fortran13 Zile13 will13 be13 ldquomymodelforrdquoYou13 can13 still13 use13 appropriate13 Fortran13 model13 Ziles13 directly13 but13 we13 suggest13 you13 keep13 the13 for13 extension13 for13 all13 Fortran13 Ziles13 to13 avoid13 confusion13 with13 the13 new13 format13 13 If13 you13 use13 a13 for13 Zile13 as13 your13 model13 you13 will13 have13 to13 specify13 its13 name13 explicitly13 in13 the13 NPrun() ITrun ERRrun() or SIMrun()13 command13 since13 the13 default13 model13 name13 again13 is13 ldquomodeltxtrdquo13 13 If13 you13 use13 a13 for13 Zile13 directly13 it13 will13 be13 in13 the13 inputs13 subfolder13 of13 the13 run13 folder13 not13 in13 etc13 since13 you13 did13 not13 use13 the13 simpler13 template13 as13 your13 model13 Zile

Structure13 of13 model13 files13 The13 new13 model13 Zile13 is13 a13 text13 Zile13 with13 1113 blocks13 each13 marked13 by13 13 followed13 by13 a13 header13 tagPRImary13 variablesCOVariatesSECcondary13 variablesBOLus13 inputsINItial13 conditions

Userrsquos13 Guide13 13 1013 13

F13 (bioavailability)LAG13 timeDIFferential13 equationsOUTputsERRorEXTraFor13 each13 header13 only13 the13 capital13 letters13 are13 required13 for13 recognition13 by13 Pmetrics13 The13 blocks13 can13 be13 in13 any13 order13 and13 header13 names13 are13 case-shy‐insensitive13 (ie13 the13 capitalization13 here13 is13 just13 to13 show13 which13 letters13 are13 required)13 Fortran13 is13 also13 case-shy‐insensitive13 so13 in13 variable13 names13 and13 expressions13 case13 is13 ignored13 13 Details13 of13 each13 block13 are13 next13 followed13 by13 a13 complete13 example

Primary13 variables

Primary13 variables13 are13 the13 model13 parameters13 that13 are13 to13 be13 estimated13 by13 Pmetrics13 or13 are13 designated13 as13 Zixed13 parameters13 with13 user13 speciZied13 values13 It13 should13 be13 a13 list13 of13 variable13 names13 one13 name13 to13 a13 line13 Variable13 names13 should13 be13 1113 characters13 or13 fewer13 Some13 variable13 names13 are13 reserved13 for13 use13 by13 Pmetrics13 and13 cannot13 be13 used13 as13 primary13 variable13 names13 13 13 The13 number13 of13 primary13 variables13 must13 be13 between13 213 and13 3213 with13 at13 most13 3013 random13 or13 2013 Uixed13 13 On13 each13 row13 following13 the13 variable13 name13 include13 the13 range13 for13 the13 parameter13 that13 deZines13 the13 search13 space13 13 For13 NPAG13 this13 is13 absolute13 ie13 the13 algorithm13 will13 not13 search13 outside13 this13 range13 13 For13 IT2B13 the13 range13 is13 a13 starting13 range13 13 The13 simulator13 will13 ignore13 the13 ranges13 ExamplePriKE13 013 5V13 00113 100KA13 013 5KCP13 013 5KPC13 013 13 5Tlag113 013 2IC313 013 10000FA113 013 1

Covariates

Covariates13 are13 subject13 speciZic13 data13 such13 as13 body13 weight13 contained13 in13 the13 data13 csv13 Zile13 The13 covariate13 names13 which13 are13 the13 column13 names13 in13 the13 data13 Zile13 can13 be13 included13 here13 for13 use13 in13 secondary13 variable13 equations13 The13 order13 should13 be13 the13 same13 as13 in13 the13 data13 Zile13 and13 although13 the13 names13 do13 not13 have13 to13 be13 the13 same13 we13 strongly13 encourage13 you13 to13 make13 them13 the13 same13 to13 avoid13 confusionCovariates13 are13 applied13 at13 each13 dose13 event13 13 The13 Zirst13 dose13 event13 for13 each13 subject13 must13 have13 a13 value13 for13 every13 covariate13 in13 the13 data13 Zile13 13 By13 default13 missing13 covariate13 values13 for13 subsequent13 dose13 events13 are13 linearly13 interpolated13 between13 existing13 values13 or13 carried13 forward13 if13 the13 Zirst13 value13 is13 the13 only13 non-shy‐missing13 entry13 13 To13 suppress13 interpolation13 and13 carry13 forward13 the13 previous13 value13 in13 a13 piece-shy‐wise13 constant13 fashion13 include13 an13 exclamation13 point13 ()13 in13 any13 declaration13 lineNote13 that13 any13 covariate13 relationship13 to13 any13 parameter13 may13 be13 described13 as13 the13 user13 wishes13 by13 mathematical13 equations13 and13 Fortran13 code13 allowing13 for13 exploration13 of13 complex13 non-shy‐linear13 time-shy‐dependent13 andor13 conditional13 relationshipsExampleCovwtcypIC()

Userrsquos13 Guide13 13 1113 13

where13 IC13 will13 be13 piece-shy‐wise13 constant13 and13 the13 other13 two13 will13 be13 linearly13 interpolated13 for13 missing13 values

Secondary13 variables

Secondary13 variables13 are13 those13 that13 are13 deZined13 by13 equations13 that13 are13 combinations13 of13 primary13 covariates13 and13 other13 secondary13 variables13 If13 using13 other13 secondary13 variables13 deZine13 them13 Zirst13 within13 this13 block13 Equation13 syntax13 must13 be13 Fortran13 It13 is13 permissible13 to13 have13 conditional13 statements13 but13 because13 expressions13 in13 this13 block13 are13 translated13 into13 variable13 declarations13 in13 Fortran13 expressions13 other13 than13 of13 the13 form13 X13 =13 function(Y)13 must13 be13 preZixed13 by13 a13 +13 and13 contain13 only13 variables13 which13 have13 been13 previously13 deZined13 in13 the13 Primary13 Covariate13 or13 Secondary13 blocksExampleSecCL13 =13 Ke13 13 V13 13 wt075+IF(cyp13 GT13 1)13 CL13 =13 CL13 13 cyp

Bolus13 inputs

By13 default13 inputs13 with13 DUR13 (duration)13 of13 013 in13 the13 data13 csv13 Zile13 are13 delivered13 instantaneously13 to13 the13 model13 compartment13 equal13 to13 the13 input13 number13 ie13 input13 113 goes13 to13 compartment13 113 input13 213 goes13 to13 compartment13 213 etc13 This13 can13 be13 overridden13 with13 NBOLUS(input13 number)13 =13 compartment13 numberExampleBolNBCOMP(1)13 =13 2

Ini1al13 condi1ons

By13 default13 all13 model13 compartments13 have13 zero13 amounts13 at13 time13 013 This13 can13 be13 changed13 by13 specifying13 the13 compartment13 amount13 as13 X()13 =13 expression13 where13 13 is13 the13 compartment13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignoredExampleIniX(2)13 =13 ICV13 (ie13 IC13 is13 a13 covariate13 with13 the13 measured13 trough13 concentration13 prior13 to13 an13 observed13 dose)X(3)13 =13 IC313 (ie13 IC313 is13 a13 Zitted13 amount13 in13 this13 unobserved13 compartment)In13 the13 Zirst13 case13 the13 initial13 condition13 for13 compartment13 213 becomes13 the13 value13 of13 the13 IC13 covariate13 (deZined13 in13 Covariate13 block)13 multiplied13 by13 the13 current13 estimate13 of13 V13 during13 each13 iteration13 13 This13 is13 useful13 when13 a13 subject13 has13 been13 taking13 a13 drug13 as13 an13 outpatient13 and13 comes13 in13 to13 the13 lab13 for13 PK13 sampling13 with13 measurement13 of13 a13 concentration13 immediately13 prior13 to13 a13 witnessed13 dose13 which13 is13 in13 turn13 followed13 by13 more13 sampling13 13 In13 this13 case13 IC13 or13 any13 other13 covariate13 can13 be13 set13 to13 the13 initial13 measured13 concentration13 and13 if13 V13 is13 the13 volume13 of13 compartment13 213 the13 initial13 condition13 (amount)13 in13 compartment13 213 will13 now13 be13 set13 to13 the13 measured13 concentration13 of13 drug13 multiplied13 by13 the13 estimated13 volume13 for13 each13 iteration13 until13 convergenceIn13 the13 second13 case13 the13 initial13 condition13 for13 compartment13 313 becomes13 another13 variable13 IC313 deZined13 in13 the13 Primary13 block13 to13 Zit13 in13 the13 model13 given13 the13 observed13 data

F13 (bioavailability)

Specify13 the13 bioavailability13 term13 if13 present13 Use13 the13 form13 FA()13 =13 expression13 where13 13 is13 the13 input13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignored

Userrsquos13 Guide13 13 1213 13

ExampleFFA(1)13 =13 FA1

Lag13 1me

Specify13 the13 lag13 term13 if13 present13 which13 is13 the13 delay13 after13 an13 absorbed13 dose13 before13 observed13 concentrations13 Use13 the13 form13 TLAG()13 =13 expression13 where13 13 is13 the13 input13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignoredExampleLagTLAG(1)13 =13 Tlag1

Differen1al13 equa1ons

Specify13 a13 model13 in13 terms13 of13 ordinary13 differential13 equations13 in13 Fortran13 format13 XP()13 is13 the13 notation13 for13 dX()dt13 where13 13 is13 the13 compartment13 number13 X()13 is13 the13 amount13 in13 the13 compartment13 There13 can13 be13 a13 maximum13 of13 2013 such13 equationsExampleDifXP(1)13 =13 -shy‐KAX(1)XP(2)13 =13 RATEIV(1)13 +13 KAX(1)13 -shy‐13 (KE+KCP)X(2)13 +13 KPCX(3)XP(3)13 =13 KCPX(2)13 -shy‐13 KPCX(3)RATEIV(1)13 is13 the13 notation13 to13 indicate13 an13 infusion13 of13 input13 113 (typically13 drug13 1)13 13 The13 duration13 of13 the13 infusion13 and13 total13 dose13 is13 deZined13 in13 the13 data13 csv13 Zile13 Up13 to13 713 inputs13 are13 currently13 allowed13 13 These13 can13 be13 used13 in13 the13 model13 Zile13 as13 RATEIV(1)13 RATEIV(2)13 etc13 13 The13 compartments13 for13 13 receiving13 the13 inputs13 of13 oral13 (bolus)13 doses13 are13 deZined13 in13 the13 Bolus13 block

Outputs

Output13 equations13 in13 Fortran13 format13 Outputs13 are13 of13 the13 form13 Y()13 =13 expression13 where13 13 is13 the13 output13 equation13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignored13 There13 can13 be13 a13 maximum13 of13 613 outputs13 13 They13 are13 referred13 to13 as13 Y(1)13 Y(2)13 etcExampleOutY(1)13 =13 X(2)V

Error

This13 block13 contains13 all13 the13 information13 Pmetrics13 requires13 for13 the13 structure13 of13 the13 error13 model13 13 In13 Pmetrics13 each13 observation13 is13 weighted13 by13 1error213 13 13 There13 are13 two13 choices13 for13 the13 error13 term

113 13 error13 =13 SD13 13 gamma213 13 error13 =13 (SD213 +13 lamda2)0513 (Note13 that13 lambda13 is13 only13 available13 in13 NPAG13 currently)

where13 SD13 is13 the13 standard13 deviation13 (SD)13 of13 each13 observation13 [obs]13 and13 gamma13 and13 lambda13 are13 terms13 to13 capture13 extra13 process13 noise13 related13 to13 the13 observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 SD13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 The13 13 values13 for13 the13 coefZicients13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13

Userrsquos13 Guide13 13 1313 13

coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly() 13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0In13 the13 multiplicative13 model13 13 gamma13 is13 a13 scalar13 on13 SD13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 Lambda13 is13 an13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 We13 tend13 to13 prefer13 lambda

To13 specify13 the13 model13 in13 this13 block13 the13 Zirst13 line13 needs13 to13 be13 either13 L=[number]13 or13 G=[number]13 for13 a13 lambda13 or13 gamma13 error13 model13 13 The13 [number]13 term13 is13 the13 starting13 value13 for13 lambda13 or13 gamma13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present13 13 For13 gamma13 good13 starting13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality13 13 If13 you13 include13 an13 exclamation13 point13 ()13 in13 the13 declaration13 then13 lambda13 or13 gamma13 will13 be13 Zixed13 and13 not13 estimated13 13 Note13 that13 you13 can13 only13 Zix13 lambda13 currently13 to13 zeroThe13 next13 line(s)13 contain13 the13 values13 for13 C013 C113 C213 and13 C313 separated13 by13 commas13 13 There13 should13 be13 one13 line13 of13 coefZicients13 for13 each13 output13 equation13 13 By13 default13 Pmetrics13 will13 use13 values13 for13 these13 coefZicients13 found13 in13 the13 data13 Zile13 13 If13 none13 are13 present13 or13 if13 the13 model13 declaration13 line13 contains13 an13 exclamation13 point13 ()13 the13 values13 here13 will13 be13 used

Example13 113 estimated13 lambda13 starting13 at13 0413 one13 output13 use13 data13 Zile13 coefZicients13 but13 if13 missing13 use13 010100ErrL=04010100

Example13 213 Zixed13 gamma13 of13 213 two13 outputs13 use13 data13 Zile13 coefZicients13 but13 if13 missing13 use13 01010013 for13 the13 Zirst13 output13 but13 use13 0313 0113 013 013 for13 output13 213 regardless13 of13 what13 is13 in13 the13 data13 ZileErrG=2010100030100

Extra

This13 block13 is13 for13 advanced13 Fortran13 programmers13 only13 13 Occasionally13 for13 very13 complex13 models13 additional13 Fortran13 subroutines13 are13 required13 13 They13 can13 be13 placed13 here13 13 The13 code13 must13 specify13 complete13 Fortran13 subroutines13 which13 can13 be13 called13 from13 other13 blocks13 with13 appropriate13 call13 functions13 13

Reserved13 Names

The13 following13 cannot13 be13 used13 as13 primary13 covariate13 or13 secondary13 variable13 names13 They13 can13 be13 used13 in13 equations13 however

Reserved13 Variable Func1on13 in13 Pmetricsndim internal

t time

Userrsquos13 Guide13 13 1413 13

x array13 of13 compartment13 amounts

xp array13 of13 Zirst13 derivative13 of13 compartment13 amounts

rpar internal

ipar internal

p array13 of13 primary13 parameters

r input13 rates

b input13 boluses

npl internal

numeqt output13 equation13 number

ndrug input13 number

nadd covariate13 number

rateiv intravenous13 input13 for13 inputs13 when13 DURgt013 in13 data13 Ziles

cv covariate13 values13 array

n number13 of13 compartments

nd internal

ni internal

nup internal

nuic internal

np number13 of13 primary13 parameters

nbcomp bolus13 compartment13 array

psym names13 of13 primary13 parameters

fa biovailability

tlag lag13 time

tin internal

tout internal

Complete13 Example

Here13 is13 a13 complete13 example13 of13 a13 model13 Zile13 as13 of13 Pmetrics13 version13 04013 and13 higher

Userrsquos13 Guide13 13 1513 13

NotesBy13 omitting13 a13 Diffeq13 block13 with13 ODEs13 Pmetrics13 understands13 that13 you13 are13 specifying13 the13 model13 to13 be13 solved13 algebraically13 In13 this13 case13 at13 least13 KE13 and13 V13 must13 be13 in13 the13 Primary13 or13 Secondary13 variables13 KA13 KCP13 and13 KPC13 are13 optional13 and13 specify13 absorption13 and13 transfer13 to13 and13 from13 the13 central13 to13 a13 peripheral13 compartment13 respectively

PriKE13 013 5V013 0113 100KA13 013 5Tlag113 013 3Cov13 wt

SecV13 =13 V0wt

LagTLAG(1)13 =13 Tlag1

OutY(1)13 =13 X(2)V

ErrL=04010100

Userrsquos13 Guide13 13 1613 13

Brief13 Fortran13 Tutorial

Much13 more13 detailed13 help13 is13 available13 from13 httpwwwcsmtuedu~sheneCOURSEScs201NOTESfortranhtml

Arithmetic Operator Meaning

+ addition

- subtraction

multiplication

division

exponentiation

Relational Operator Alternative Operator Meaning

lt LT less than

lt= LE less than or equal

gt GT greater than

gt= GE greater than or equal

== EQ equal

= NE not equal

Selective Execution Example

IF (logical-expression) one-statement IF (T gt= 100) CL = 10

IF (logical-expression) THEN statementsEND IF

IF (T gt= 100) THEN CL = 10 V = 10END IF

IF (logical-expression) THEN statements-1ELSE statements-2END IF

IF (T gt= 100) THEN CL = 10ELSE CL = CLEND IF

Userrsquos13 Guide13 13 1713 13

How to use R and PmetricsSeCng13 up13 a13 Pmetrics13 project

When13 beginning13 a13 new13 modeling13 project13 it13 is13 convenient13 to13 use13 the13 command13 PMtree(ldquoproject namerdquo)13 13 This13 command13 will13 set13 up13 a13 new13 directory13 in13 the13 current13 working13 directory13 named13 whatever13 you13 have13 included13 as13 the13 ldquoproject13 namerdquo13 13 For13 example13 a13 directory13 called13 ldquoDrugXrdquo13 will13 be13 created13 by13 PMtree(ldquoDrugXrdquo)13 13 Beneath13 this13 directory13 several13 subdirectories13 will13 be13 also13 created13 Rscript13 Runs13 Sim13 and13 src13 13 The13 Rscript13 subdirectory13 will13 contain13 a13 skeleton13 R13 script13 to13 begin13 Pmetrics13 runs13 in13 the13 new13 project13 13 The13 Runs13 subdirectory13 should13 contain13 all13 Ziles13 required13 for13 a13 run13 (described13 next)13 and13 it13 will13 also13 contain13 the13 resulting13 numerically13 ordered13 run13 directories13 created13 after13 each13 Pmetrics13 NPAG13 or13 IT2B13 run13 13 The13 Sim13 subdirectory13 can13 contain13 any13 Ziles13 related13 to13 simulations13 and13 the13 src13 subdirectory13 should13 contain13 original13 and13 manipulated13 source13 data13 Ziles13 13 Of13 course13 you13 are13 free13 to13 edit13 this13 directory13 tree13 structure13 as13 you13 please13 or13 make13 your13 own13 entirely

GeCng13 the13 required13 files13 to13 run13 Pmetrics

When13 you13 wish13 to13 execute13 a13 Pmetrics13 run13 you13 must13 ensure13 that13 appropriate13 Pmetrics13 model13 txt13 and13 data13 csv13 Ziles13 are13 in13 the13 working13 directory13 ie13 the13 Runs13 subdirectory13 of13 the13 project13 directory13 13 13 13 R13 can13 be13 used13 to13 help13 prepare13 the13 data13 csv13 Zile13 by13 importing13 and13 manipulating13 spreadsheets13 (eg13 readcsv())13 13 The13 Pmetrics13 function13 PMcheck()13 can13 be13 used13 to13 check13 a13 csv13 Zile13 or13 an13 R13 dataframe13 that13 is13 to13 be13 saved13 as13 a13 Pmetrics13 data13 13 csv13 Zile13 for13 errors13 13 13 13 13 13 It13 can13 also13 check13 a13 model13 Zile13 for13 errors13 in13 the13 context13 of13 a13 dataZile13 eg13 covariates13 that13 do13 not13 match13 13 PMfixMatrix()13 attempts13 to13 automatically13 rid13 data13 Ziles13 of13 errors13 13 The13 function13 PMwriteMatrix() 13 can13 be13 used13 to13 write13 the13 R13 data13 object13 in13 the13 correct13 format13 for13 use13 by13 IT2B13 NPAG13 or13 the13 Simulator13 13 You13 can13 also13 download13 sample13 data13 and13 scripts13 from13 the13 Pmetrics13 downloads13 section13 of13 our13 website13 once13 you13 sign13 in13 with13 your13 LAPK13 user13 email13 address13 and13 password13 13 Edit13 prior13 versions13 of13 model13 Ziles13 to13 make13 new13 model13 Ziles

Using13 scripts13 to13 control13 Pmetrics

As13 you13 will13 see13 in13 the13 skeleton13 R13 script13 made13 by13 PMtree() and13 placed13 in13 the13 Rscript13 subdirectory13 if13 this13 is13 a13 Zirst-shy‐time13 run13 the13 R13 commands13 to13 run13 IT2B13 or13 NPAG13 are13 as13 follows13 13 Recall13 that13 the13 ldquordquo13 character13 is13 a13 comment13 character

library(Pmetrics)Run 1 - add your run description heresetwd(ldquoworking directoryrdquo)NPrun() for NPAG or ITrun() for IT2B

The13 Zirst13 line13 will13 load13 the13 Pmetrics13 library13 of13 functions13 13 The13 second13 line13 sets13 the13 working13 directory13 to13 the13 speciZied13 path13 13 The13 third13 line13 generates13 the13 batch13 Zile13 to13 run13 NPAG13 or13 IT2B13 and13 saves13 it13 to13 the13 working13 directory13

NOTE13 13 On13 Mac13 systems13 the13 batch13 Zile13 will13 be13 automatically13 launched13 in13 a13 Terminal13 window13 13 On13 Windows13 systems13 the13 batch13 Zile13 must13 be13 launched13 manually13 by13 double13 clicking13 the13 np_runbat13 or13 it_runbat13 Zile13 in13 the13 working13 directory

ITrun() 13 and13 NPrun()13 both13 return13 the13 full13 path13 of13 the13 output13 directory13 to13 the13 clipboard13 13 By13 default13 runs13 are13 placed13 in13 folders13 numbered13 sequentially13 beginning13 with13 ldquo1rdquoNow13 the13 output13 of13 IT2B13 or13 NPAG13 needs13 to13 be13 loaded13 into13 R13 so13 the13 next13 command13 does13 this

NPload(run_number) or ITload(run_number)

Details13 of13 these13 commands13 and13 what13 is13 loaded13 are13 described13 in13 the13 R13 documentation13 (NPload 13 or13 ITload)13 and13 in13 the13 following13 section13 13 The13 run_number13 should13 be13 included13 within13 the13 parentheses13 to13 be13 appended13 to13 the13 names13

Userrsquos13 Guide13 13 1813 13

of13 loaded13 R13 objects13 allowing13 for13 comparison13 between13 runs13 eg13 NPload(1)13 13 Finally13 at13 this13 point13 other13 Pmetrics13 commands13 can13 be13 added13 to13 the13 script13 to13 process13 the13 data13 such13 as13 the13 following

plot(final1)plot(cycle1)plot(op1type=rdquopoprdquo) or plot(op1$pop1)plot(op1) default is to plot posterior predictions for output 1plot(op1type=rdquopoprdquoresid=T)

Of13 course13 the13 full13 power13 of13 R13 can13 be13 used13 in13 scripts13 to13 analyze13 data13 but13 these13 simple13 statements13 serve13 as13 examplesIf13 you13 do13 not13 use13 the13 PMtree() structure13 we13 suggest13 that13 the13 R13 script13 for13 a13 particular13 project13 be13 saved13 into13 a13 folder13 called13 ldquoRscriptrdquo13 or13 some13 other13 meaningful13 name13 in13 the13 working13 directory13 13 Folders13 are13 not13 be13 moved13 by13 the13 batch13 Zile13 13 Within13 the13 script13 number13 runs13 sequentially13 and13 use13 comments13 liberally13 to13 13 distinguish13 runs13 as13 shown13 below

library(Pmetrics)

Run 1 - Ka Kel V all subjectssetwd(ldquoworking directoryrdquo)NPrun() assumes model=rdquomodeltxtrdquo and data=rdquodatacsvrdquoNPload(1)

Remember13 in13 R13 that13 the13 command13 example(function) will13 provide13 examples13 for13 the13 speciZied13 function13 13 Most13 Pmetrics13 functions13 have13 examples

Pmetrics Data ObjectsAfter13 a13 successful13 IT2B13 or13 NPAG13 run13 an13 R13 dataZile13 is13 saved13 in13 the13 output13 subdirectory13 of13 the13 newly13 created13 numerically13 ordered13 folder13 in13 the13 working13 directory13 13 After13 IT2B13 this13 Zile13 is13 called13 ldquoIT2BoutRdatardquo13 and13 after13 NPAG13 it13 is13 called13 ldquoNPAGoutRdatardquo13 13 As13 mentioned13 in13 the13 previous13 section13 these13 data13 Ziles13 can13 be13 loaded13 by13 ensuring13 that13 the13 Runs13 folder13 is13 set13 as13 the13 working13 directory13 and13 then13 using13 the13 Pmetrics13 commands13 ITload(run_num)13 or13 NPload(run_num)

Both13 commands13 load13 their13 respective13 Rdata13 Ziles13 into13 R13 making13 the13 contained13 objects13 available13 for13 plotting13 and13 other13 analysisObjects13 loaded13 by13 ITload(run_num) and NPload(run_num)

Objects Variables Comments

op13 (class13 PMop13 list) $pop113 $post113 Population13 and13 posterior13 predictions13 for13 each13 output13 equation13 ie13 113 213

13 $id Subject13 identiZication

13 $time Observation13 time13 in13 relative13 decimal13 hours

13 $obs Observation

13 $pred Prediction13 based13 on13 median13 of13 population13 or13 posterior13 parameter13 value13 distributions

Userrsquos13 Guide13 13 1913 13

Objects Variables Comments

13 $block Dosing13 block13 usually13 113 unless13 data13 Zile13 contains13 EVID=413 dose13 reset13 events13 in13 which13 case13 each13 such13 reset13 within13 a13 given13 ID13 will13 increment13 the13 dosing13 block13 by13 113 for13 that13 ID

13 $obsSD Calculated13 standard13 deviation13 (error)13 of13 the13 observation13 based13 on13 the13 assay13 error13 polynomial

13 $d Difference13 between13 pred13 and13 obs

13 $ds Squared13 difference13 between13 pred13 and13 obs

13 $wd $d13 weighted13 by13 the13 $obsSD

13 $wds $ds13 weighted13 by13 the13 $obsSD

Zinal13 (class13 PMZinal13 list) $popPoints (NPAG13 only)13 Dataframe13 of13 the13 Zinal13 cycle13 joint13 population13 density13 of13 grid13 points13 with13 column13 names13 equal13 to13 the13 name13 of13 each13 random13 parameter13 plus13 $prob13 for13 the13 associated13 probability13 of13 that13 point13

$popMean The13 Zinal13 cycle13 mean13 for13 each13 random13 parameter13 distribution

$popSD The13 Zinal13 cycle13 standard13 deviation13 for13 each13 random13 parameter13 distribution

$popCV The13 Zinal13 cycle13 coefZicient13 of13 variation13 for13 each13 random13 parameter13 distribution

$popVar The13 Zinal13 cycle13 variance13 for13 each13 random13 parameter13 distribution

$popCov The13 Zinal13 cycle13 covariance13 matrix13 for13 each13 random13 parameter13 distribution

$popCor The13 Zinal13 cycle13 correlation13 matrix13 for13 each13 random13 parameter13 distribution

$popMedian The13 Zinal13 cycle13 median13 for13 each13 random13 parameter13 distribution

$gridpts (NPAG13 only)13 The13 initial13 number13 of13 support13 points

$ab Matrix13 of13 boundaries13 for13 random13 parameter13 values13 13 For13 NPAG13 this13 is13 speciZied13 by13 the13 user13 prior13 to13 the13 run13 for13 IT2B13 it13 is13 calculated13 as13 a13 user13 speciZied13 multiple13 of13 the13 SD13 for13 the13 parameter13 value13 distribution

Userrsquos13 Guide13 13 2013 13

Objects Variables Comments

cycle13 (class13 PMcycle13 list) $names Vector13 of13 names13 of13 the13 random13 parameters

$ll Matrix13 of13 cycle13 number13 and13 -shy‐2Log-shy‐likelihood13 at13 each13 cycle

$gamlam A13 matrix13 of13 cycle13 number13 and13 gamma13 or13 lambda13 at13 each13 cycle13 (see13 item13 1613 under13 NPAG13 Runs13 below13 for13 a13 discussion13 of13 gamma13 and13 lambda)

$mean A13 matrix13 of13 cycle13 number13 and13 the13 mean13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 mean

$sd A13 matrix13 of13 cycle13 number13 and13 the13 standard13 deviation13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$median A13 matrix13 of13 cycle13 number13 and13 the13 median13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$aic A13 matrix13 of13 cycle13 number13 and13 Akaike13 Information13 Criterion13 at13 each13 cycle

$bic A13 matrix13 of13 cycle13 number13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle

cov13 (class13 PMcov13 dataframe)

$id Subject13 identiZication

$time Time13 for13 each13 covariate13 entry

covariates Covariate13 values13 for13 each13 subject13 at13 each13 time13 extracted13 from13 the13 raw13 data13 Zile

parameters Mean13 median13 or13 mode13 of13 Bayesian13 posterior13 distribution13 for13 each13 random13 parameter13 in13 the13 model13 13 Mode13 summaries13 are13 available13 for13 NPAG13 output13 only13 and13 the13 default13 is13 median13 13 Values13 are13 recycled13 for13 each13 row13 within13 a13 given13 subject13 with13 the13 number13 of13 rows13 driven13 by13 the13 number13 of13 covariate13 entries

Userrsquos13 Guide13 13 2113 13

Objects Variables Comments

pop13 (class13 PMpop13 dataframe)

post13 (class13 PMpost13 dataframe)

NPAG13 only

$id Subject13 identiZication

$pred113 Population13 prior13 (PMpop)13 or13 Bayesian13 posterior13 (PMpost)13 predictions13 for13 each13 output13 equation13 based13 on13 mean13 median13 and13 mode13 as13 speciZied13 by13 the13 user13 and13 with13 frequency13 also13 speciZied13 by13 the13 user13 in13 the13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

$block Same13 as13 for13 PMop13 objects13 above

NPdata13 (class13 NPAG13 list)13 ITdata13 (class13 IT2B13 list

Raw13 data13 used13 to13 make13 the13 above13 objects13 13 Please13 use13 NPparse13 or13 ITparse13 in13 R13 for13 discussion13 of13 the13 data13 contained13 in13 these13 objects

Since13 R13 is13 an13 object13 oriented13 language13 to13 access13 the13 observations13 in13 a13 PMop13 object13 for13 example13 use13 the13 following13 syntax13 op$post1$obsNote13 that13 you13 will13 place13 an13 integer13 within13 the13 parentheses13 of13 the13 loading13 functions13 eg13 NPload(1)13 which13 will13 sufZix13 all13 the13 above13 objects13 with13 that13 integer13 eg13 op113 Zinal113 NPdata113 13 This13 allows13 several13 models13 to13 be13 loaded13 into13 R13 simultaneously13 each13 with13 a13 unique13 sufZix13 and13 which13 can13 be13 compared13 with13 the13 PMcompare()13 command13 (see13 Model13 Diagnostics13 below)

Making New Pmetrics ObjectsOnce13 you13 have13 loaded13 the13 raw13 (NPdata13 or13 ITdata)13 or13 processed13 (op13 Uinal13 cycle13 pop13 post)13 data13 objects13 described13 above13 with13 NPload(run_num)13 or13 ITload(run_num)13 should13 you13 wish13 to13 remake13 the13 processed13 objects13 with13 parameters13 other13 than13 the13 defaults13 you13 can13 easily13 do13 so13 with13 the13 make 13 family13 of13 commands13 13 For13 example13 the13 default13 for13 PMop13 observed13 vs13 predicted13 objects13 is13 to13 use13 the13 prediction13 based13 on13 the13 median13 of13 the13 population13 or13 posterior13 distribution13 13 If13 you13 wish13 to13 use13 the13 mean13 of13 the13 distribution13 remake13 the13 PMop13 object13 using makeOP()13 13 If13 you13 wish13 to13 see13 all13 the13 cycle13 information13 in13 a13 PMcycle13 object13 not13 omitting13 the13 Zirst13 1013 of13 cycles13 by13 default13 remake13 it13 using13 makeCycle()13 13

For13 all13 of13 the13 following13 commands13 the13 data13 input13 is13 either13 NPdata13 or13 ITdata13 with13 additional13 function13 arguments13 speciZic13 to13 each13 command13 13 Accessing13 the13 help13 for13 each13 function13 in13 R13 will13 provide13 further13 details13 on13 the13 arguments13 defaults13 and13 output13 of13 each13 command

Userrsquos13 Guide13 13 2213 13

Command Description R13 help

makeAUC Make13 a13 dataframe13 of13 class13 PMauc13 containing13 subject13 ID13 and13 AUC13 from13 a13 variety13 of13 inputs13 including13 objects13 of13 PMop13 PMsim13 or13 a13 suitable13 dataframe

makeAUC

makeCov Generate13 a13 dataframe13 of13 class13 PMcov13 with13 subject-shy‐speciZic13 covariates13 extracted13 from13 the13 data13 csv13 Zile13 This13 object13 can13 be13 plotted13 and13 used13 to13 test13 for13 covariates13 which13 are13 signiZicantly13 associated13 with13 model13 parameters13 13

makeCov

makeCycle Create13 a13 PMcycle13 object13 described13 in13 the13 previous13 section makeCycle

makeFinal Create13 a13 PMZinal13 object13 described13 in13 the13 previous13 section makeFinal

makeOP Create13 a13 PMop13 object13 described13 in13 the13 previous13 section makeOP

makeNCA Create13 a13 dataframe13 (class13 PMnca)13 with13 the13 output13 of13 a13 non-shy‐compartmental13 analysis13 using13 PMpost13 and13 NPAG13 data13 objects13 as13 input13 13 The13 PMnca13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull auc13 Area13 under13 the13 time-shy‐observation13 curve13 using13 the13

trapezoidal13 approximation13 from13 time13 013 until13 the13 second13 dose13 or13 if13 only13 one13 dose13 until13 the13 last13 observation

bull aumc13 Area13 under13 the13 Zirst13 moment13 curvebull k13 Slope13 by13 least-shy‐squares13 linear13 regression13 of13 the13 Zinal13

613 log-shy‐transformed13 observations13 vs13 timebull auclast13 Area13 under13 the13 curve13 from13 the13 time13 of13 the13

last13 observation13 to13 inZinity13 calculated13 as13 [Final13 obs]kbull aumclast13 Area13 under13 the13 Zirst13 moment13 curve13 from13

the13 time13 of13 the13 last13 observation13 to13 inZinitybull aucinf13 Area13 under13 the13 curve13 from13 time13 013 to13 inZinity13

caluculated13 as13 auc13 +13 auclastbull aumcinf13 Area13 under13 the13 Zirst13 moment13 curve13 from13

time13 013 to13 inZinitybull mrt13 Mean13 residence13 time13 calculated13 as13 1kbull cmax13 Maximum13 predicted13 concentration13 after13 the13

Zirst13 dosebull tmax13 Time13 to13 cmaxbull cl13 Clearance13 calculated13 as13 doseaucinfbull vdss13 Volume13 of13 distribution13 at13 steady13 state13

calculated13 as13 clmrtbull thalf13 Half13 life13 of13 elimination13 calculated13 as13 ln(2)kbull dose13 First13 dose13 amount13 for13 each13 subject

makeNCA

Userrsquos13 Guide13 13 2313 13

Command Description R13 help

makeErrorPoly This13 function13 plots13 Zirst13 second13 and13 third13 order13 polynomial13 functions13 Zitted13 to13 pairs13 of13 observations13 and13 associated13 standard13 deviations13 for13 a13 given13 output13 assay13 In13 this13 way13 the13 standard13 deviation13 associated13 with13 any13 observation13 may13 be13 calculated13 and13 used13 to13 appropriately13 weight13 that13 observation13 in13 the13 model13 building13 process13 Observations13 are13 weighted13 by13 the13 reciprocal13 of13 the13 variance13 or13 squared13 standard13 deviation13 13 Output13 of13 the13 function13 is13 a13 plot13 of13 the13 measured13 observations13 and13 Zitted13 polynomial13 curves13 and13 a13 list13 with13 the13 Zirst13 second13 and13 third13 order13 coefZicients

makeErrorPoly

makePTA This13 function13 performs13 a13 Probability13 of13 Target13 Attainment13 analysis13 for13 a13 set13 of13 simulated13 doses13 and13 time-shy‐concentration13 proZiles13 13 Targets13 (eg13 Minimum13 Inhibitory13 Concentrations)13 the13 type13 of13 target13 attainment13 (ie13 time13 above13 target13 Cmaxtarget13 13 AUCtarget13 Cmintarget13 or13 Cxtarget13 where13 x13 is13 any13 time13 point)13 and13 the13 success13 threshold13 (eg13 time13 gt13 0713 or13 Cmaxtarget13 gt13 10)13 can13 all13 be13 speciZied13 13 Output13 is13 a13 list13 (class13 PMpta)13 with13 two13 objectsbull Results13 a13 413 dimensional13 array13 with13 dimension13 size13 of13

[number13 of13 doses13 number13 of13 targets13 number13 of13 simulated13 proZiles13 1]13 which13 gives13 the13 target13 attainment13 (eg13 Cmaxtarget)13 for13 each13 dose13 target13 and13 proZile

bull Outcome13 For13 each13 dose13 and13 target13 a13 summary13 of13 the13 target13 attainment13 for13 all13 the13 proZiles13 including13 mean13 standard13 deviation13 and13 proportion13 above13 the13 success13 threshold

PMpta13 objects13 can13 be13 summarized13 with13 summary(x)13 and13 plotted13 with13 plot(x)13

makePTA

Userrsquos13 Guide13 13 2413 13

Command Description R13 help

makePopmakePost(NPAG13 only)

These13 functions13 create13 dataframes13 of13 class13 PMpop13 and13 PMpost13 respectively13 13 The13 PMpop13 or13 PMpost13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull time13 Times13 for13 predicted13 concentrations13 13 These13

times13 are13 not13 necessarily13 at13 observed13 times13 but13 at13 a13 frequency13 speciZied13 in13 the13 NPAG13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

bull pred113 Predictions13 for13 output13 113 13 For13 PMpop13 objects13 predictions13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 population13 prior13 distribution13 13 For13 PMpost13 objects13 they13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject

bull pred213 pred313 etc13 If13 additional13 outputs13 exist13 they13 will13 each13 be13 columns13 in13 the13 dataframe13 just13 as13 for13 pred113 13

makePopmakePost

NPAG RunsIn13 the13 past13 users13 had13 to13 run13 NPAG13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 NPrun()13 13 However13 if13 NPrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable

1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 NPAG13 creates13 a13 temporary13 instruction13 Zile13 in13 case13 something13 happens13 so13 that13 instructions13 entered13 to13 date13 can13

be13 recovered13 13 Accept13 the13 default13 by13 choosing13 113 13 You13 can13 save13 with13 a13 meaningful13 Zilename13 later13 13 If13 it13 already13 exists13 you13 will13 be13 asked13 if13 you13 wish13 to13 overwrite13 the13 Zile13 which13 is13 usually13 the13 thing13 to13 do

Userrsquos13 Guide13 13 2513 13

8 If13 you13 have13 previously13 run13 IT2B13 you13 can13 automatically13 import13 the13 suggested13 parameter13 ranges13 13 Choose13 113 to13 do13 this13 and13 013 to13 run13 NPAG13 without13 a13 previous13 IT2B13 run81 If13 you13 choose13 option13 113 you13 must13 specify13 the13 name13 of13 a13 FROMxxxx13 Zile13 typically13 FROM000113 that13 you13 can13

Zind13 in13 an13 output13 directory13 after13 a13 successful13 IT2B13 run13 13 Note13 that13 the13 program13 will13 then13 assume13 that13 you13 are13 using13 the13 same13 wrk13 Ziles13 that13 IT2B13 made13 from13 your13 data13 csv13 Zile13 13 It13 is13 strongly13 recommended13 to13 override13 this13 and13 specify13 a13 data13 csv13 Zile13 13 At13 this13 point13 you13 will13 jump13 to13 1013 below13 and13 continue13 on13 however13 your13 answers13 will13 often13 be13 supplied13 by13 the13 instructions13 contained13 in13 the13 FROMxxxx13 Zile13 and13 you13 need13 merely13 conZirm13 them

9 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13 have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 NPrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis91 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13

for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

10 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 NPAG13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

11 Enter13 the13 name13 of13 your13 csv13 Zile13 now12 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile13 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset131 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects132 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry14 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset15 Enter13 the13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo 13 followed13 by13

return16 Select13 how13 you13 would13 like13 to13 model13 assay13 (observation)13 error13 for13 each13 output13 equation13 13 You13 have13 four13 choices13 13

In13 all13 four13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0161 Error13 model13 113 (SD)13 13 Choose13 this13 option13 if13 you13 have13 already13 run13 IT2B13 and13 multiplied13 your13 assay13 error13

polynomial13 by13 gamma13 (see13 next13 option13 for13 a13 description13 of13 gamma)162 Error13 model13 213 (SD13 13 gamma)13 13 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13

observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 If13 you13 choose13 this13 option13 you13 then13 can13 specify13 the13 starting13 value13 of13 gamma13 13 Good13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality

163 Error13 model13 313 (SD213 +13 lamda2)0513 13 Lamda13 is13 an13 alternative13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present

Userrsquos13 Guide13 13 2613 13

164 Error13 model13 413 SD13 =13 gamma13 13 This13 model13 is13 rarely13 used13 and13 is13 equivalent13 to13 specifying13 a13 model13 with13 C013 only13 ie13 a13 constant13 error13 regardless13 of13 concentration

17 Once13 you13 select13 the13 assay13 error13 model13 for13 each13 output13 equation13 you13 are13 then13 offered13 four13 more13 options13 on13 which13 assay13 error13 polynomial13 coefZicients13 to13 use13 13 Choices13 113 and13 213 are13 the13 most13 commonly13 used171 Choice13 113 The13 default13 13 Use13 coefZicients13 in13 the13 subject13 record13 (C013 C113 C213 C313 in13 the13 data13 csv13 Zile)13 and13 if13

missing13 use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 (item13 1813 below)172 Choice13 213 Use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 for13 all13 subjects13 regardless13 of13 what13 is13 in13 the13

data13 csv13 Zile173 Choice13 313 13 To13 multiply13 data13 csv13 values13 and13 default13 entered13 values13 by13 a13 Zixed13 gamma13 and13 use13 them13 13 174 Choice13 013 Specify13 coefZicients13 on13 a13 subject13 by13 subject13 basis13 either13 those13 in13 the13 data13 csv13 Zile13 already13 the13

default13 values13 entered13 into13 the13 program13 or13 other13 values18 For13 each13 output13 equation13 after13 you13 have13 selected13 the13 option13 in13 item13 1713 you13 will13 be13 prompted13 to13 supply13 the13

required13 information13 including13 the13 general13 default13 values13 for13 missing13 or13 overridden13 values13 in13 the13 data13 csv13 Zile19 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13

usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13

20 Enter13 the13 grid13 point13 index13 13 This13 number13 corresponds13 to13 the13 number13 of13 grid13 (support)13 points13 which13 will13 initially13 Zill13 the13 model13 parameter13 space13 13 The13 larger13 the13 number13 of13 random13 parameters13 to13 be13 estimated13 the13 more13 points13 are13 required13 13 The13 program13 will13 make13 a13 suggestion13 based13 on13 the13 number13 of13 random13 parameters13 in13 the13 model13 13 The13 more13 you13 choose13 the13 slower13 the13 run13 will13 be13 but13 results13 may13 improve13 13 It13 is13 reasonable13 to13 choose13 fewer13 points13 early13 in13 model13 exploration13 and13 increase13 in13 later13 phases13 or13 if13 poor13 model13 Zits13 or13 lack13 of13 convergence13 are13 noted13 The13 choices13 are13 113 to13 713 corresponding13 respectively13 to13 212913 500313 1000713 2001113 4000913 and13 8002113 points13 13 If13 you13 choose13 713 you13 then13 have13 an13 additional13 choice13 to13 select13 one13 or13 more13 multiples13 of13 8002113 points

21 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 013 or13 greater13 13 If13 you13 enter13 an13 integer13 greater13 than13 013 the13 engine13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13 If13 you13 enter13 013 this13 is13 the13 way13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 an13 independent13 data13 set13 and13 a13 non-shy‐uniform13 prior13 must13 be13 speciZied13 (see13 3013 below)13 13 This13 means13 that13 the13 engine13 will13 only13 calculate13 the13 individual13 Bayesian13 posteriors13 for13 the13 new13 subjects13 using13 the13 population13 joint13 density13 from13 a13 previous13 run13 as13 a13 Bayesian13 prior

22 Information13 about13 convergence13 criteria13 13 Answer13 113 or13 some13 other13 keystroke13 plus13 Return13 to13 acknowledge13 that13 you13 have13 read13 it

23 In13 order13 to13 predict13 concentrations13 from13 a13 non-shy‐parametric13 distribution13 you13 have13 the13 option13 to13 use13 the13 1)13 mean13 2)13 median13 or13 3)13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject13 13 We13 typically13 use13 the13 median13 Zirst13 and13 then13 the13 mean13 in13 a13 separate13 run13 and13 compare13 the13 differences13 13

24 Select13 the13 time13 interval13 to13 generate13 predicted13 concentrations13 13 Additionally13 there13 will13 also13 be13 predictions13 made13 at13 the13 time13 of13 each13 observation13 13 In13 general13 for13 most13 models13 predictions13 every13 1213 minutes13 provide13 sufZicient13 granularity13 13 Smaller13 values13 can13 result13 in13 very13 large13 Ziles13 for13 big13 populations

25 Select13 the13 default13 MIC13 to13 be13 used13 for13 AUCMIC13 ratio13 reporting13 13 This13 should13 generally13 be13 set13 to13 the13 default13 of13 113 by13 choosing13 113 13 You13 can13 always13 extract13 the13 AUC13 later13 and13 divide13 it13 by13 any13 MIC13 you13 choose

26 Enter13 the13 value13 in13 hours13 that13 you13 want13 for13 calculations13 of13 AUCs13 from13 predicted13 concentration13 proZiles13 13 The13 default13 is13 2413 hours13 which13 you13 can13 accept13 by13 entering13 113 or13 013 if13 you13 want13 to13 specify13 a13 different13 interval

27 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

28 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

Userrsquos13 Guide13 13 2713 13

29 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

30 For13 the13 prior13 density13 choose13 113 if13 it13 is13 to13 be13 uniform13 13 This13 means13 that13 the13 initial13 grid13 points13 will13 be13 evenly13 distributed13 with13 equal13 probability13 within13 the13 boundaries13 speciZied13 (in13 1513 above)13 13 If13 you13 choose13 013 you13 will13 be13 prompted13 for13 the13 name13 of13 a13 Zile13 that13 contains13 the13 prior13 density13 13 This13 will13 be13 DEN000113 unless13 you13 have13 changed13 its13 name13 13 It13 will13 be13 found13 in13 the13 output13 directory13 of13 a13 prior13 NPAG13 run13 13 The13 model13 used13 to13 generate13 the13 DEN000113 Zile13 must13 be13 exactly13 the13 same13 as13 the13 current13 model13 including13 parameter13 boundaries13 13 However13 this13 option13 is13 useful13 to13 specify13 a13 non-shy‐uniform13 density13 for13 two13 reasons13 13 The13 Zirst13 is13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 a13 new13 set13 of13 subjects13 13 Do13 this13 in13 combination13 with13 setting13 the13 number13 of13 cycles13 to13 013 (see13 2113 above)13 13 The13 second13 use13 for13 a13 non-shy‐uniform13 prior13 is13 to13 continue13 a13 previous13 run13 13 For13 example13 if13 you13 only13 set13 the13 number13 of13 cycles13 to13 5013 to13 get13 a13 rough13 idea13 of13 model13 Zit13 you13 may13 continue13 where13 you13 left13 off13 by13 specifying13 the13 DEN000113 Zile13 from13 the13 50-shy‐cycle13 run13 and13 continuing13 with13 as13 many13 additional13 cycles13 as13 you13 specify13 in13 item13 2113 13 So13 in13 the13 example13 if13 you13 specify13 10013 cycles13 in13 2113 the13 total13 number13 of13 cycles13 will13 be13 5013 +13 10013 =13 150

31 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 NPrun(instr=ldquoyourfilerdquo)13 option13 and13 including13 ldquoyourZilerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

32 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 NPAG13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 NPAG13 analysis

33 The13 NPAG13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

IT2B RunsIn13 the13 past13 users13 had13 to13 run13 IT2B13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 ITrun()13 13 However13 if13 ITrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13

have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 ITrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis

Userrsquos13 Guide13 13 2813 13

71 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13 for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

8 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 IT2B13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

9 Enter13 the13 name13 of13 your13 csv13 Zile13 now10 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile11 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset111 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects112 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry12 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset13 Enter13 the13 initial13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo13 followed13

by13 return14 The13 estimated13 mean13 for13 each13 parameter13 value13 distribution13 during13 the13 Zirst13 iteration13 will13 be13 the13 median13 of13 the13

range13 speciZied13 in13 1313 13 You13 now13 have13 the13 option13 to13 specify13 the13 standard13 deviation13 for13 the13 parameter13 value13 distribution13 which13 by13 default13 is13 half13 of13 the13 range13 in13 1313 13 Choose13 113 to13 accept13 this13 (the13 usual13 answer)13 or13 013 to13 change13 it13 to13 something13 else13 expressed13 as13 a13 multiple13 of13 the13 range

15 In13 IT2B13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 You13 can13 now13 choose13 113 if13 every13 subject13 has13 the13 same13 coefZicients13 or13 013 to13 use13 a13 unique13 set13 of13 coefZicients13 for13 each13 subject13 13 The13 Zirst13 case13 is13 the13 more13 usual13 when13 all13 13 samples13 from13 all13 subjects13 are13 analyzed13 in13 the13 same13 lab13 13 If13 13 samples13 are13 analyzed13 in13 different13 labs13 and13 you13 have13 the13 assay13 data13 from13 each13 lab13 then13 you13 would13 enter13 013 13 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 (see13 151313 below)13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0151 If13 you13 choose13 113 (one13 set13 of13 coefZicients13 for13 all13 subjects)13 you13 will13 then13 be13 presented13 with13 313 additional13

choices1511 Choice13 113 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13 observation13

including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 and13 to13 Zix13 gamma13 to13 1

1512 Choice13 213 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 but13 to13 estimate13 gamma13 based13 on13 the13 data13 13 This13 is13 the13 usual13 option

1513 Choice13 313 Choose13 this13 option13 if13 you13 wish13 to13 estimate13 the13 assay13 error13 coefZicients13 based13 on13 your13 data13 for13 use13 in13 future13 runs13 13 Although13 you13 can13 access13 this13 option13 by13 using13 either13 ITrun()13 or13 ERRrun()13 in13 R13 the13 instruction13 Ziles13 that13 you13 save13 and13 the13 generated13 output13 Ziles13 will13 be13 different13 13 Therefore13 we13 recommend13 that13 if13 you13 intend13 to13 choose13 this13 option13 use13 ERRrun()13 in13 R13 which13 will13 generate13 an13 ASS000113 Zile13 that13 contains13 the13 estimates13 for13 C013 C113 C213 and13 C313 13 You13 can13 then13 include13 this13 Zile13 in13 the13 working13 directory13 (along13 with13 a13 model13 txt13 Zile13 and13 a13 data13 csv13 Zile)13 to13 do13 an13 IT2B13 run13 supplying13 the13 Zile13 name13 in13 16113 below

Userrsquos13 Guide13 13 2913 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

General WorkflowThe13 general13 Pmetrics13 workZlow13 for13 IT2B13 and13 NPAG13 is13 shown13 in13 the13 following13 diagram

Data13 csv13 file Model13 txt13 file

PreparaCon13 program

Engine13 program

InstrucCon13 file

Output

ITrun()

13 NPrun

()

ITload()13 NPload()

R13 is13 used13 to13 specify13 the13 working13 directory13 containing13 the13 data13 csv13 and13 model13 txt13 Ziles13 Through13 the13 batch13 Zile13 generated13 by13 R13 the13 preparation13 program13 is13 compiled13 and13 executed13 13 The13 instruction13 Zile13 is13 generated13 automatically13 by13 the13 contents13 of13 the13 data13 and13 model13 Ziles13 and13 by13 arguments13 to13 the13 NPrun()13 ITrun()13 or13 ERRrun()13 commands13 The13 batch13 Zile13 will13 then13 compile13 and13 execute13 the13 engine13 Zile13 according13 to13 the13 instructions13 which13 will13 generate13 several13 output13 Ziles13 upon13 completion13 13 Finally13 the13 batch13 Zile13 will13 call13 the13 R13 script13 to13 generate13 the13 summary13 report13 and13 several13 data13 objects13 including13 the13 IT2BoutRdata13 or13 NPAGoutRdata13 Ziles13 which13 can13 be13 loaded13 into13 R13 subsequently13 using13 ITload()13 or13 NPload()Both13 input13 Ziles13 (data13 model)13 are13 text13 Ziles13 which13 can13 be13 edited13 directly

Userrsquos13 Guide13 13 813 13

Pmetrics Input FilesData13 csv13 Files

Pmetrics13 accepts13 input13 as13 a13 spreadsheet13 ldquomatrixrdquo13 format13 It13 is13 designed13 for13 input13 of13 multiple13 records13 in13 a13 concise13 way13 13 Please13 keep13 the13 number13 of13 characters13 in13 the13 Uile13 name13 le13 8Files13 are13 in13 comma-shy‐separated-shy‐values13 (csv)13 format13 13 Examples13 of13 programs13 that13 can13 save13 csv13 Ziles13 are13 any13 text13 editor13 (eg13 TextEdit13 on13 Mac13 Notepad13 on13 Windows)13 or13 spreadsheet13 program13 (eg13 Excel)13 13 Click13 on13 hyperlinked13 items13 to13 see13 an13 explanation13 13

IMPORTANT13 The13 order13 capitalization13 and13 names13 of13 the13 header13 and13 the13 Zirst13 1213 columns13 are13 Zixed13 13 All13 entries13 must13 be13 numeric13 with13 the13 exception13 of13 ID13 and13 ldquordquo13 for13 non-shy‐required13 placeholder13 entries

POPDATA13 DEC13 11ID EVID TIME DUR DOSE ADDL II INPUT OUT OUTEQ C0 C1 C2 C3 COVhellipGH 1 0 0 400 1 GH 0 05 042 1 001 01 0 0GH 0 1 046 1 001 01 0 0GH 0 2 247 1 001 01 0 0GH 4 0 0 150 1 GH 1 35 05 150 1 001 01 0 0GH 0 512 055 1 001 01 0 0GH 0 24 052 1 001 01 0 01423 1 0 1 400 -shy‐1 12 1 1423 1 01 0 100 2 1423 0 1 -shy‐99 1 001 01 0 01423 0 2 038 1 001 01 0 01423 0 2 16 2 005 02 -shy‐011 0002POPDATA13 DEC_1113 13 This13 is13 the13 header13 for13 the13 Zile13 and13 must13 be13 in13 the13 Zirst13 line13 13 It13 identiZies13 the13 versionID13 13 This13 Zield13 must13 be13 preceded13 by13 the13 ldquordquo13 symbol13 to13 conZirm13 that13 this13 is13 the13 header13 row13 It13 can13 be13

numeric13 or13 character13 and13 identiZies13 each13 individual13 13 All13 rows13 must13 contain13 an13 ID13 and13 all13 records13 from13 one13 individual13 must13 be13 contiguous13 13 Any13 subsequent13 row13 that13 begins13 with13 ldquordquo13 will13 be13 ignored13 which13 is13 helpful13 if13 you13 want13 to13 exclude13 data13 from13 the13 analysis13 but13 preserve13 the13 integrity13 of13 the13 original13 dataset13 or13 to13 add13 comment13 lines13 13 IDs13 should13 be13 1113 characters13 or13 less13 but13 may13 be13 any13 alphanumeric13 combination13 13 There13 can13 be13 at13 most13 80013 subjects13 per13 run

EVID13 This13 is13 the13 event13 ID13 Zield13 13 It13 can13 be13 013 113 or13 413 13 Every13 row13 must13 have13 an13 entry13 013 =13 observation13 113 =13 input13 (eg13 dose)13 213 313 are13 currently13 unused13 413 =13 reset13 where13 all13 compartment13 values13 are13 set13 to13 013 and13 the13 time13 counter13 is13 reset13 to13 013 13 This13 is13

useful13 when13 an13 individual13 has13 multiple13 sampling13 episodes13 that13 are13 widely13 spaced13 in13 time13 with13 no13 new13 information13 gathered13 13 This13 is13 a13 dose13 event13 so13 dose13 information13 needs13 to13 be13 complete

TIME13 This13 is13 the13 elapsed13 time13 in13 decimal13 hours13 since13 the13 Zirst13 event13 13 It13 is13 not13 currently13 clock13 time13 (eg13 2130)13 although13 this13 is13 planned13 13 Every13 row13 must13 have13 an13 entry13 and13 within13 a13 given13 ID13 rows13 must13 be13 sorted13 chronologically13 earliest13 to13 latest13 13

DUR13 This13 is13 the13 duration13 of13 an13 infusion13 in13 hours13 13 If13 EVID=113 there13 must13 be13 an13 entry13 otherwise13 it13 is13 ignored13 13 For13 a13 bolus13 (ie13 an13 oral13 dose)13 set13 the13 value13 equal13 to13 0

Userrsquos13 Guide13 13 913 13

DOSE13 This13 is13 the13 dose13 amount13 13 If13 EVID=113 there13 must13 be13 an13 entry13 otherwise13 it13 is13 ignoredADDL13 This13 speciZies13 the13 number13 of13 additional13 doses13 to13 give13 at13 interval13 II13 13 It13 may13 be13 missing13 for13 dose13

events13 (EVID=113 or13 4)13 in13 which13 case13 it13 is13 assumed13 to13 be13 013 13 It13 is13 ignored13 for13 observation13 (EVID=0)13 events13 13 Be13 sure13 to13 adjust13 the13 time13 entry13 for13 the13 subsequent13 row13 if13 necessary13 to13 account13 for13 the13 extra13 doses13 13 If13 set13 to13 -shy‐113 the13 dose13 is13 assumed13 to13 be13 given13 under13 steady-shy‐state13 conditions13 13 ADDL=-shy‐113 can13 only13 be13 used13 for13 the13 Zirst13 dose13 event13 for13 a13 given13 subject13 or13 an13 EVID=413 event13 as13 you13 cannot13 suddenly13 be13 at13 steady13 state13 in13 the13 middle13 of13 dosing13 record13 unless13 all13 compartmentstimes13 are13 reset13 to13 013 (as13 for13 an13 EVID=413 event)

II13 This13 is13 the13 interdose13 interval13 and13 is13 only13 relevant13 if13 ADDL13 is13 not13 equal13 to13 013 in13 which13 case13 it13 cannot13 be13 missing13 13 If13 ADDL=013 or13 is13 missing13 II13 is13 ignored

INPUT13 This13 deZines13 which13 input13 (ie13 drug)13 the13 DOSE13 corresponds13 to13 13 Inputs13 are13 deZined13 in13 the13 model13 Zile

OUT 13 This13 is13 the13 observation13 or13 output13 value13 13 If13 EVID=013 there13 must13 be13 an13 entry13 if13 missing13 this13 must13 be13 coded13 as13 -shy‐9913 13 It13 will13 be13 ignored13 for13 any13 other13 EVID13 and13 therefore13 can13 be13 ldquordquo13 13 There13 can13 be13 at13 most13 15013 observations13 for13 a13 given13 subject

OUTEQ13 This13 is13 the13 output13 equation13 number13 that13 corresponds13 to13 the13 OUT13 value13 13 Output13 equations13 are13 deZined13 in13 the13 model13 Zile

C013 C113 C213 C313 These13 are13 the13 coefZicients13 for13 the13 assay13 error13 polynomial13 for13 that13 observation13 13 Each13 subject13 may13 have13 up13 to13 one13 set13 of13 coefZicients13 per13 output13 equation13 13 If13 more13 than13 one13 set13 is13 detected13 for13 a13 given13 subject13 and13 output13 equation13 the13 last13 set13 will13 be13 used13 13 If13 there13 are13 no13 available13 coefZicients13 these13 cells13 may13 be13 left13 blank13 or13 Zilled13 with13 ldquordquo13 as13 a13 placeholder

COV13 Any13 column13 after13 the13 assay13 error13 coefZicients13 is13 assumed13 to13 be13 a13 covariate13 one13 column13 per13 covariate

Model13 Files

Model13 Ziles13 for13 Pmetrics13 are13 ultimately13 Fortran13 text13 Ziles13 with13 a13 header13 version13 of13 TSMULT13 13 As13 of13 Pmetrics13 version13 03013 we13 have13 adopted13 a13 very13 simple13 user13 format13 that13 Pmetrics13 will13 use13 to13 generate13 the13 Fortran13 code13 automatically13 for13 you13 13 Version13 0413 additionally13 eliminates13 the13 previously13 separate13 instruction13 Zile13 A13 model13 library13 is13 available13 on13 our13 website13 at13 httpwwwlapkorgpmetricsphp13 13 Naming13 your13 model13 files13 The13 default13 model13 Zile13 name13 is13 ldquomodeltxtrdquo13 but13 you13 can13 call13 them13 whatever13 you13 wish13 13 However13 please13 keep13 the13 number13 of13 characters13 in13 the13 model13 Uile13 name13 le13 813 When13 you13 use13 a13 model13 Zile13 in13 NPrun() ITrun ERRrun() or SIMrun()13 Pmetrics13 will13 make13 a13 Fortran13 model13 Zile13 of13 the13 same13 name13 temporarily13 renaming13 your13 Zile13 13 At13 the13 end13 of13 the13 run13 your13 original13 model13 Zile13 will13 be13 in13 the13 inputs13 subfolder13 of13 the13 run13 folder13 and13 the13 generated13 Fortran13 model13 Zile13 will13 be13 called13 ldquomodelforrdquo13 and13 moved13 to13 the13 etc13 subfolder13 of13 the13 run13 folder13 13 If13 your13 model13 is13 called13 ldquomymodeltxtrdquo13 then13 the13 Fortran13 Zile13 will13 be13 ldquomymodelforrdquoYou13 can13 still13 use13 appropriate13 Fortran13 model13 Ziles13 directly13 but13 we13 suggest13 you13 keep13 the13 for13 extension13 for13 all13 Fortran13 Ziles13 to13 avoid13 confusion13 with13 the13 new13 format13 13 If13 you13 use13 a13 for13 Zile13 as13 your13 model13 you13 will13 have13 to13 specify13 its13 name13 explicitly13 in13 the13 NPrun() ITrun ERRrun() or SIMrun()13 command13 since13 the13 default13 model13 name13 again13 is13 ldquomodeltxtrdquo13 13 If13 you13 use13 a13 for13 Zile13 directly13 it13 will13 be13 in13 the13 inputs13 subfolder13 of13 the13 run13 folder13 not13 in13 etc13 since13 you13 did13 not13 use13 the13 simpler13 template13 as13 your13 model13 Zile

Structure13 of13 model13 files13 The13 new13 model13 Zile13 is13 a13 text13 Zile13 with13 1113 blocks13 each13 marked13 by13 13 followed13 by13 a13 header13 tagPRImary13 variablesCOVariatesSECcondary13 variablesBOLus13 inputsINItial13 conditions

Userrsquos13 Guide13 13 1013 13

F13 (bioavailability)LAG13 timeDIFferential13 equationsOUTputsERRorEXTraFor13 each13 header13 only13 the13 capital13 letters13 are13 required13 for13 recognition13 by13 Pmetrics13 The13 blocks13 can13 be13 in13 any13 order13 and13 header13 names13 are13 case-shy‐insensitive13 (ie13 the13 capitalization13 here13 is13 just13 to13 show13 which13 letters13 are13 required)13 Fortran13 is13 also13 case-shy‐insensitive13 so13 in13 variable13 names13 and13 expressions13 case13 is13 ignored13 13 Details13 of13 each13 block13 are13 next13 followed13 by13 a13 complete13 example

Primary13 variables

Primary13 variables13 are13 the13 model13 parameters13 that13 are13 to13 be13 estimated13 by13 Pmetrics13 or13 are13 designated13 as13 Zixed13 parameters13 with13 user13 speciZied13 values13 It13 should13 be13 a13 list13 of13 variable13 names13 one13 name13 to13 a13 line13 Variable13 names13 should13 be13 1113 characters13 or13 fewer13 Some13 variable13 names13 are13 reserved13 for13 use13 by13 Pmetrics13 and13 cannot13 be13 used13 as13 primary13 variable13 names13 13 13 The13 number13 of13 primary13 variables13 must13 be13 between13 213 and13 3213 with13 at13 most13 3013 random13 or13 2013 Uixed13 13 On13 each13 row13 following13 the13 variable13 name13 include13 the13 range13 for13 the13 parameter13 that13 deZines13 the13 search13 space13 13 For13 NPAG13 this13 is13 absolute13 ie13 the13 algorithm13 will13 not13 search13 outside13 this13 range13 13 For13 IT2B13 the13 range13 is13 a13 starting13 range13 13 The13 simulator13 will13 ignore13 the13 ranges13 ExamplePriKE13 013 5V13 00113 100KA13 013 5KCP13 013 5KPC13 013 13 5Tlag113 013 2IC313 013 10000FA113 013 1

Covariates

Covariates13 are13 subject13 speciZic13 data13 such13 as13 body13 weight13 contained13 in13 the13 data13 csv13 Zile13 The13 covariate13 names13 which13 are13 the13 column13 names13 in13 the13 data13 Zile13 can13 be13 included13 here13 for13 use13 in13 secondary13 variable13 equations13 The13 order13 should13 be13 the13 same13 as13 in13 the13 data13 Zile13 and13 although13 the13 names13 do13 not13 have13 to13 be13 the13 same13 we13 strongly13 encourage13 you13 to13 make13 them13 the13 same13 to13 avoid13 confusionCovariates13 are13 applied13 at13 each13 dose13 event13 13 The13 Zirst13 dose13 event13 for13 each13 subject13 must13 have13 a13 value13 for13 every13 covariate13 in13 the13 data13 Zile13 13 By13 default13 missing13 covariate13 values13 for13 subsequent13 dose13 events13 are13 linearly13 interpolated13 between13 existing13 values13 or13 carried13 forward13 if13 the13 Zirst13 value13 is13 the13 only13 non-shy‐missing13 entry13 13 To13 suppress13 interpolation13 and13 carry13 forward13 the13 previous13 value13 in13 a13 piece-shy‐wise13 constant13 fashion13 include13 an13 exclamation13 point13 ()13 in13 any13 declaration13 lineNote13 that13 any13 covariate13 relationship13 to13 any13 parameter13 may13 be13 described13 as13 the13 user13 wishes13 by13 mathematical13 equations13 and13 Fortran13 code13 allowing13 for13 exploration13 of13 complex13 non-shy‐linear13 time-shy‐dependent13 andor13 conditional13 relationshipsExampleCovwtcypIC()

Userrsquos13 Guide13 13 1113 13

where13 IC13 will13 be13 piece-shy‐wise13 constant13 and13 the13 other13 two13 will13 be13 linearly13 interpolated13 for13 missing13 values

Secondary13 variables

Secondary13 variables13 are13 those13 that13 are13 deZined13 by13 equations13 that13 are13 combinations13 of13 primary13 covariates13 and13 other13 secondary13 variables13 If13 using13 other13 secondary13 variables13 deZine13 them13 Zirst13 within13 this13 block13 Equation13 syntax13 must13 be13 Fortran13 It13 is13 permissible13 to13 have13 conditional13 statements13 but13 because13 expressions13 in13 this13 block13 are13 translated13 into13 variable13 declarations13 in13 Fortran13 expressions13 other13 than13 of13 the13 form13 X13 =13 function(Y)13 must13 be13 preZixed13 by13 a13 +13 and13 contain13 only13 variables13 which13 have13 been13 previously13 deZined13 in13 the13 Primary13 Covariate13 or13 Secondary13 blocksExampleSecCL13 =13 Ke13 13 V13 13 wt075+IF(cyp13 GT13 1)13 CL13 =13 CL13 13 cyp

Bolus13 inputs

By13 default13 inputs13 with13 DUR13 (duration)13 of13 013 in13 the13 data13 csv13 Zile13 are13 delivered13 instantaneously13 to13 the13 model13 compartment13 equal13 to13 the13 input13 number13 ie13 input13 113 goes13 to13 compartment13 113 input13 213 goes13 to13 compartment13 213 etc13 This13 can13 be13 overridden13 with13 NBOLUS(input13 number)13 =13 compartment13 numberExampleBolNBCOMP(1)13 =13 2

Ini1al13 condi1ons

By13 default13 all13 model13 compartments13 have13 zero13 amounts13 at13 time13 013 This13 can13 be13 changed13 by13 specifying13 the13 compartment13 amount13 as13 X()13 =13 expression13 where13 13 is13 the13 compartment13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignoredExampleIniX(2)13 =13 ICV13 (ie13 IC13 is13 a13 covariate13 with13 the13 measured13 trough13 concentration13 prior13 to13 an13 observed13 dose)X(3)13 =13 IC313 (ie13 IC313 is13 a13 Zitted13 amount13 in13 this13 unobserved13 compartment)In13 the13 Zirst13 case13 the13 initial13 condition13 for13 compartment13 213 becomes13 the13 value13 of13 the13 IC13 covariate13 (deZined13 in13 Covariate13 block)13 multiplied13 by13 the13 current13 estimate13 of13 V13 during13 each13 iteration13 13 This13 is13 useful13 when13 a13 subject13 has13 been13 taking13 a13 drug13 as13 an13 outpatient13 and13 comes13 in13 to13 the13 lab13 for13 PK13 sampling13 with13 measurement13 of13 a13 concentration13 immediately13 prior13 to13 a13 witnessed13 dose13 which13 is13 in13 turn13 followed13 by13 more13 sampling13 13 In13 this13 case13 IC13 or13 any13 other13 covariate13 can13 be13 set13 to13 the13 initial13 measured13 concentration13 and13 if13 V13 is13 the13 volume13 of13 compartment13 213 the13 initial13 condition13 (amount)13 in13 compartment13 213 will13 now13 be13 set13 to13 the13 measured13 concentration13 of13 drug13 multiplied13 by13 the13 estimated13 volume13 for13 each13 iteration13 until13 convergenceIn13 the13 second13 case13 the13 initial13 condition13 for13 compartment13 313 becomes13 another13 variable13 IC313 deZined13 in13 the13 Primary13 block13 to13 Zit13 in13 the13 model13 given13 the13 observed13 data

F13 (bioavailability)

Specify13 the13 bioavailability13 term13 if13 present13 Use13 the13 form13 FA()13 =13 expression13 where13 13 is13 the13 input13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignored

Userrsquos13 Guide13 13 1213 13

ExampleFFA(1)13 =13 FA1

Lag13 1me

Specify13 the13 lag13 term13 if13 present13 which13 is13 the13 delay13 after13 an13 absorbed13 dose13 before13 observed13 concentrations13 Use13 the13 form13 TLAG()13 =13 expression13 where13 13 is13 the13 input13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignoredExampleLagTLAG(1)13 =13 Tlag1

Differen1al13 equa1ons

Specify13 a13 model13 in13 terms13 of13 ordinary13 differential13 equations13 in13 Fortran13 format13 XP()13 is13 the13 notation13 for13 dX()dt13 where13 13 is13 the13 compartment13 number13 X()13 is13 the13 amount13 in13 the13 compartment13 There13 can13 be13 a13 maximum13 of13 2013 such13 equationsExampleDifXP(1)13 =13 -shy‐KAX(1)XP(2)13 =13 RATEIV(1)13 +13 KAX(1)13 -shy‐13 (KE+KCP)X(2)13 +13 KPCX(3)XP(3)13 =13 KCPX(2)13 -shy‐13 KPCX(3)RATEIV(1)13 is13 the13 notation13 to13 indicate13 an13 infusion13 of13 input13 113 (typically13 drug13 1)13 13 The13 duration13 of13 the13 infusion13 and13 total13 dose13 is13 deZined13 in13 the13 data13 csv13 Zile13 Up13 to13 713 inputs13 are13 currently13 allowed13 13 These13 can13 be13 used13 in13 the13 model13 Zile13 as13 RATEIV(1)13 RATEIV(2)13 etc13 13 The13 compartments13 for13 13 receiving13 the13 inputs13 of13 oral13 (bolus)13 doses13 are13 deZined13 in13 the13 Bolus13 block

Outputs

Output13 equations13 in13 Fortran13 format13 Outputs13 are13 of13 the13 form13 Y()13 =13 expression13 where13 13 is13 the13 output13 equation13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignored13 There13 can13 be13 a13 maximum13 of13 613 outputs13 13 They13 are13 referred13 to13 as13 Y(1)13 Y(2)13 etcExampleOutY(1)13 =13 X(2)V

Error

This13 block13 contains13 all13 the13 information13 Pmetrics13 requires13 for13 the13 structure13 of13 the13 error13 model13 13 In13 Pmetrics13 each13 observation13 is13 weighted13 by13 1error213 13 13 There13 are13 two13 choices13 for13 the13 error13 term

113 13 error13 =13 SD13 13 gamma213 13 error13 =13 (SD213 +13 lamda2)0513 (Note13 that13 lambda13 is13 only13 available13 in13 NPAG13 currently)

where13 SD13 is13 the13 standard13 deviation13 (SD)13 of13 each13 observation13 [obs]13 and13 gamma13 and13 lambda13 are13 terms13 to13 capture13 extra13 process13 noise13 related13 to13 the13 observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 SD13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 The13 13 values13 for13 the13 coefZicients13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13

Userrsquos13 Guide13 13 1313 13

coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly() 13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0In13 the13 multiplicative13 model13 13 gamma13 is13 a13 scalar13 on13 SD13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 Lambda13 is13 an13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 We13 tend13 to13 prefer13 lambda

To13 specify13 the13 model13 in13 this13 block13 the13 Zirst13 line13 needs13 to13 be13 either13 L=[number]13 or13 G=[number]13 for13 a13 lambda13 or13 gamma13 error13 model13 13 The13 [number]13 term13 is13 the13 starting13 value13 for13 lambda13 or13 gamma13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present13 13 For13 gamma13 good13 starting13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality13 13 If13 you13 include13 an13 exclamation13 point13 ()13 in13 the13 declaration13 then13 lambda13 or13 gamma13 will13 be13 Zixed13 and13 not13 estimated13 13 Note13 that13 you13 can13 only13 Zix13 lambda13 currently13 to13 zeroThe13 next13 line(s)13 contain13 the13 values13 for13 C013 C113 C213 and13 C313 separated13 by13 commas13 13 There13 should13 be13 one13 line13 of13 coefZicients13 for13 each13 output13 equation13 13 By13 default13 Pmetrics13 will13 use13 values13 for13 these13 coefZicients13 found13 in13 the13 data13 Zile13 13 If13 none13 are13 present13 or13 if13 the13 model13 declaration13 line13 contains13 an13 exclamation13 point13 ()13 the13 values13 here13 will13 be13 used

Example13 113 estimated13 lambda13 starting13 at13 0413 one13 output13 use13 data13 Zile13 coefZicients13 but13 if13 missing13 use13 010100ErrL=04010100

Example13 213 Zixed13 gamma13 of13 213 two13 outputs13 use13 data13 Zile13 coefZicients13 but13 if13 missing13 use13 01010013 for13 the13 Zirst13 output13 but13 use13 0313 0113 013 013 for13 output13 213 regardless13 of13 what13 is13 in13 the13 data13 ZileErrG=2010100030100

Extra

This13 block13 is13 for13 advanced13 Fortran13 programmers13 only13 13 Occasionally13 for13 very13 complex13 models13 additional13 Fortran13 subroutines13 are13 required13 13 They13 can13 be13 placed13 here13 13 The13 code13 must13 specify13 complete13 Fortran13 subroutines13 which13 can13 be13 called13 from13 other13 blocks13 with13 appropriate13 call13 functions13 13

Reserved13 Names

The13 following13 cannot13 be13 used13 as13 primary13 covariate13 or13 secondary13 variable13 names13 They13 can13 be13 used13 in13 equations13 however

Reserved13 Variable Func1on13 in13 Pmetricsndim internal

t time

Userrsquos13 Guide13 13 1413 13

x array13 of13 compartment13 amounts

xp array13 of13 Zirst13 derivative13 of13 compartment13 amounts

rpar internal

ipar internal

p array13 of13 primary13 parameters

r input13 rates

b input13 boluses

npl internal

numeqt output13 equation13 number

ndrug input13 number

nadd covariate13 number

rateiv intravenous13 input13 for13 inputs13 when13 DURgt013 in13 data13 Ziles

cv covariate13 values13 array

n number13 of13 compartments

nd internal

ni internal

nup internal

nuic internal

np number13 of13 primary13 parameters

nbcomp bolus13 compartment13 array

psym names13 of13 primary13 parameters

fa biovailability

tlag lag13 time

tin internal

tout internal

Complete13 Example

Here13 is13 a13 complete13 example13 of13 a13 model13 Zile13 as13 of13 Pmetrics13 version13 04013 and13 higher

Userrsquos13 Guide13 13 1513 13

NotesBy13 omitting13 a13 Diffeq13 block13 with13 ODEs13 Pmetrics13 understands13 that13 you13 are13 specifying13 the13 model13 to13 be13 solved13 algebraically13 In13 this13 case13 at13 least13 KE13 and13 V13 must13 be13 in13 the13 Primary13 or13 Secondary13 variables13 KA13 KCP13 and13 KPC13 are13 optional13 and13 specify13 absorption13 and13 transfer13 to13 and13 from13 the13 central13 to13 a13 peripheral13 compartment13 respectively

PriKE13 013 5V013 0113 100KA13 013 5Tlag113 013 3Cov13 wt

SecV13 =13 V0wt

LagTLAG(1)13 =13 Tlag1

OutY(1)13 =13 X(2)V

ErrL=04010100

Userrsquos13 Guide13 13 1613 13

Brief13 Fortran13 Tutorial

Much13 more13 detailed13 help13 is13 available13 from13 httpwwwcsmtuedu~sheneCOURSEScs201NOTESfortranhtml

Arithmetic Operator Meaning

+ addition

- subtraction

multiplication

division

exponentiation

Relational Operator Alternative Operator Meaning

lt LT less than

lt= LE less than or equal

gt GT greater than

gt= GE greater than or equal

== EQ equal

= NE not equal

Selective Execution Example

IF (logical-expression) one-statement IF (T gt= 100) CL = 10

IF (logical-expression) THEN statementsEND IF

IF (T gt= 100) THEN CL = 10 V = 10END IF

IF (logical-expression) THEN statements-1ELSE statements-2END IF

IF (T gt= 100) THEN CL = 10ELSE CL = CLEND IF

Userrsquos13 Guide13 13 1713 13

How to use R and PmetricsSeCng13 up13 a13 Pmetrics13 project

When13 beginning13 a13 new13 modeling13 project13 it13 is13 convenient13 to13 use13 the13 command13 PMtree(ldquoproject namerdquo)13 13 This13 command13 will13 set13 up13 a13 new13 directory13 in13 the13 current13 working13 directory13 named13 whatever13 you13 have13 included13 as13 the13 ldquoproject13 namerdquo13 13 For13 example13 a13 directory13 called13 ldquoDrugXrdquo13 will13 be13 created13 by13 PMtree(ldquoDrugXrdquo)13 13 Beneath13 this13 directory13 several13 subdirectories13 will13 be13 also13 created13 Rscript13 Runs13 Sim13 and13 src13 13 The13 Rscript13 subdirectory13 will13 contain13 a13 skeleton13 R13 script13 to13 begin13 Pmetrics13 runs13 in13 the13 new13 project13 13 The13 Runs13 subdirectory13 should13 contain13 all13 Ziles13 required13 for13 a13 run13 (described13 next)13 and13 it13 will13 also13 contain13 the13 resulting13 numerically13 ordered13 run13 directories13 created13 after13 each13 Pmetrics13 NPAG13 or13 IT2B13 run13 13 The13 Sim13 subdirectory13 can13 contain13 any13 Ziles13 related13 to13 simulations13 and13 the13 src13 subdirectory13 should13 contain13 original13 and13 manipulated13 source13 data13 Ziles13 13 Of13 course13 you13 are13 free13 to13 edit13 this13 directory13 tree13 structure13 as13 you13 please13 or13 make13 your13 own13 entirely

GeCng13 the13 required13 files13 to13 run13 Pmetrics

When13 you13 wish13 to13 execute13 a13 Pmetrics13 run13 you13 must13 ensure13 that13 appropriate13 Pmetrics13 model13 txt13 and13 data13 csv13 Ziles13 are13 in13 the13 working13 directory13 ie13 the13 Runs13 subdirectory13 of13 the13 project13 directory13 13 13 13 R13 can13 be13 used13 to13 help13 prepare13 the13 data13 csv13 Zile13 by13 importing13 and13 manipulating13 spreadsheets13 (eg13 readcsv())13 13 The13 Pmetrics13 function13 PMcheck()13 can13 be13 used13 to13 check13 a13 csv13 Zile13 or13 an13 R13 dataframe13 that13 is13 to13 be13 saved13 as13 a13 Pmetrics13 data13 13 csv13 Zile13 for13 errors13 13 13 13 13 13 It13 can13 also13 check13 a13 model13 Zile13 for13 errors13 in13 the13 context13 of13 a13 dataZile13 eg13 covariates13 that13 do13 not13 match13 13 PMfixMatrix()13 attempts13 to13 automatically13 rid13 data13 Ziles13 of13 errors13 13 The13 function13 PMwriteMatrix() 13 can13 be13 used13 to13 write13 the13 R13 data13 object13 in13 the13 correct13 format13 for13 use13 by13 IT2B13 NPAG13 or13 the13 Simulator13 13 You13 can13 also13 download13 sample13 data13 and13 scripts13 from13 the13 Pmetrics13 downloads13 section13 of13 our13 website13 once13 you13 sign13 in13 with13 your13 LAPK13 user13 email13 address13 and13 password13 13 Edit13 prior13 versions13 of13 model13 Ziles13 to13 make13 new13 model13 Ziles

Using13 scripts13 to13 control13 Pmetrics

As13 you13 will13 see13 in13 the13 skeleton13 R13 script13 made13 by13 PMtree() and13 placed13 in13 the13 Rscript13 subdirectory13 if13 this13 is13 a13 Zirst-shy‐time13 run13 the13 R13 commands13 to13 run13 IT2B13 or13 NPAG13 are13 as13 follows13 13 Recall13 that13 the13 ldquordquo13 character13 is13 a13 comment13 character

library(Pmetrics)Run 1 - add your run description heresetwd(ldquoworking directoryrdquo)NPrun() for NPAG or ITrun() for IT2B

The13 Zirst13 line13 will13 load13 the13 Pmetrics13 library13 of13 functions13 13 The13 second13 line13 sets13 the13 working13 directory13 to13 the13 speciZied13 path13 13 The13 third13 line13 generates13 the13 batch13 Zile13 to13 run13 NPAG13 or13 IT2B13 and13 saves13 it13 to13 the13 working13 directory13

NOTE13 13 On13 Mac13 systems13 the13 batch13 Zile13 will13 be13 automatically13 launched13 in13 a13 Terminal13 window13 13 On13 Windows13 systems13 the13 batch13 Zile13 must13 be13 launched13 manually13 by13 double13 clicking13 the13 np_runbat13 or13 it_runbat13 Zile13 in13 the13 working13 directory

ITrun() 13 and13 NPrun()13 both13 return13 the13 full13 path13 of13 the13 output13 directory13 to13 the13 clipboard13 13 By13 default13 runs13 are13 placed13 in13 folders13 numbered13 sequentially13 beginning13 with13 ldquo1rdquoNow13 the13 output13 of13 IT2B13 or13 NPAG13 needs13 to13 be13 loaded13 into13 R13 so13 the13 next13 command13 does13 this

NPload(run_number) or ITload(run_number)

Details13 of13 these13 commands13 and13 what13 is13 loaded13 are13 described13 in13 the13 R13 documentation13 (NPload 13 or13 ITload)13 and13 in13 the13 following13 section13 13 The13 run_number13 should13 be13 included13 within13 the13 parentheses13 to13 be13 appended13 to13 the13 names13

Userrsquos13 Guide13 13 1813 13

of13 loaded13 R13 objects13 allowing13 for13 comparison13 between13 runs13 eg13 NPload(1)13 13 Finally13 at13 this13 point13 other13 Pmetrics13 commands13 can13 be13 added13 to13 the13 script13 to13 process13 the13 data13 such13 as13 the13 following

plot(final1)plot(cycle1)plot(op1type=rdquopoprdquo) or plot(op1$pop1)plot(op1) default is to plot posterior predictions for output 1plot(op1type=rdquopoprdquoresid=T)

Of13 course13 the13 full13 power13 of13 R13 can13 be13 used13 in13 scripts13 to13 analyze13 data13 but13 these13 simple13 statements13 serve13 as13 examplesIf13 you13 do13 not13 use13 the13 PMtree() structure13 we13 suggest13 that13 the13 R13 script13 for13 a13 particular13 project13 be13 saved13 into13 a13 folder13 called13 ldquoRscriptrdquo13 or13 some13 other13 meaningful13 name13 in13 the13 working13 directory13 13 Folders13 are13 not13 be13 moved13 by13 the13 batch13 Zile13 13 Within13 the13 script13 number13 runs13 sequentially13 and13 use13 comments13 liberally13 to13 13 distinguish13 runs13 as13 shown13 below

library(Pmetrics)

Run 1 - Ka Kel V all subjectssetwd(ldquoworking directoryrdquo)NPrun() assumes model=rdquomodeltxtrdquo and data=rdquodatacsvrdquoNPload(1)

Remember13 in13 R13 that13 the13 command13 example(function) will13 provide13 examples13 for13 the13 speciZied13 function13 13 Most13 Pmetrics13 functions13 have13 examples

Pmetrics Data ObjectsAfter13 a13 successful13 IT2B13 or13 NPAG13 run13 an13 R13 dataZile13 is13 saved13 in13 the13 output13 subdirectory13 of13 the13 newly13 created13 numerically13 ordered13 folder13 in13 the13 working13 directory13 13 After13 IT2B13 this13 Zile13 is13 called13 ldquoIT2BoutRdatardquo13 and13 after13 NPAG13 it13 is13 called13 ldquoNPAGoutRdatardquo13 13 As13 mentioned13 in13 the13 previous13 section13 these13 data13 Ziles13 can13 be13 loaded13 by13 ensuring13 that13 the13 Runs13 folder13 is13 set13 as13 the13 working13 directory13 and13 then13 using13 the13 Pmetrics13 commands13 ITload(run_num)13 or13 NPload(run_num)

Both13 commands13 load13 their13 respective13 Rdata13 Ziles13 into13 R13 making13 the13 contained13 objects13 available13 for13 plotting13 and13 other13 analysisObjects13 loaded13 by13 ITload(run_num) and NPload(run_num)

Objects Variables Comments

op13 (class13 PMop13 list) $pop113 $post113 Population13 and13 posterior13 predictions13 for13 each13 output13 equation13 ie13 113 213

13 $id Subject13 identiZication

13 $time Observation13 time13 in13 relative13 decimal13 hours

13 $obs Observation

13 $pred Prediction13 based13 on13 median13 of13 population13 or13 posterior13 parameter13 value13 distributions

Userrsquos13 Guide13 13 1913 13

Objects Variables Comments

13 $block Dosing13 block13 usually13 113 unless13 data13 Zile13 contains13 EVID=413 dose13 reset13 events13 in13 which13 case13 each13 such13 reset13 within13 a13 given13 ID13 will13 increment13 the13 dosing13 block13 by13 113 for13 that13 ID

13 $obsSD Calculated13 standard13 deviation13 (error)13 of13 the13 observation13 based13 on13 the13 assay13 error13 polynomial

13 $d Difference13 between13 pred13 and13 obs

13 $ds Squared13 difference13 between13 pred13 and13 obs

13 $wd $d13 weighted13 by13 the13 $obsSD

13 $wds $ds13 weighted13 by13 the13 $obsSD

Zinal13 (class13 PMZinal13 list) $popPoints (NPAG13 only)13 Dataframe13 of13 the13 Zinal13 cycle13 joint13 population13 density13 of13 grid13 points13 with13 column13 names13 equal13 to13 the13 name13 of13 each13 random13 parameter13 plus13 $prob13 for13 the13 associated13 probability13 of13 that13 point13

$popMean The13 Zinal13 cycle13 mean13 for13 each13 random13 parameter13 distribution

$popSD The13 Zinal13 cycle13 standard13 deviation13 for13 each13 random13 parameter13 distribution

$popCV The13 Zinal13 cycle13 coefZicient13 of13 variation13 for13 each13 random13 parameter13 distribution

$popVar The13 Zinal13 cycle13 variance13 for13 each13 random13 parameter13 distribution

$popCov The13 Zinal13 cycle13 covariance13 matrix13 for13 each13 random13 parameter13 distribution

$popCor The13 Zinal13 cycle13 correlation13 matrix13 for13 each13 random13 parameter13 distribution

$popMedian The13 Zinal13 cycle13 median13 for13 each13 random13 parameter13 distribution

$gridpts (NPAG13 only)13 The13 initial13 number13 of13 support13 points

$ab Matrix13 of13 boundaries13 for13 random13 parameter13 values13 13 For13 NPAG13 this13 is13 speciZied13 by13 the13 user13 prior13 to13 the13 run13 for13 IT2B13 it13 is13 calculated13 as13 a13 user13 speciZied13 multiple13 of13 the13 SD13 for13 the13 parameter13 value13 distribution

Userrsquos13 Guide13 13 2013 13

Objects Variables Comments

cycle13 (class13 PMcycle13 list) $names Vector13 of13 names13 of13 the13 random13 parameters

$ll Matrix13 of13 cycle13 number13 and13 -shy‐2Log-shy‐likelihood13 at13 each13 cycle

$gamlam A13 matrix13 of13 cycle13 number13 and13 gamma13 or13 lambda13 at13 each13 cycle13 (see13 item13 1613 under13 NPAG13 Runs13 below13 for13 a13 discussion13 of13 gamma13 and13 lambda)

$mean A13 matrix13 of13 cycle13 number13 and13 the13 mean13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 mean

$sd A13 matrix13 of13 cycle13 number13 and13 the13 standard13 deviation13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$median A13 matrix13 of13 cycle13 number13 and13 the13 median13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$aic A13 matrix13 of13 cycle13 number13 and13 Akaike13 Information13 Criterion13 at13 each13 cycle

$bic A13 matrix13 of13 cycle13 number13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle

cov13 (class13 PMcov13 dataframe)

$id Subject13 identiZication

$time Time13 for13 each13 covariate13 entry

covariates Covariate13 values13 for13 each13 subject13 at13 each13 time13 extracted13 from13 the13 raw13 data13 Zile

parameters Mean13 median13 or13 mode13 of13 Bayesian13 posterior13 distribution13 for13 each13 random13 parameter13 in13 the13 model13 13 Mode13 summaries13 are13 available13 for13 NPAG13 output13 only13 and13 the13 default13 is13 median13 13 Values13 are13 recycled13 for13 each13 row13 within13 a13 given13 subject13 with13 the13 number13 of13 rows13 driven13 by13 the13 number13 of13 covariate13 entries

Userrsquos13 Guide13 13 2113 13

Objects Variables Comments

pop13 (class13 PMpop13 dataframe)

post13 (class13 PMpost13 dataframe)

NPAG13 only

$id Subject13 identiZication

$pred113 Population13 prior13 (PMpop)13 or13 Bayesian13 posterior13 (PMpost)13 predictions13 for13 each13 output13 equation13 based13 on13 mean13 median13 and13 mode13 as13 speciZied13 by13 the13 user13 and13 with13 frequency13 also13 speciZied13 by13 the13 user13 in13 the13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

$block Same13 as13 for13 PMop13 objects13 above

NPdata13 (class13 NPAG13 list)13 ITdata13 (class13 IT2B13 list

Raw13 data13 used13 to13 make13 the13 above13 objects13 13 Please13 use13 NPparse13 or13 ITparse13 in13 R13 for13 discussion13 of13 the13 data13 contained13 in13 these13 objects

Since13 R13 is13 an13 object13 oriented13 language13 to13 access13 the13 observations13 in13 a13 PMop13 object13 for13 example13 use13 the13 following13 syntax13 op$post1$obsNote13 that13 you13 will13 place13 an13 integer13 within13 the13 parentheses13 of13 the13 loading13 functions13 eg13 NPload(1)13 which13 will13 sufZix13 all13 the13 above13 objects13 with13 that13 integer13 eg13 op113 Zinal113 NPdata113 13 This13 allows13 several13 models13 to13 be13 loaded13 into13 R13 simultaneously13 each13 with13 a13 unique13 sufZix13 and13 which13 can13 be13 compared13 with13 the13 PMcompare()13 command13 (see13 Model13 Diagnostics13 below)

Making New Pmetrics ObjectsOnce13 you13 have13 loaded13 the13 raw13 (NPdata13 or13 ITdata)13 or13 processed13 (op13 Uinal13 cycle13 pop13 post)13 data13 objects13 described13 above13 with13 NPload(run_num)13 or13 ITload(run_num)13 should13 you13 wish13 to13 remake13 the13 processed13 objects13 with13 parameters13 other13 than13 the13 defaults13 you13 can13 easily13 do13 so13 with13 the13 make 13 family13 of13 commands13 13 For13 example13 the13 default13 for13 PMop13 observed13 vs13 predicted13 objects13 is13 to13 use13 the13 prediction13 based13 on13 the13 median13 of13 the13 population13 or13 posterior13 distribution13 13 If13 you13 wish13 to13 use13 the13 mean13 of13 the13 distribution13 remake13 the13 PMop13 object13 using makeOP()13 13 If13 you13 wish13 to13 see13 all13 the13 cycle13 information13 in13 a13 PMcycle13 object13 not13 omitting13 the13 Zirst13 1013 of13 cycles13 by13 default13 remake13 it13 using13 makeCycle()13 13

For13 all13 of13 the13 following13 commands13 the13 data13 input13 is13 either13 NPdata13 or13 ITdata13 with13 additional13 function13 arguments13 speciZic13 to13 each13 command13 13 Accessing13 the13 help13 for13 each13 function13 in13 R13 will13 provide13 further13 details13 on13 the13 arguments13 defaults13 and13 output13 of13 each13 command

Userrsquos13 Guide13 13 2213 13

Command Description R13 help

makeAUC Make13 a13 dataframe13 of13 class13 PMauc13 containing13 subject13 ID13 and13 AUC13 from13 a13 variety13 of13 inputs13 including13 objects13 of13 PMop13 PMsim13 or13 a13 suitable13 dataframe

makeAUC

makeCov Generate13 a13 dataframe13 of13 class13 PMcov13 with13 subject-shy‐speciZic13 covariates13 extracted13 from13 the13 data13 csv13 Zile13 This13 object13 can13 be13 plotted13 and13 used13 to13 test13 for13 covariates13 which13 are13 signiZicantly13 associated13 with13 model13 parameters13 13

makeCov

makeCycle Create13 a13 PMcycle13 object13 described13 in13 the13 previous13 section makeCycle

makeFinal Create13 a13 PMZinal13 object13 described13 in13 the13 previous13 section makeFinal

makeOP Create13 a13 PMop13 object13 described13 in13 the13 previous13 section makeOP

makeNCA Create13 a13 dataframe13 (class13 PMnca)13 with13 the13 output13 of13 a13 non-shy‐compartmental13 analysis13 using13 PMpost13 and13 NPAG13 data13 objects13 as13 input13 13 The13 PMnca13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull auc13 Area13 under13 the13 time-shy‐observation13 curve13 using13 the13

trapezoidal13 approximation13 from13 time13 013 until13 the13 second13 dose13 or13 if13 only13 one13 dose13 until13 the13 last13 observation

bull aumc13 Area13 under13 the13 Zirst13 moment13 curvebull k13 Slope13 by13 least-shy‐squares13 linear13 regression13 of13 the13 Zinal13

613 log-shy‐transformed13 observations13 vs13 timebull auclast13 Area13 under13 the13 curve13 from13 the13 time13 of13 the13

last13 observation13 to13 inZinity13 calculated13 as13 [Final13 obs]kbull aumclast13 Area13 under13 the13 Zirst13 moment13 curve13 from13

the13 time13 of13 the13 last13 observation13 to13 inZinitybull aucinf13 Area13 under13 the13 curve13 from13 time13 013 to13 inZinity13

caluculated13 as13 auc13 +13 auclastbull aumcinf13 Area13 under13 the13 Zirst13 moment13 curve13 from13

time13 013 to13 inZinitybull mrt13 Mean13 residence13 time13 calculated13 as13 1kbull cmax13 Maximum13 predicted13 concentration13 after13 the13

Zirst13 dosebull tmax13 Time13 to13 cmaxbull cl13 Clearance13 calculated13 as13 doseaucinfbull vdss13 Volume13 of13 distribution13 at13 steady13 state13

calculated13 as13 clmrtbull thalf13 Half13 life13 of13 elimination13 calculated13 as13 ln(2)kbull dose13 First13 dose13 amount13 for13 each13 subject

makeNCA

Userrsquos13 Guide13 13 2313 13

Command Description R13 help

makeErrorPoly This13 function13 plots13 Zirst13 second13 and13 third13 order13 polynomial13 functions13 Zitted13 to13 pairs13 of13 observations13 and13 associated13 standard13 deviations13 for13 a13 given13 output13 assay13 In13 this13 way13 the13 standard13 deviation13 associated13 with13 any13 observation13 may13 be13 calculated13 and13 used13 to13 appropriately13 weight13 that13 observation13 in13 the13 model13 building13 process13 Observations13 are13 weighted13 by13 the13 reciprocal13 of13 the13 variance13 or13 squared13 standard13 deviation13 13 Output13 of13 the13 function13 is13 a13 plot13 of13 the13 measured13 observations13 and13 Zitted13 polynomial13 curves13 and13 a13 list13 with13 the13 Zirst13 second13 and13 third13 order13 coefZicients

makeErrorPoly

makePTA This13 function13 performs13 a13 Probability13 of13 Target13 Attainment13 analysis13 for13 a13 set13 of13 simulated13 doses13 and13 time-shy‐concentration13 proZiles13 13 Targets13 (eg13 Minimum13 Inhibitory13 Concentrations)13 the13 type13 of13 target13 attainment13 (ie13 time13 above13 target13 Cmaxtarget13 13 AUCtarget13 Cmintarget13 or13 Cxtarget13 where13 x13 is13 any13 time13 point)13 and13 the13 success13 threshold13 (eg13 time13 gt13 0713 or13 Cmaxtarget13 gt13 10)13 can13 all13 be13 speciZied13 13 Output13 is13 a13 list13 (class13 PMpta)13 with13 two13 objectsbull Results13 a13 413 dimensional13 array13 with13 dimension13 size13 of13

[number13 of13 doses13 number13 of13 targets13 number13 of13 simulated13 proZiles13 1]13 which13 gives13 the13 target13 attainment13 (eg13 Cmaxtarget)13 for13 each13 dose13 target13 and13 proZile

bull Outcome13 For13 each13 dose13 and13 target13 a13 summary13 of13 the13 target13 attainment13 for13 all13 the13 proZiles13 including13 mean13 standard13 deviation13 and13 proportion13 above13 the13 success13 threshold

PMpta13 objects13 can13 be13 summarized13 with13 summary(x)13 and13 plotted13 with13 plot(x)13

makePTA

Userrsquos13 Guide13 13 2413 13

Command Description R13 help

makePopmakePost(NPAG13 only)

These13 functions13 create13 dataframes13 of13 class13 PMpop13 and13 PMpost13 respectively13 13 The13 PMpop13 or13 PMpost13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull time13 Times13 for13 predicted13 concentrations13 13 These13

times13 are13 not13 necessarily13 at13 observed13 times13 but13 at13 a13 frequency13 speciZied13 in13 the13 NPAG13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

bull pred113 Predictions13 for13 output13 113 13 For13 PMpop13 objects13 predictions13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 population13 prior13 distribution13 13 For13 PMpost13 objects13 they13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject

bull pred213 pred313 etc13 If13 additional13 outputs13 exist13 they13 will13 each13 be13 columns13 in13 the13 dataframe13 just13 as13 for13 pred113 13

makePopmakePost

NPAG RunsIn13 the13 past13 users13 had13 to13 run13 NPAG13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 NPrun()13 13 However13 if13 NPrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable

1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 NPAG13 creates13 a13 temporary13 instruction13 Zile13 in13 case13 something13 happens13 so13 that13 instructions13 entered13 to13 date13 can13

be13 recovered13 13 Accept13 the13 default13 by13 choosing13 113 13 You13 can13 save13 with13 a13 meaningful13 Zilename13 later13 13 If13 it13 already13 exists13 you13 will13 be13 asked13 if13 you13 wish13 to13 overwrite13 the13 Zile13 which13 is13 usually13 the13 thing13 to13 do

Userrsquos13 Guide13 13 2513 13

8 If13 you13 have13 previously13 run13 IT2B13 you13 can13 automatically13 import13 the13 suggested13 parameter13 ranges13 13 Choose13 113 to13 do13 this13 and13 013 to13 run13 NPAG13 without13 a13 previous13 IT2B13 run81 If13 you13 choose13 option13 113 you13 must13 specify13 the13 name13 of13 a13 FROMxxxx13 Zile13 typically13 FROM000113 that13 you13 can13

Zind13 in13 an13 output13 directory13 after13 a13 successful13 IT2B13 run13 13 Note13 that13 the13 program13 will13 then13 assume13 that13 you13 are13 using13 the13 same13 wrk13 Ziles13 that13 IT2B13 made13 from13 your13 data13 csv13 Zile13 13 It13 is13 strongly13 recommended13 to13 override13 this13 and13 specify13 a13 data13 csv13 Zile13 13 At13 this13 point13 you13 will13 jump13 to13 1013 below13 and13 continue13 on13 however13 your13 answers13 will13 often13 be13 supplied13 by13 the13 instructions13 contained13 in13 the13 FROMxxxx13 Zile13 and13 you13 need13 merely13 conZirm13 them

9 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13 have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 NPrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis91 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13

for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

10 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 NPAG13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

11 Enter13 the13 name13 of13 your13 csv13 Zile13 now12 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile13 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset131 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects132 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry14 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset15 Enter13 the13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo 13 followed13 by13

return16 Select13 how13 you13 would13 like13 to13 model13 assay13 (observation)13 error13 for13 each13 output13 equation13 13 You13 have13 four13 choices13 13

In13 all13 four13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0161 Error13 model13 113 (SD)13 13 Choose13 this13 option13 if13 you13 have13 already13 run13 IT2B13 and13 multiplied13 your13 assay13 error13

polynomial13 by13 gamma13 (see13 next13 option13 for13 a13 description13 of13 gamma)162 Error13 model13 213 (SD13 13 gamma)13 13 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13

observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 If13 you13 choose13 this13 option13 you13 then13 can13 specify13 the13 starting13 value13 of13 gamma13 13 Good13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality

163 Error13 model13 313 (SD213 +13 lamda2)0513 13 Lamda13 is13 an13 alternative13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present

Userrsquos13 Guide13 13 2613 13

164 Error13 model13 413 SD13 =13 gamma13 13 This13 model13 is13 rarely13 used13 and13 is13 equivalent13 to13 specifying13 a13 model13 with13 C013 only13 ie13 a13 constant13 error13 regardless13 of13 concentration

17 Once13 you13 select13 the13 assay13 error13 model13 for13 each13 output13 equation13 you13 are13 then13 offered13 four13 more13 options13 on13 which13 assay13 error13 polynomial13 coefZicients13 to13 use13 13 Choices13 113 and13 213 are13 the13 most13 commonly13 used171 Choice13 113 The13 default13 13 Use13 coefZicients13 in13 the13 subject13 record13 (C013 C113 C213 C313 in13 the13 data13 csv13 Zile)13 and13 if13

missing13 use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 (item13 1813 below)172 Choice13 213 Use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 for13 all13 subjects13 regardless13 of13 what13 is13 in13 the13

data13 csv13 Zile173 Choice13 313 13 To13 multiply13 data13 csv13 values13 and13 default13 entered13 values13 by13 a13 Zixed13 gamma13 and13 use13 them13 13 174 Choice13 013 Specify13 coefZicients13 on13 a13 subject13 by13 subject13 basis13 either13 those13 in13 the13 data13 csv13 Zile13 already13 the13

default13 values13 entered13 into13 the13 program13 or13 other13 values18 For13 each13 output13 equation13 after13 you13 have13 selected13 the13 option13 in13 item13 1713 you13 will13 be13 prompted13 to13 supply13 the13

required13 information13 including13 the13 general13 default13 values13 for13 missing13 or13 overridden13 values13 in13 the13 data13 csv13 Zile19 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13

usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13

20 Enter13 the13 grid13 point13 index13 13 This13 number13 corresponds13 to13 the13 number13 of13 grid13 (support)13 points13 which13 will13 initially13 Zill13 the13 model13 parameter13 space13 13 The13 larger13 the13 number13 of13 random13 parameters13 to13 be13 estimated13 the13 more13 points13 are13 required13 13 The13 program13 will13 make13 a13 suggestion13 based13 on13 the13 number13 of13 random13 parameters13 in13 the13 model13 13 The13 more13 you13 choose13 the13 slower13 the13 run13 will13 be13 but13 results13 may13 improve13 13 It13 is13 reasonable13 to13 choose13 fewer13 points13 early13 in13 model13 exploration13 and13 increase13 in13 later13 phases13 or13 if13 poor13 model13 Zits13 or13 lack13 of13 convergence13 are13 noted13 The13 choices13 are13 113 to13 713 corresponding13 respectively13 to13 212913 500313 1000713 2001113 4000913 and13 8002113 points13 13 If13 you13 choose13 713 you13 then13 have13 an13 additional13 choice13 to13 select13 one13 or13 more13 multiples13 of13 8002113 points

21 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 013 or13 greater13 13 If13 you13 enter13 an13 integer13 greater13 than13 013 the13 engine13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13 If13 you13 enter13 013 this13 is13 the13 way13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 an13 independent13 data13 set13 and13 a13 non-shy‐uniform13 prior13 must13 be13 speciZied13 (see13 3013 below)13 13 This13 means13 that13 the13 engine13 will13 only13 calculate13 the13 individual13 Bayesian13 posteriors13 for13 the13 new13 subjects13 using13 the13 population13 joint13 density13 from13 a13 previous13 run13 as13 a13 Bayesian13 prior

22 Information13 about13 convergence13 criteria13 13 Answer13 113 or13 some13 other13 keystroke13 plus13 Return13 to13 acknowledge13 that13 you13 have13 read13 it

23 In13 order13 to13 predict13 concentrations13 from13 a13 non-shy‐parametric13 distribution13 you13 have13 the13 option13 to13 use13 the13 1)13 mean13 2)13 median13 or13 3)13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject13 13 We13 typically13 use13 the13 median13 Zirst13 and13 then13 the13 mean13 in13 a13 separate13 run13 and13 compare13 the13 differences13 13

24 Select13 the13 time13 interval13 to13 generate13 predicted13 concentrations13 13 Additionally13 there13 will13 also13 be13 predictions13 made13 at13 the13 time13 of13 each13 observation13 13 In13 general13 for13 most13 models13 predictions13 every13 1213 minutes13 provide13 sufZicient13 granularity13 13 Smaller13 values13 can13 result13 in13 very13 large13 Ziles13 for13 big13 populations

25 Select13 the13 default13 MIC13 to13 be13 used13 for13 AUCMIC13 ratio13 reporting13 13 This13 should13 generally13 be13 set13 to13 the13 default13 of13 113 by13 choosing13 113 13 You13 can13 always13 extract13 the13 AUC13 later13 and13 divide13 it13 by13 any13 MIC13 you13 choose

26 Enter13 the13 value13 in13 hours13 that13 you13 want13 for13 calculations13 of13 AUCs13 from13 predicted13 concentration13 proZiles13 13 The13 default13 is13 2413 hours13 which13 you13 can13 accept13 by13 entering13 113 or13 013 if13 you13 want13 to13 specify13 a13 different13 interval

27 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

28 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

Userrsquos13 Guide13 13 2713 13

29 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

30 For13 the13 prior13 density13 choose13 113 if13 it13 is13 to13 be13 uniform13 13 This13 means13 that13 the13 initial13 grid13 points13 will13 be13 evenly13 distributed13 with13 equal13 probability13 within13 the13 boundaries13 speciZied13 (in13 1513 above)13 13 If13 you13 choose13 013 you13 will13 be13 prompted13 for13 the13 name13 of13 a13 Zile13 that13 contains13 the13 prior13 density13 13 This13 will13 be13 DEN000113 unless13 you13 have13 changed13 its13 name13 13 It13 will13 be13 found13 in13 the13 output13 directory13 of13 a13 prior13 NPAG13 run13 13 The13 model13 used13 to13 generate13 the13 DEN000113 Zile13 must13 be13 exactly13 the13 same13 as13 the13 current13 model13 including13 parameter13 boundaries13 13 However13 this13 option13 is13 useful13 to13 specify13 a13 non-shy‐uniform13 density13 for13 two13 reasons13 13 The13 Zirst13 is13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 a13 new13 set13 of13 subjects13 13 Do13 this13 in13 combination13 with13 setting13 the13 number13 of13 cycles13 to13 013 (see13 2113 above)13 13 The13 second13 use13 for13 a13 non-shy‐uniform13 prior13 is13 to13 continue13 a13 previous13 run13 13 For13 example13 if13 you13 only13 set13 the13 number13 of13 cycles13 to13 5013 to13 get13 a13 rough13 idea13 of13 model13 Zit13 you13 may13 continue13 where13 you13 left13 off13 by13 specifying13 the13 DEN000113 Zile13 from13 the13 50-shy‐cycle13 run13 and13 continuing13 with13 as13 many13 additional13 cycles13 as13 you13 specify13 in13 item13 2113 13 So13 in13 the13 example13 if13 you13 specify13 10013 cycles13 in13 2113 the13 total13 number13 of13 cycles13 will13 be13 5013 +13 10013 =13 150

31 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 NPrun(instr=ldquoyourfilerdquo)13 option13 and13 including13 ldquoyourZilerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

32 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 NPAG13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 NPAG13 analysis

33 The13 NPAG13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

IT2B RunsIn13 the13 past13 users13 had13 to13 run13 IT2B13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 ITrun()13 13 However13 if13 ITrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13

have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 ITrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis

Userrsquos13 Guide13 13 2813 13

71 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13 for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

8 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 IT2B13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

9 Enter13 the13 name13 of13 your13 csv13 Zile13 now10 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile11 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset111 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects112 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry12 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset13 Enter13 the13 initial13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo13 followed13

by13 return14 The13 estimated13 mean13 for13 each13 parameter13 value13 distribution13 during13 the13 Zirst13 iteration13 will13 be13 the13 median13 of13 the13

range13 speciZied13 in13 1313 13 You13 now13 have13 the13 option13 to13 specify13 the13 standard13 deviation13 for13 the13 parameter13 value13 distribution13 which13 by13 default13 is13 half13 of13 the13 range13 in13 1313 13 Choose13 113 to13 accept13 this13 (the13 usual13 answer)13 or13 013 to13 change13 it13 to13 something13 else13 expressed13 as13 a13 multiple13 of13 the13 range

15 In13 IT2B13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 You13 can13 now13 choose13 113 if13 every13 subject13 has13 the13 same13 coefZicients13 or13 013 to13 use13 a13 unique13 set13 of13 coefZicients13 for13 each13 subject13 13 The13 Zirst13 case13 is13 the13 more13 usual13 when13 all13 13 samples13 from13 all13 subjects13 are13 analyzed13 in13 the13 same13 lab13 13 If13 13 samples13 are13 analyzed13 in13 different13 labs13 and13 you13 have13 the13 assay13 data13 from13 each13 lab13 then13 you13 would13 enter13 013 13 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 (see13 151313 below)13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0151 If13 you13 choose13 113 (one13 set13 of13 coefZicients13 for13 all13 subjects)13 you13 will13 then13 be13 presented13 with13 313 additional13

choices1511 Choice13 113 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13 observation13

including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 and13 to13 Zix13 gamma13 to13 1

1512 Choice13 213 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 but13 to13 estimate13 gamma13 based13 on13 the13 data13 13 This13 is13 the13 usual13 option

1513 Choice13 313 Choose13 this13 option13 if13 you13 wish13 to13 estimate13 the13 assay13 error13 coefZicients13 based13 on13 your13 data13 for13 use13 in13 future13 runs13 13 Although13 you13 can13 access13 this13 option13 by13 using13 either13 ITrun()13 or13 ERRrun()13 in13 R13 the13 instruction13 Ziles13 that13 you13 save13 and13 the13 generated13 output13 Ziles13 will13 be13 different13 13 Therefore13 we13 recommend13 that13 if13 you13 intend13 to13 choose13 this13 option13 use13 ERRrun()13 in13 R13 which13 will13 generate13 an13 ASS000113 Zile13 that13 contains13 the13 estimates13 for13 C013 C113 C213 and13 C313 13 You13 can13 then13 include13 this13 Zile13 in13 the13 working13 directory13 (along13 with13 a13 model13 txt13 Zile13 and13 a13 data13 csv13 Zile)13 to13 do13 an13 IT2B13 run13 supplying13 the13 Zile13 name13 in13 16113 below

Userrsquos13 Guide13 13 2913 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

Pmetrics Input FilesData13 csv13 Files

Pmetrics13 accepts13 input13 as13 a13 spreadsheet13 ldquomatrixrdquo13 format13 It13 is13 designed13 for13 input13 of13 multiple13 records13 in13 a13 concise13 way13 13 Please13 keep13 the13 number13 of13 characters13 in13 the13 Uile13 name13 le13 8Files13 are13 in13 comma-shy‐separated-shy‐values13 (csv)13 format13 13 Examples13 of13 programs13 that13 can13 save13 csv13 Ziles13 are13 any13 text13 editor13 (eg13 TextEdit13 on13 Mac13 Notepad13 on13 Windows)13 or13 spreadsheet13 program13 (eg13 Excel)13 13 Click13 on13 hyperlinked13 items13 to13 see13 an13 explanation13 13

IMPORTANT13 The13 order13 capitalization13 and13 names13 of13 the13 header13 and13 the13 Zirst13 1213 columns13 are13 Zixed13 13 All13 entries13 must13 be13 numeric13 with13 the13 exception13 of13 ID13 and13 ldquordquo13 for13 non-shy‐required13 placeholder13 entries

POPDATA13 DEC13 11ID EVID TIME DUR DOSE ADDL II INPUT OUT OUTEQ C0 C1 C2 C3 COVhellipGH 1 0 0 400 1 GH 0 05 042 1 001 01 0 0GH 0 1 046 1 001 01 0 0GH 0 2 247 1 001 01 0 0GH 4 0 0 150 1 GH 1 35 05 150 1 001 01 0 0GH 0 512 055 1 001 01 0 0GH 0 24 052 1 001 01 0 01423 1 0 1 400 -shy‐1 12 1 1423 1 01 0 100 2 1423 0 1 -shy‐99 1 001 01 0 01423 0 2 038 1 001 01 0 01423 0 2 16 2 005 02 -shy‐011 0002POPDATA13 DEC_1113 13 This13 is13 the13 header13 for13 the13 Zile13 and13 must13 be13 in13 the13 Zirst13 line13 13 It13 identiZies13 the13 versionID13 13 This13 Zield13 must13 be13 preceded13 by13 the13 ldquordquo13 symbol13 to13 conZirm13 that13 this13 is13 the13 header13 row13 It13 can13 be13

numeric13 or13 character13 and13 identiZies13 each13 individual13 13 All13 rows13 must13 contain13 an13 ID13 and13 all13 records13 from13 one13 individual13 must13 be13 contiguous13 13 Any13 subsequent13 row13 that13 begins13 with13 ldquordquo13 will13 be13 ignored13 which13 is13 helpful13 if13 you13 want13 to13 exclude13 data13 from13 the13 analysis13 but13 preserve13 the13 integrity13 of13 the13 original13 dataset13 or13 to13 add13 comment13 lines13 13 IDs13 should13 be13 1113 characters13 or13 less13 but13 may13 be13 any13 alphanumeric13 combination13 13 There13 can13 be13 at13 most13 80013 subjects13 per13 run

EVID13 This13 is13 the13 event13 ID13 Zield13 13 It13 can13 be13 013 113 or13 413 13 Every13 row13 must13 have13 an13 entry13 013 =13 observation13 113 =13 input13 (eg13 dose)13 213 313 are13 currently13 unused13 413 =13 reset13 where13 all13 compartment13 values13 are13 set13 to13 013 and13 the13 time13 counter13 is13 reset13 to13 013 13 This13 is13

useful13 when13 an13 individual13 has13 multiple13 sampling13 episodes13 that13 are13 widely13 spaced13 in13 time13 with13 no13 new13 information13 gathered13 13 This13 is13 a13 dose13 event13 so13 dose13 information13 needs13 to13 be13 complete

TIME13 This13 is13 the13 elapsed13 time13 in13 decimal13 hours13 since13 the13 Zirst13 event13 13 It13 is13 not13 currently13 clock13 time13 (eg13 2130)13 although13 this13 is13 planned13 13 Every13 row13 must13 have13 an13 entry13 and13 within13 a13 given13 ID13 rows13 must13 be13 sorted13 chronologically13 earliest13 to13 latest13 13

DUR13 This13 is13 the13 duration13 of13 an13 infusion13 in13 hours13 13 If13 EVID=113 there13 must13 be13 an13 entry13 otherwise13 it13 is13 ignored13 13 For13 a13 bolus13 (ie13 an13 oral13 dose)13 set13 the13 value13 equal13 to13 0

Userrsquos13 Guide13 13 913 13

DOSE13 This13 is13 the13 dose13 amount13 13 If13 EVID=113 there13 must13 be13 an13 entry13 otherwise13 it13 is13 ignoredADDL13 This13 speciZies13 the13 number13 of13 additional13 doses13 to13 give13 at13 interval13 II13 13 It13 may13 be13 missing13 for13 dose13

events13 (EVID=113 or13 4)13 in13 which13 case13 it13 is13 assumed13 to13 be13 013 13 It13 is13 ignored13 for13 observation13 (EVID=0)13 events13 13 Be13 sure13 to13 adjust13 the13 time13 entry13 for13 the13 subsequent13 row13 if13 necessary13 to13 account13 for13 the13 extra13 doses13 13 If13 set13 to13 -shy‐113 the13 dose13 is13 assumed13 to13 be13 given13 under13 steady-shy‐state13 conditions13 13 ADDL=-shy‐113 can13 only13 be13 used13 for13 the13 Zirst13 dose13 event13 for13 a13 given13 subject13 or13 an13 EVID=413 event13 as13 you13 cannot13 suddenly13 be13 at13 steady13 state13 in13 the13 middle13 of13 dosing13 record13 unless13 all13 compartmentstimes13 are13 reset13 to13 013 (as13 for13 an13 EVID=413 event)

II13 This13 is13 the13 interdose13 interval13 and13 is13 only13 relevant13 if13 ADDL13 is13 not13 equal13 to13 013 in13 which13 case13 it13 cannot13 be13 missing13 13 If13 ADDL=013 or13 is13 missing13 II13 is13 ignored

INPUT13 This13 deZines13 which13 input13 (ie13 drug)13 the13 DOSE13 corresponds13 to13 13 Inputs13 are13 deZined13 in13 the13 model13 Zile

OUT 13 This13 is13 the13 observation13 or13 output13 value13 13 If13 EVID=013 there13 must13 be13 an13 entry13 if13 missing13 this13 must13 be13 coded13 as13 -shy‐9913 13 It13 will13 be13 ignored13 for13 any13 other13 EVID13 and13 therefore13 can13 be13 ldquordquo13 13 There13 can13 be13 at13 most13 15013 observations13 for13 a13 given13 subject

OUTEQ13 This13 is13 the13 output13 equation13 number13 that13 corresponds13 to13 the13 OUT13 value13 13 Output13 equations13 are13 deZined13 in13 the13 model13 Zile

C013 C113 C213 C313 These13 are13 the13 coefZicients13 for13 the13 assay13 error13 polynomial13 for13 that13 observation13 13 Each13 subject13 may13 have13 up13 to13 one13 set13 of13 coefZicients13 per13 output13 equation13 13 If13 more13 than13 one13 set13 is13 detected13 for13 a13 given13 subject13 and13 output13 equation13 the13 last13 set13 will13 be13 used13 13 If13 there13 are13 no13 available13 coefZicients13 these13 cells13 may13 be13 left13 blank13 or13 Zilled13 with13 ldquordquo13 as13 a13 placeholder

COV13 Any13 column13 after13 the13 assay13 error13 coefZicients13 is13 assumed13 to13 be13 a13 covariate13 one13 column13 per13 covariate

Model13 Files

Model13 Ziles13 for13 Pmetrics13 are13 ultimately13 Fortran13 text13 Ziles13 with13 a13 header13 version13 of13 TSMULT13 13 As13 of13 Pmetrics13 version13 03013 we13 have13 adopted13 a13 very13 simple13 user13 format13 that13 Pmetrics13 will13 use13 to13 generate13 the13 Fortran13 code13 automatically13 for13 you13 13 Version13 0413 additionally13 eliminates13 the13 previously13 separate13 instruction13 Zile13 A13 model13 library13 is13 available13 on13 our13 website13 at13 httpwwwlapkorgpmetricsphp13 13 Naming13 your13 model13 files13 The13 default13 model13 Zile13 name13 is13 ldquomodeltxtrdquo13 but13 you13 can13 call13 them13 whatever13 you13 wish13 13 However13 please13 keep13 the13 number13 of13 characters13 in13 the13 model13 Uile13 name13 le13 813 When13 you13 use13 a13 model13 Zile13 in13 NPrun() ITrun ERRrun() or SIMrun()13 Pmetrics13 will13 make13 a13 Fortran13 model13 Zile13 of13 the13 same13 name13 temporarily13 renaming13 your13 Zile13 13 At13 the13 end13 of13 the13 run13 your13 original13 model13 Zile13 will13 be13 in13 the13 inputs13 subfolder13 of13 the13 run13 folder13 and13 the13 generated13 Fortran13 model13 Zile13 will13 be13 called13 ldquomodelforrdquo13 and13 moved13 to13 the13 etc13 subfolder13 of13 the13 run13 folder13 13 If13 your13 model13 is13 called13 ldquomymodeltxtrdquo13 then13 the13 Fortran13 Zile13 will13 be13 ldquomymodelforrdquoYou13 can13 still13 use13 appropriate13 Fortran13 model13 Ziles13 directly13 but13 we13 suggest13 you13 keep13 the13 for13 extension13 for13 all13 Fortran13 Ziles13 to13 avoid13 confusion13 with13 the13 new13 format13 13 If13 you13 use13 a13 for13 Zile13 as13 your13 model13 you13 will13 have13 to13 specify13 its13 name13 explicitly13 in13 the13 NPrun() ITrun ERRrun() or SIMrun()13 command13 since13 the13 default13 model13 name13 again13 is13 ldquomodeltxtrdquo13 13 If13 you13 use13 a13 for13 Zile13 directly13 it13 will13 be13 in13 the13 inputs13 subfolder13 of13 the13 run13 folder13 not13 in13 etc13 since13 you13 did13 not13 use13 the13 simpler13 template13 as13 your13 model13 Zile

Structure13 of13 model13 files13 The13 new13 model13 Zile13 is13 a13 text13 Zile13 with13 1113 blocks13 each13 marked13 by13 13 followed13 by13 a13 header13 tagPRImary13 variablesCOVariatesSECcondary13 variablesBOLus13 inputsINItial13 conditions

Userrsquos13 Guide13 13 1013 13

F13 (bioavailability)LAG13 timeDIFferential13 equationsOUTputsERRorEXTraFor13 each13 header13 only13 the13 capital13 letters13 are13 required13 for13 recognition13 by13 Pmetrics13 The13 blocks13 can13 be13 in13 any13 order13 and13 header13 names13 are13 case-shy‐insensitive13 (ie13 the13 capitalization13 here13 is13 just13 to13 show13 which13 letters13 are13 required)13 Fortran13 is13 also13 case-shy‐insensitive13 so13 in13 variable13 names13 and13 expressions13 case13 is13 ignored13 13 Details13 of13 each13 block13 are13 next13 followed13 by13 a13 complete13 example

Primary13 variables

Primary13 variables13 are13 the13 model13 parameters13 that13 are13 to13 be13 estimated13 by13 Pmetrics13 or13 are13 designated13 as13 Zixed13 parameters13 with13 user13 speciZied13 values13 It13 should13 be13 a13 list13 of13 variable13 names13 one13 name13 to13 a13 line13 Variable13 names13 should13 be13 1113 characters13 or13 fewer13 Some13 variable13 names13 are13 reserved13 for13 use13 by13 Pmetrics13 and13 cannot13 be13 used13 as13 primary13 variable13 names13 13 13 The13 number13 of13 primary13 variables13 must13 be13 between13 213 and13 3213 with13 at13 most13 3013 random13 or13 2013 Uixed13 13 On13 each13 row13 following13 the13 variable13 name13 include13 the13 range13 for13 the13 parameter13 that13 deZines13 the13 search13 space13 13 For13 NPAG13 this13 is13 absolute13 ie13 the13 algorithm13 will13 not13 search13 outside13 this13 range13 13 For13 IT2B13 the13 range13 is13 a13 starting13 range13 13 The13 simulator13 will13 ignore13 the13 ranges13 ExamplePriKE13 013 5V13 00113 100KA13 013 5KCP13 013 5KPC13 013 13 5Tlag113 013 2IC313 013 10000FA113 013 1

Covariates

Covariates13 are13 subject13 speciZic13 data13 such13 as13 body13 weight13 contained13 in13 the13 data13 csv13 Zile13 The13 covariate13 names13 which13 are13 the13 column13 names13 in13 the13 data13 Zile13 can13 be13 included13 here13 for13 use13 in13 secondary13 variable13 equations13 The13 order13 should13 be13 the13 same13 as13 in13 the13 data13 Zile13 and13 although13 the13 names13 do13 not13 have13 to13 be13 the13 same13 we13 strongly13 encourage13 you13 to13 make13 them13 the13 same13 to13 avoid13 confusionCovariates13 are13 applied13 at13 each13 dose13 event13 13 The13 Zirst13 dose13 event13 for13 each13 subject13 must13 have13 a13 value13 for13 every13 covariate13 in13 the13 data13 Zile13 13 By13 default13 missing13 covariate13 values13 for13 subsequent13 dose13 events13 are13 linearly13 interpolated13 between13 existing13 values13 or13 carried13 forward13 if13 the13 Zirst13 value13 is13 the13 only13 non-shy‐missing13 entry13 13 To13 suppress13 interpolation13 and13 carry13 forward13 the13 previous13 value13 in13 a13 piece-shy‐wise13 constant13 fashion13 include13 an13 exclamation13 point13 ()13 in13 any13 declaration13 lineNote13 that13 any13 covariate13 relationship13 to13 any13 parameter13 may13 be13 described13 as13 the13 user13 wishes13 by13 mathematical13 equations13 and13 Fortran13 code13 allowing13 for13 exploration13 of13 complex13 non-shy‐linear13 time-shy‐dependent13 andor13 conditional13 relationshipsExampleCovwtcypIC()

Userrsquos13 Guide13 13 1113 13

where13 IC13 will13 be13 piece-shy‐wise13 constant13 and13 the13 other13 two13 will13 be13 linearly13 interpolated13 for13 missing13 values

Secondary13 variables

Secondary13 variables13 are13 those13 that13 are13 deZined13 by13 equations13 that13 are13 combinations13 of13 primary13 covariates13 and13 other13 secondary13 variables13 If13 using13 other13 secondary13 variables13 deZine13 them13 Zirst13 within13 this13 block13 Equation13 syntax13 must13 be13 Fortran13 It13 is13 permissible13 to13 have13 conditional13 statements13 but13 because13 expressions13 in13 this13 block13 are13 translated13 into13 variable13 declarations13 in13 Fortran13 expressions13 other13 than13 of13 the13 form13 X13 =13 function(Y)13 must13 be13 preZixed13 by13 a13 +13 and13 contain13 only13 variables13 which13 have13 been13 previously13 deZined13 in13 the13 Primary13 Covariate13 or13 Secondary13 blocksExampleSecCL13 =13 Ke13 13 V13 13 wt075+IF(cyp13 GT13 1)13 CL13 =13 CL13 13 cyp

Bolus13 inputs

By13 default13 inputs13 with13 DUR13 (duration)13 of13 013 in13 the13 data13 csv13 Zile13 are13 delivered13 instantaneously13 to13 the13 model13 compartment13 equal13 to13 the13 input13 number13 ie13 input13 113 goes13 to13 compartment13 113 input13 213 goes13 to13 compartment13 213 etc13 This13 can13 be13 overridden13 with13 NBOLUS(input13 number)13 =13 compartment13 numberExampleBolNBCOMP(1)13 =13 2

Ini1al13 condi1ons

By13 default13 all13 model13 compartments13 have13 zero13 amounts13 at13 time13 013 This13 can13 be13 changed13 by13 specifying13 the13 compartment13 amount13 as13 X()13 =13 expression13 where13 13 is13 the13 compartment13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignoredExampleIniX(2)13 =13 ICV13 (ie13 IC13 is13 a13 covariate13 with13 the13 measured13 trough13 concentration13 prior13 to13 an13 observed13 dose)X(3)13 =13 IC313 (ie13 IC313 is13 a13 Zitted13 amount13 in13 this13 unobserved13 compartment)In13 the13 Zirst13 case13 the13 initial13 condition13 for13 compartment13 213 becomes13 the13 value13 of13 the13 IC13 covariate13 (deZined13 in13 Covariate13 block)13 multiplied13 by13 the13 current13 estimate13 of13 V13 during13 each13 iteration13 13 This13 is13 useful13 when13 a13 subject13 has13 been13 taking13 a13 drug13 as13 an13 outpatient13 and13 comes13 in13 to13 the13 lab13 for13 PK13 sampling13 with13 measurement13 of13 a13 concentration13 immediately13 prior13 to13 a13 witnessed13 dose13 which13 is13 in13 turn13 followed13 by13 more13 sampling13 13 In13 this13 case13 IC13 or13 any13 other13 covariate13 can13 be13 set13 to13 the13 initial13 measured13 concentration13 and13 if13 V13 is13 the13 volume13 of13 compartment13 213 the13 initial13 condition13 (amount)13 in13 compartment13 213 will13 now13 be13 set13 to13 the13 measured13 concentration13 of13 drug13 multiplied13 by13 the13 estimated13 volume13 for13 each13 iteration13 until13 convergenceIn13 the13 second13 case13 the13 initial13 condition13 for13 compartment13 313 becomes13 another13 variable13 IC313 deZined13 in13 the13 Primary13 block13 to13 Zit13 in13 the13 model13 given13 the13 observed13 data

F13 (bioavailability)

Specify13 the13 bioavailability13 term13 if13 present13 Use13 the13 form13 FA()13 =13 expression13 where13 13 is13 the13 input13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignored

Userrsquos13 Guide13 13 1213 13

ExampleFFA(1)13 =13 FA1

Lag13 1me

Specify13 the13 lag13 term13 if13 present13 which13 is13 the13 delay13 after13 an13 absorbed13 dose13 before13 observed13 concentrations13 Use13 the13 form13 TLAG()13 =13 expression13 where13 13 is13 the13 input13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignoredExampleLagTLAG(1)13 =13 Tlag1

Differen1al13 equa1ons

Specify13 a13 model13 in13 terms13 of13 ordinary13 differential13 equations13 in13 Fortran13 format13 XP()13 is13 the13 notation13 for13 dX()dt13 where13 13 is13 the13 compartment13 number13 X()13 is13 the13 amount13 in13 the13 compartment13 There13 can13 be13 a13 maximum13 of13 2013 such13 equationsExampleDifXP(1)13 =13 -shy‐KAX(1)XP(2)13 =13 RATEIV(1)13 +13 KAX(1)13 -shy‐13 (KE+KCP)X(2)13 +13 KPCX(3)XP(3)13 =13 KCPX(2)13 -shy‐13 KPCX(3)RATEIV(1)13 is13 the13 notation13 to13 indicate13 an13 infusion13 of13 input13 113 (typically13 drug13 1)13 13 The13 duration13 of13 the13 infusion13 and13 total13 dose13 is13 deZined13 in13 the13 data13 csv13 Zile13 Up13 to13 713 inputs13 are13 currently13 allowed13 13 These13 can13 be13 used13 in13 the13 model13 Zile13 as13 RATEIV(1)13 RATEIV(2)13 etc13 13 The13 compartments13 for13 13 receiving13 the13 inputs13 of13 oral13 (bolus)13 doses13 are13 deZined13 in13 the13 Bolus13 block

Outputs

Output13 equations13 in13 Fortran13 format13 Outputs13 are13 of13 the13 form13 Y()13 =13 expression13 where13 13 is13 the13 output13 equation13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignored13 There13 can13 be13 a13 maximum13 of13 613 outputs13 13 They13 are13 referred13 to13 as13 Y(1)13 Y(2)13 etcExampleOutY(1)13 =13 X(2)V

Error

This13 block13 contains13 all13 the13 information13 Pmetrics13 requires13 for13 the13 structure13 of13 the13 error13 model13 13 In13 Pmetrics13 each13 observation13 is13 weighted13 by13 1error213 13 13 There13 are13 two13 choices13 for13 the13 error13 term

113 13 error13 =13 SD13 13 gamma213 13 error13 =13 (SD213 +13 lamda2)0513 (Note13 that13 lambda13 is13 only13 available13 in13 NPAG13 currently)

where13 SD13 is13 the13 standard13 deviation13 (SD)13 of13 each13 observation13 [obs]13 and13 gamma13 and13 lambda13 are13 terms13 to13 capture13 extra13 process13 noise13 related13 to13 the13 observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 SD13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 The13 13 values13 for13 the13 coefZicients13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13

Userrsquos13 Guide13 13 1313 13

coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly() 13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0In13 the13 multiplicative13 model13 13 gamma13 is13 a13 scalar13 on13 SD13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 Lambda13 is13 an13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 We13 tend13 to13 prefer13 lambda

To13 specify13 the13 model13 in13 this13 block13 the13 Zirst13 line13 needs13 to13 be13 either13 L=[number]13 or13 G=[number]13 for13 a13 lambda13 or13 gamma13 error13 model13 13 The13 [number]13 term13 is13 the13 starting13 value13 for13 lambda13 or13 gamma13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present13 13 For13 gamma13 good13 starting13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality13 13 If13 you13 include13 an13 exclamation13 point13 ()13 in13 the13 declaration13 then13 lambda13 or13 gamma13 will13 be13 Zixed13 and13 not13 estimated13 13 Note13 that13 you13 can13 only13 Zix13 lambda13 currently13 to13 zeroThe13 next13 line(s)13 contain13 the13 values13 for13 C013 C113 C213 and13 C313 separated13 by13 commas13 13 There13 should13 be13 one13 line13 of13 coefZicients13 for13 each13 output13 equation13 13 By13 default13 Pmetrics13 will13 use13 values13 for13 these13 coefZicients13 found13 in13 the13 data13 Zile13 13 If13 none13 are13 present13 or13 if13 the13 model13 declaration13 line13 contains13 an13 exclamation13 point13 ()13 the13 values13 here13 will13 be13 used

Example13 113 estimated13 lambda13 starting13 at13 0413 one13 output13 use13 data13 Zile13 coefZicients13 but13 if13 missing13 use13 010100ErrL=04010100

Example13 213 Zixed13 gamma13 of13 213 two13 outputs13 use13 data13 Zile13 coefZicients13 but13 if13 missing13 use13 01010013 for13 the13 Zirst13 output13 but13 use13 0313 0113 013 013 for13 output13 213 regardless13 of13 what13 is13 in13 the13 data13 ZileErrG=2010100030100

Extra

This13 block13 is13 for13 advanced13 Fortran13 programmers13 only13 13 Occasionally13 for13 very13 complex13 models13 additional13 Fortran13 subroutines13 are13 required13 13 They13 can13 be13 placed13 here13 13 The13 code13 must13 specify13 complete13 Fortran13 subroutines13 which13 can13 be13 called13 from13 other13 blocks13 with13 appropriate13 call13 functions13 13

Reserved13 Names

The13 following13 cannot13 be13 used13 as13 primary13 covariate13 or13 secondary13 variable13 names13 They13 can13 be13 used13 in13 equations13 however

Reserved13 Variable Func1on13 in13 Pmetricsndim internal

t time

Userrsquos13 Guide13 13 1413 13

x array13 of13 compartment13 amounts

xp array13 of13 Zirst13 derivative13 of13 compartment13 amounts

rpar internal

ipar internal

p array13 of13 primary13 parameters

r input13 rates

b input13 boluses

npl internal

numeqt output13 equation13 number

ndrug input13 number

nadd covariate13 number

rateiv intravenous13 input13 for13 inputs13 when13 DURgt013 in13 data13 Ziles

cv covariate13 values13 array

n number13 of13 compartments

nd internal

ni internal

nup internal

nuic internal

np number13 of13 primary13 parameters

nbcomp bolus13 compartment13 array

psym names13 of13 primary13 parameters

fa biovailability

tlag lag13 time

tin internal

tout internal

Complete13 Example

Here13 is13 a13 complete13 example13 of13 a13 model13 Zile13 as13 of13 Pmetrics13 version13 04013 and13 higher

Userrsquos13 Guide13 13 1513 13

NotesBy13 omitting13 a13 Diffeq13 block13 with13 ODEs13 Pmetrics13 understands13 that13 you13 are13 specifying13 the13 model13 to13 be13 solved13 algebraically13 In13 this13 case13 at13 least13 KE13 and13 V13 must13 be13 in13 the13 Primary13 or13 Secondary13 variables13 KA13 KCP13 and13 KPC13 are13 optional13 and13 specify13 absorption13 and13 transfer13 to13 and13 from13 the13 central13 to13 a13 peripheral13 compartment13 respectively

PriKE13 013 5V013 0113 100KA13 013 5Tlag113 013 3Cov13 wt

SecV13 =13 V0wt

LagTLAG(1)13 =13 Tlag1

OutY(1)13 =13 X(2)V

ErrL=04010100

Userrsquos13 Guide13 13 1613 13

Brief13 Fortran13 Tutorial

Much13 more13 detailed13 help13 is13 available13 from13 httpwwwcsmtuedu~sheneCOURSEScs201NOTESfortranhtml

Arithmetic Operator Meaning

+ addition

- subtraction

multiplication

division

exponentiation

Relational Operator Alternative Operator Meaning

lt LT less than

lt= LE less than or equal

gt GT greater than

gt= GE greater than or equal

== EQ equal

= NE not equal

Selective Execution Example

IF (logical-expression) one-statement IF (T gt= 100) CL = 10

IF (logical-expression) THEN statementsEND IF

IF (T gt= 100) THEN CL = 10 V = 10END IF

IF (logical-expression) THEN statements-1ELSE statements-2END IF

IF (T gt= 100) THEN CL = 10ELSE CL = CLEND IF

Userrsquos13 Guide13 13 1713 13

How to use R and PmetricsSeCng13 up13 a13 Pmetrics13 project

When13 beginning13 a13 new13 modeling13 project13 it13 is13 convenient13 to13 use13 the13 command13 PMtree(ldquoproject namerdquo)13 13 This13 command13 will13 set13 up13 a13 new13 directory13 in13 the13 current13 working13 directory13 named13 whatever13 you13 have13 included13 as13 the13 ldquoproject13 namerdquo13 13 For13 example13 a13 directory13 called13 ldquoDrugXrdquo13 will13 be13 created13 by13 PMtree(ldquoDrugXrdquo)13 13 Beneath13 this13 directory13 several13 subdirectories13 will13 be13 also13 created13 Rscript13 Runs13 Sim13 and13 src13 13 The13 Rscript13 subdirectory13 will13 contain13 a13 skeleton13 R13 script13 to13 begin13 Pmetrics13 runs13 in13 the13 new13 project13 13 The13 Runs13 subdirectory13 should13 contain13 all13 Ziles13 required13 for13 a13 run13 (described13 next)13 and13 it13 will13 also13 contain13 the13 resulting13 numerically13 ordered13 run13 directories13 created13 after13 each13 Pmetrics13 NPAG13 or13 IT2B13 run13 13 The13 Sim13 subdirectory13 can13 contain13 any13 Ziles13 related13 to13 simulations13 and13 the13 src13 subdirectory13 should13 contain13 original13 and13 manipulated13 source13 data13 Ziles13 13 Of13 course13 you13 are13 free13 to13 edit13 this13 directory13 tree13 structure13 as13 you13 please13 or13 make13 your13 own13 entirely

GeCng13 the13 required13 files13 to13 run13 Pmetrics

When13 you13 wish13 to13 execute13 a13 Pmetrics13 run13 you13 must13 ensure13 that13 appropriate13 Pmetrics13 model13 txt13 and13 data13 csv13 Ziles13 are13 in13 the13 working13 directory13 ie13 the13 Runs13 subdirectory13 of13 the13 project13 directory13 13 13 13 R13 can13 be13 used13 to13 help13 prepare13 the13 data13 csv13 Zile13 by13 importing13 and13 manipulating13 spreadsheets13 (eg13 readcsv())13 13 The13 Pmetrics13 function13 PMcheck()13 can13 be13 used13 to13 check13 a13 csv13 Zile13 or13 an13 R13 dataframe13 that13 is13 to13 be13 saved13 as13 a13 Pmetrics13 data13 13 csv13 Zile13 for13 errors13 13 13 13 13 13 It13 can13 also13 check13 a13 model13 Zile13 for13 errors13 in13 the13 context13 of13 a13 dataZile13 eg13 covariates13 that13 do13 not13 match13 13 PMfixMatrix()13 attempts13 to13 automatically13 rid13 data13 Ziles13 of13 errors13 13 The13 function13 PMwriteMatrix() 13 can13 be13 used13 to13 write13 the13 R13 data13 object13 in13 the13 correct13 format13 for13 use13 by13 IT2B13 NPAG13 or13 the13 Simulator13 13 You13 can13 also13 download13 sample13 data13 and13 scripts13 from13 the13 Pmetrics13 downloads13 section13 of13 our13 website13 once13 you13 sign13 in13 with13 your13 LAPK13 user13 email13 address13 and13 password13 13 Edit13 prior13 versions13 of13 model13 Ziles13 to13 make13 new13 model13 Ziles

Using13 scripts13 to13 control13 Pmetrics

As13 you13 will13 see13 in13 the13 skeleton13 R13 script13 made13 by13 PMtree() and13 placed13 in13 the13 Rscript13 subdirectory13 if13 this13 is13 a13 Zirst-shy‐time13 run13 the13 R13 commands13 to13 run13 IT2B13 or13 NPAG13 are13 as13 follows13 13 Recall13 that13 the13 ldquordquo13 character13 is13 a13 comment13 character

library(Pmetrics)Run 1 - add your run description heresetwd(ldquoworking directoryrdquo)NPrun() for NPAG or ITrun() for IT2B

The13 Zirst13 line13 will13 load13 the13 Pmetrics13 library13 of13 functions13 13 The13 second13 line13 sets13 the13 working13 directory13 to13 the13 speciZied13 path13 13 The13 third13 line13 generates13 the13 batch13 Zile13 to13 run13 NPAG13 or13 IT2B13 and13 saves13 it13 to13 the13 working13 directory13

NOTE13 13 On13 Mac13 systems13 the13 batch13 Zile13 will13 be13 automatically13 launched13 in13 a13 Terminal13 window13 13 On13 Windows13 systems13 the13 batch13 Zile13 must13 be13 launched13 manually13 by13 double13 clicking13 the13 np_runbat13 or13 it_runbat13 Zile13 in13 the13 working13 directory

ITrun() 13 and13 NPrun()13 both13 return13 the13 full13 path13 of13 the13 output13 directory13 to13 the13 clipboard13 13 By13 default13 runs13 are13 placed13 in13 folders13 numbered13 sequentially13 beginning13 with13 ldquo1rdquoNow13 the13 output13 of13 IT2B13 or13 NPAG13 needs13 to13 be13 loaded13 into13 R13 so13 the13 next13 command13 does13 this

NPload(run_number) or ITload(run_number)

Details13 of13 these13 commands13 and13 what13 is13 loaded13 are13 described13 in13 the13 R13 documentation13 (NPload 13 or13 ITload)13 and13 in13 the13 following13 section13 13 The13 run_number13 should13 be13 included13 within13 the13 parentheses13 to13 be13 appended13 to13 the13 names13

Userrsquos13 Guide13 13 1813 13

of13 loaded13 R13 objects13 allowing13 for13 comparison13 between13 runs13 eg13 NPload(1)13 13 Finally13 at13 this13 point13 other13 Pmetrics13 commands13 can13 be13 added13 to13 the13 script13 to13 process13 the13 data13 such13 as13 the13 following

plot(final1)plot(cycle1)plot(op1type=rdquopoprdquo) or plot(op1$pop1)plot(op1) default is to plot posterior predictions for output 1plot(op1type=rdquopoprdquoresid=T)

Of13 course13 the13 full13 power13 of13 R13 can13 be13 used13 in13 scripts13 to13 analyze13 data13 but13 these13 simple13 statements13 serve13 as13 examplesIf13 you13 do13 not13 use13 the13 PMtree() structure13 we13 suggest13 that13 the13 R13 script13 for13 a13 particular13 project13 be13 saved13 into13 a13 folder13 called13 ldquoRscriptrdquo13 or13 some13 other13 meaningful13 name13 in13 the13 working13 directory13 13 Folders13 are13 not13 be13 moved13 by13 the13 batch13 Zile13 13 Within13 the13 script13 number13 runs13 sequentially13 and13 use13 comments13 liberally13 to13 13 distinguish13 runs13 as13 shown13 below

library(Pmetrics)

Run 1 - Ka Kel V all subjectssetwd(ldquoworking directoryrdquo)NPrun() assumes model=rdquomodeltxtrdquo and data=rdquodatacsvrdquoNPload(1)

Remember13 in13 R13 that13 the13 command13 example(function) will13 provide13 examples13 for13 the13 speciZied13 function13 13 Most13 Pmetrics13 functions13 have13 examples

Pmetrics Data ObjectsAfter13 a13 successful13 IT2B13 or13 NPAG13 run13 an13 R13 dataZile13 is13 saved13 in13 the13 output13 subdirectory13 of13 the13 newly13 created13 numerically13 ordered13 folder13 in13 the13 working13 directory13 13 After13 IT2B13 this13 Zile13 is13 called13 ldquoIT2BoutRdatardquo13 and13 after13 NPAG13 it13 is13 called13 ldquoNPAGoutRdatardquo13 13 As13 mentioned13 in13 the13 previous13 section13 these13 data13 Ziles13 can13 be13 loaded13 by13 ensuring13 that13 the13 Runs13 folder13 is13 set13 as13 the13 working13 directory13 and13 then13 using13 the13 Pmetrics13 commands13 ITload(run_num)13 or13 NPload(run_num)

Both13 commands13 load13 their13 respective13 Rdata13 Ziles13 into13 R13 making13 the13 contained13 objects13 available13 for13 plotting13 and13 other13 analysisObjects13 loaded13 by13 ITload(run_num) and NPload(run_num)

Objects Variables Comments

op13 (class13 PMop13 list) $pop113 $post113 Population13 and13 posterior13 predictions13 for13 each13 output13 equation13 ie13 113 213

13 $id Subject13 identiZication

13 $time Observation13 time13 in13 relative13 decimal13 hours

13 $obs Observation

13 $pred Prediction13 based13 on13 median13 of13 population13 or13 posterior13 parameter13 value13 distributions

Userrsquos13 Guide13 13 1913 13

Objects Variables Comments

13 $block Dosing13 block13 usually13 113 unless13 data13 Zile13 contains13 EVID=413 dose13 reset13 events13 in13 which13 case13 each13 such13 reset13 within13 a13 given13 ID13 will13 increment13 the13 dosing13 block13 by13 113 for13 that13 ID

13 $obsSD Calculated13 standard13 deviation13 (error)13 of13 the13 observation13 based13 on13 the13 assay13 error13 polynomial

13 $d Difference13 between13 pred13 and13 obs

13 $ds Squared13 difference13 between13 pred13 and13 obs

13 $wd $d13 weighted13 by13 the13 $obsSD

13 $wds $ds13 weighted13 by13 the13 $obsSD

Zinal13 (class13 PMZinal13 list) $popPoints (NPAG13 only)13 Dataframe13 of13 the13 Zinal13 cycle13 joint13 population13 density13 of13 grid13 points13 with13 column13 names13 equal13 to13 the13 name13 of13 each13 random13 parameter13 plus13 $prob13 for13 the13 associated13 probability13 of13 that13 point13

$popMean The13 Zinal13 cycle13 mean13 for13 each13 random13 parameter13 distribution

$popSD The13 Zinal13 cycle13 standard13 deviation13 for13 each13 random13 parameter13 distribution

$popCV The13 Zinal13 cycle13 coefZicient13 of13 variation13 for13 each13 random13 parameter13 distribution

$popVar The13 Zinal13 cycle13 variance13 for13 each13 random13 parameter13 distribution

$popCov The13 Zinal13 cycle13 covariance13 matrix13 for13 each13 random13 parameter13 distribution

$popCor The13 Zinal13 cycle13 correlation13 matrix13 for13 each13 random13 parameter13 distribution

$popMedian The13 Zinal13 cycle13 median13 for13 each13 random13 parameter13 distribution

$gridpts (NPAG13 only)13 The13 initial13 number13 of13 support13 points

$ab Matrix13 of13 boundaries13 for13 random13 parameter13 values13 13 For13 NPAG13 this13 is13 speciZied13 by13 the13 user13 prior13 to13 the13 run13 for13 IT2B13 it13 is13 calculated13 as13 a13 user13 speciZied13 multiple13 of13 the13 SD13 for13 the13 parameter13 value13 distribution

Userrsquos13 Guide13 13 2013 13

Objects Variables Comments

cycle13 (class13 PMcycle13 list) $names Vector13 of13 names13 of13 the13 random13 parameters

$ll Matrix13 of13 cycle13 number13 and13 -shy‐2Log-shy‐likelihood13 at13 each13 cycle

$gamlam A13 matrix13 of13 cycle13 number13 and13 gamma13 or13 lambda13 at13 each13 cycle13 (see13 item13 1613 under13 NPAG13 Runs13 below13 for13 a13 discussion13 of13 gamma13 and13 lambda)

$mean A13 matrix13 of13 cycle13 number13 and13 the13 mean13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 mean

$sd A13 matrix13 of13 cycle13 number13 and13 the13 standard13 deviation13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$median A13 matrix13 of13 cycle13 number13 and13 the13 median13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$aic A13 matrix13 of13 cycle13 number13 and13 Akaike13 Information13 Criterion13 at13 each13 cycle

$bic A13 matrix13 of13 cycle13 number13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle

cov13 (class13 PMcov13 dataframe)

$id Subject13 identiZication

$time Time13 for13 each13 covariate13 entry

covariates Covariate13 values13 for13 each13 subject13 at13 each13 time13 extracted13 from13 the13 raw13 data13 Zile

parameters Mean13 median13 or13 mode13 of13 Bayesian13 posterior13 distribution13 for13 each13 random13 parameter13 in13 the13 model13 13 Mode13 summaries13 are13 available13 for13 NPAG13 output13 only13 and13 the13 default13 is13 median13 13 Values13 are13 recycled13 for13 each13 row13 within13 a13 given13 subject13 with13 the13 number13 of13 rows13 driven13 by13 the13 number13 of13 covariate13 entries

Userrsquos13 Guide13 13 2113 13

Objects Variables Comments

pop13 (class13 PMpop13 dataframe)

post13 (class13 PMpost13 dataframe)

NPAG13 only

$id Subject13 identiZication

$pred113 Population13 prior13 (PMpop)13 or13 Bayesian13 posterior13 (PMpost)13 predictions13 for13 each13 output13 equation13 based13 on13 mean13 median13 and13 mode13 as13 speciZied13 by13 the13 user13 and13 with13 frequency13 also13 speciZied13 by13 the13 user13 in13 the13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

$block Same13 as13 for13 PMop13 objects13 above

NPdata13 (class13 NPAG13 list)13 ITdata13 (class13 IT2B13 list

Raw13 data13 used13 to13 make13 the13 above13 objects13 13 Please13 use13 NPparse13 or13 ITparse13 in13 R13 for13 discussion13 of13 the13 data13 contained13 in13 these13 objects

Since13 R13 is13 an13 object13 oriented13 language13 to13 access13 the13 observations13 in13 a13 PMop13 object13 for13 example13 use13 the13 following13 syntax13 op$post1$obsNote13 that13 you13 will13 place13 an13 integer13 within13 the13 parentheses13 of13 the13 loading13 functions13 eg13 NPload(1)13 which13 will13 sufZix13 all13 the13 above13 objects13 with13 that13 integer13 eg13 op113 Zinal113 NPdata113 13 This13 allows13 several13 models13 to13 be13 loaded13 into13 R13 simultaneously13 each13 with13 a13 unique13 sufZix13 and13 which13 can13 be13 compared13 with13 the13 PMcompare()13 command13 (see13 Model13 Diagnostics13 below)

Making New Pmetrics ObjectsOnce13 you13 have13 loaded13 the13 raw13 (NPdata13 or13 ITdata)13 or13 processed13 (op13 Uinal13 cycle13 pop13 post)13 data13 objects13 described13 above13 with13 NPload(run_num)13 or13 ITload(run_num)13 should13 you13 wish13 to13 remake13 the13 processed13 objects13 with13 parameters13 other13 than13 the13 defaults13 you13 can13 easily13 do13 so13 with13 the13 make 13 family13 of13 commands13 13 For13 example13 the13 default13 for13 PMop13 observed13 vs13 predicted13 objects13 is13 to13 use13 the13 prediction13 based13 on13 the13 median13 of13 the13 population13 or13 posterior13 distribution13 13 If13 you13 wish13 to13 use13 the13 mean13 of13 the13 distribution13 remake13 the13 PMop13 object13 using makeOP()13 13 If13 you13 wish13 to13 see13 all13 the13 cycle13 information13 in13 a13 PMcycle13 object13 not13 omitting13 the13 Zirst13 1013 of13 cycles13 by13 default13 remake13 it13 using13 makeCycle()13 13

For13 all13 of13 the13 following13 commands13 the13 data13 input13 is13 either13 NPdata13 or13 ITdata13 with13 additional13 function13 arguments13 speciZic13 to13 each13 command13 13 Accessing13 the13 help13 for13 each13 function13 in13 R13 will13 provide13 further13 details13 on13 the13 arguments13 defaults13 and13 output13 of13 each13 command

Userrsquos13 Guide13 13 2213 13

Command Description R13 help

makeAUC Make13 a13 dataframe13 of13 class13 PMauc13 containing13 subject13 ID13 and13 AUC13 from13 a13 variety13 of13 inputs13 including13 objects13 of13 PMop13 PMsim13 or13 a13 suitable13 dataframe

makeAUC

makeCov Generate13 a13 dataframe13 of13 class13 PMcov13 with13 subject-shy‐speciZic13 covariates13 extracted13 from13 the13 data13 csv13 Zile13 This13 object13 can13 be13 plotted13 and13 used13 to13 test13 for13 covariates13 which13 are13 signiZicantly13 associated13 with13 model13 parameters13 13

makeCov

makeCycle Create13 a13 PMcycle13 object13 described13 in13 the13 previous13 section makeCycle

makeFinal Create13 a13 PMZinal13 object13 described13 in13 the13 previous13 section makeFinal

makeOP Create13 a13 PMop13 object13 described13 in13 the13 previous13 section makeOP

makeNCA Create13 a13 dataframe13 (class13 PMnca)13 with13 the13 output13 of13 a13 non-shy‐compartmental13 analysis13 using13 PMpost13 and13 NPAG13 data13 objects13 as13 input13 13 The13 PMnca13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull auc13 Area13 under13 the13 time-shy‐observation13 curve13 using13 the13

trapezoidal13 approximation13 from13 time13 013 until13 the13 second13 dose13 or13 if13 only13 one13 dose13 until13 the13 last13 observation

bull aumc13 Area13 under13 the13 Zirst13 moment13 curvebull k13 Slope13 by13 least-shy‐squares13 linear13 regression13 of13 the13 Zinal13

613 log-shy‐transformed13 observations13 vs13 timebull auclast13 Area13 under13 the13 curve13 from13 the13 time13 of13 the13

last13 observation13 to13 inZinity13 calculated13 as13 [Final13 obs]kbull aumclast13 Area13 under13 the13 Zirst13 moment13 curve13 from13

the13 time13 of13 the13 last13 observation13 to13 inZinitybull aucinf13 Area13 under13 the13 curve13 from13 time13 013 to13 inZinity13

caluculated13 as13 auc13 +13 auclastbull aumcinf13 Area13 under13 the13 Zirst13 moment13 curve13 from13

time13 013 to13 inZinitybull mrt13 Mean13 residence13 time13 calculated13 as13 1kbull cmax13 Maximum13 predicted13 concentration13 after13 the13

Zirst13 dosebull tmax13 Time13 to13 cmaxbull cl13 Clearance13 calculated13 as13 doseaucinfbull vdss13 Volume13 of13 distribution13 at13 steady13 state13

calculated13 as13 clmrtbull thalf13 Half13 life13 of13 elimination13 calculated13 as13 ln(2)kbull dose13 First13 dose13 amount13 for13 each13 subject

makeNCA

Userrsquos13 Guide13 13 2313 13

Command Description R13 help

makeErrorPoly This13 function13 plots13 Zirst13 second13 and13 third13 order13 polynomial13 functions13 Zitted13 to13 pairs13 of13 observations13 and13 associated13 standard13 deviations13 for13 a13 given13 output13 assay13 In13 this13 way13 the13 standard13 deviation13 associated13 with13 any13 observation13 may13 be13 calculated13 and13 used13 to13 appropriately13 weight13 that13 observation13 in13 the13 model13 building13 process13 Observations13 are13 weighted13 by13 the13 reciprocal13 of13 the13 variance13 or13 squared13 standard13 deviation13 13 Output13 of13 the13 function13 is13 a13 plot13 of13 the13 measured13 observations13 and13 Zitted13 polynomial13 curves13 and13 a13 list13 with13 the13 Zirst13 second13 and13 third13 order13 coefZicients

makeErrorPoly

makePTA This13 function13 performs13 a13 Probability13 of13 Target13 Attainment13 analysis13 for13 a13 set13 of13 simulated13 doses13 and13 time-shy‐concentration13 proZiles13 13 Targets13 (eg13 Minimum13 Inhibitory13 Concentrations)13 the13 type13 of13 target13 attainment13 (ie13 time13 above13 target13 Cmaxtarget13 13 AUCtarget13 Cmintarget13 or13 Cxtarget13 where13 x13 is13 any13 time13 point)13 and13 the13 success13 threshold13 (eg13 time13 gt13 0713 or13 Cmaxtarget13 gt13 10)13 can13 all13 be13 speciZied13 13 Output13 is13 a13 list13 (class13 PMpta)13 with13 two13 objectsbull Results13 a13 413 dimensional13 array13 with13 dimension13 size13 of13

[number13 of13 doses13 number13 of13 targets13 number13 of13 simulated13 proZiles13 1]13 which13 gives13 the13 target13 attainment13 (eg13 Cmaxtarget)13 for13 each13 dose13 target13 and13 proZile

bull Outcome13 For13 each13 dose13 and13 target13 a13 summary13 of13 the13 target13 attainment13 for13 all13 the13 proZiles13 including13 mean13 standard13 deviation13 and13 proportion13 above13 the13 success13 threshold

PMpta13 objects13 can13 be13 summarized13 with13 summary(x)13 and13 plotted13 with13 plot(x)13

makePTA

Userrsquos13 Guide13 13 2413 13

Command Description R13 help

makePopmakePost(NPAG13 only)

These13 functions13 create13 dataframes13 of13 class13 PMpop13 and13 PMpost13 respectively13 13 The13 PMpop13 or13 PMpost13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull time13 Times13 for13 predicted13 concentrations13 13 These13

times13 are13 not13 necessarily13 at13 observed13 times13 but13 at13 a13 frequency13 speciZied13 in13 the13 NPAG13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

bull pred113 Predictions13 for13 output13 113 13 For13 PMpop13 objects13 predictions13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 population13 prior13 distribution13 13 For13 PMpost13 objects13 they13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject

bull pred213 pred313 etc13 If13 additional13 outputs13 exist13 they13 will13 each13 be13 columns13 in13 the13 dataframe13 just13 as13 for13 pred113 13

makePopmakePost

NPAG RunsIn13 the13 past13 users13 had13 to13 run13 NPAG13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 NPrun()13 13 However13 if13 NPrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable

1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 NPAG13 creates13 a13 temporary13 instruction13 Zile13 in13 case13 something13 happens13 so13 that13 instructions13 entered13 to13 date13 can13

be13 recovered13 13 Accept13 the13 default13 by13 choosing13 113 13 You13 can13 save13 with13 a13 meaningful13 Zilename13 later13 13 If13 it13 already13 exists13 you13 will13 be13 asked13 if13 you13 wish13 to13 overwrite13 the13 Zile13 which13 is13 usually13 the13 thing13 to13 do

Userrsquos13 Guide13 13 2513 13

8 If13 you13 have13 previously13 run13 IT2B13 you13 can13 automatically13 import13 the13 suggested13 parameter13 ranges13 13 Choose13 113 to13 do13 this13 and13 013 to13 run13 NPAG13 without13 a13 previous13 IT2B13 run81 If13 you13 choose13 option13 113 you13 must13 specify13 the13 name13 of13 a13 FROMxxxx13 Zile13 typically13 FROM000113 that13 you13 can13

Zind13 in13 an13 output13 directory13 after13 a13 successful13 IT2B13 run13 13 Note13 that13 the13 program13 will13 then13 assume13 that13 you13 are13 using13 the13 same13 wrk13 Ziles13 that13 IT2B13 made13 from13 your13 data13 csv13 Zile13 13 It13 is13 strongly13 recommended13 to13 override13 this13 and13 specify13 a13 data13 csv13 Zile13 13 At13 this13 point13 you13 will13 jump13 to13 1013 below13 and13 continue13 on13 however13 your13 answers13 will13 often13 be13 supplied13 by13 the13 instructions13 contained13 in13 the13 FROMxxxx13 Zile13 and13 you13 need13 merely13 conZirm13 them

9 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13 have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 NPrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis91 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13

for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

10 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 NPAG13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

11 Enter13 the13 name13 of13 your13 csv13 Zile13 now12 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile13 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset131 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects132 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry14 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset15 Enter13 the13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo 13 followed13 by13

return16 Select13 how13 you13 would13 like13 to13 model13 assay13 (observation)13 error13 for13 each13 output13 equation13 13 You13 have13 four13 choices13 13

In13 all13 four13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0161 Error13 model13 113 (SD)13 13 Choose13 this13 option13 if13 you13 have13 already13 run13 IT2B13 and13 multiplied13 your13 assay13 error13

polynomial13 by13 gamma13 (see13 next13 option13 for13 a13 description13 of13 gamma)162 Error13 model13 213 (SD13 13 gamma)13 13 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13

observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 If13 you13 choose13 this13 option13 you13 then13 can13 specify13 the13 starting13 value13 of13 gamma13 13 Good13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality

163 Error13 model13 313 (SD213 +13 lamda2)0513 13 Lamda13 is13 an13 alternative13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present

Userrsquos13 Guide13 13 2613 13

164 Error13 model13 413 SD13 =13 gamma13 13 This13 model13 is13 rarely13 used13 and13 is13 equivalent13 to13 specifying13 a13 model13 with13 C013 only13 ie13 a13 constant13 error13 regardless13 of13 concentration

17 Once13 you13 select13 the13 assay13 error13 model13 for13 each13 output13 equation13 you13 are13 then13 offered13 four13 more13 options13 on13 which13 assay13 error13 polynomial13 coefZicients13 to13 use13 13 Choices13 113 and13 213 are13 the13 most13 commonly13 used171 Choice13 113 The13 default13 13 Use13 coefZicients13 in13 the13 subject13 record13 (C013 C113 C213 C313 in13 the13 data13 csv13 Zile)13 and13 if13

missing13 use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 (item13 1813 below)172 Choice13 213 Use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 for13 all13 subjects13 regardless13 of13 what13 is13 in13 the13

data13 csv13 Zile173 Choice13 313 13 To13 multiply13 data13 csv13 values13 and13 default13 entered13 values13 by13 a13 Zixed13 gamma13 and13 use13 them13 13 174 Choice13 013 Specify13 coefZicients13 on13 a13 subject13 by13 subject13 basis13 either13 those13 in13 the13 data13 csv13 Zile13 already13 the13

default13 values13 entered13 into13 the13 program13 or13 other13 values18 For13 each13 output13 equation13 after13 you13 have13 selected13 the13 option13 in13 item13 1713 you13 will13 be13 prompted13 to13 supply13 the13

required13 information13 including13 the13 general13 default13 values13 for13 missing13 or13 overridden13 values13 in13 the13 data13 csv13 Zile19 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13

usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13

20 Enter13 the13 grid13 point13 index13 13 This13 number13 corresponds13 to13 the13 number13 of13 grid13 (support)13 points13 which13 will13 initially13 Zill13 the13 model13 parameter13 space13 13 The13 larger13 the13 number13 of13 random13 parameters13 to13 be13 estimated13 the13 more13 points13 are13 required13 13 The13 program13 will13 make13 a13 suggestion13 based13 on13 the13 number13 of13 random13 parameters13 in13 the13 model13 13 The13 more13 you13 choose13 the13 slower13 the13 run13 will13 be13 but13 results13 may13 improve13 13 It13 is13 reasonable13 to13 choose13 fewer13 points13 early13 in13 model13 exploration13 and13 increase13 in13 later13 phases13 or13 if13 poor13 model13 Zits13 or13 lack13 of13 convergence13 are13 noted13 The13 choices13 are13 113 to13 713 corresponding13 respectively13 to13 212913 500313 1000713 2001113 4000913 and13 8002113 points13 13 If13 you13 choose13 713 you13 then13 have13 an13 additional13 choice13 to13 select13 one13 or13 more13 multiples13 of13 8002113 points

21 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 013 or13 greater13 13 If13 you13 enter13 an13 integer13 greater13 than13 013 the13 engine13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13 If13 you13 enter13 013 this13 is13 the13 way13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 an13 independent13 data13 set13 and13 a13 non-shy‐uniform13 prior13 must13 be13 speciZied13 (see13 3013 below)13 13 This13 means13 that13 the13 engine13 will13 only13 calculate13 the13 individual13 Bayesian13 posteriors13 for13 the13 new13 subjects13 using13 the13 population13 joint13 density13 from13 a13 previous13 run13 as13 a13 Bayesian13 prior

22 Information13 about13 convergence13 criteria13 13 Answer13 113 or13 some13 other13 keystroke13 plus13 Return13 to13 acknowledge13 that13 you13 have13 read13 it

23 In13 order13 to13 predict13 concentrations13 from13 a13 non-shy‐parametric13 distribution13 you13 have13 the13 option13 to13 use13 the13 1)13 mean13 2)13 median13 or13 3)13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject13 13 We13 typically13 use13 the13 median13 Zirst13 and13 then13 the13 mean13 in13 a13 separate13 run13 and13 compare13 the13 differences13 13

24 Select13 the13 time13 interval13 to13 generate13 predicted13 concentrations13 13 Additionally13 there13 will13 also13 be13 predictions13 made13 at13 the13 time13 of13 each13 observation13 13 In13 general13 for13 most13 models13 predictions13 every13 1213 minutes13 provide13 sufZicient13 granularity13 13 Smaller13 values13 can13 result13 in13 very13 large13 Ziles13 for13 big13 populations

25 Select13 the13 default13 MIC13 to13 be13 used13 for13 AUCMIC13 ratio13 reporting13 13 This13 should13 generally13 be13 set13 to13 the13 default13 of13 113 by13 choosing13 113 13 You13 can13 always13 extract13 the13 AUC13 later13 and13 divide13 it13 by13 any13 MIC13 you13 choose

26 Enter13 the13 value13 in13 hours13 that13 you13 want13 for13 calculations13 of13 AUCs13 from13 predicted13 concentration13 proZiles13 13 The13 default13 is13 2413 hours13 which13 you13 can13 accept13 by13 entering13 113 or13 013 if13 you13 want13 to13 specify13 a13 different13 interval

27 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

28 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

Userrsquos13 Guide13 13 2713 13

29 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

30 For13 the13 prior13 density13 choose13 113 if13 it13 is13 to13 be13 uniform13 13 This13 means13 that13 the13 initial13 grid13 points13 will13 be13 evenly13 distributed13 with13 equal13 probability13 within13 the13 boundaries13 speciZied13 (in13 1513 above)13 13 If13 you13 choose13 013 you13 will13 be13 prompted13 for13 the13 name13 of13 a13 Zile13 that13 contains13 the13 prior13 density13 13 This13 will13 be13 DEN000113 unless13 you13 have13 changed13 its13 name13 13 It13 will13 be13 found13 in13 the13 output13 directory13 of13 a13 prior13 NPAG13 run13 13 The13 model13 used13 to13 generate13 the13 DEN000113 Zile13 must13 be13 exactly13 the13 same13 as13 the13 current13 model13 including13 parameter13 boundaries13 13 However13 this13 option13 is13 useful13 to13 specify13 a13 non-shy‐uniform13 density13 for13 two13 reasons13 13 The13 Zirst13 is13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 a13 new13 set13 of13 subjects13 13 Do13 this13 in13 combination13 with13 setting13 the13 number13 of13 cycles13 to13 013 (see13 2113 above)13 13 The13 second13 use13 for13 a13 non-shy‐uniform13 prior13 is13 to13 continue13 a13 previous13 run13 13 For13 example13 if13 you13 only13 set13 the13 number13 of13 cycles13 to13 5013 to13 get13 a13 rough13 idea13 of13 model13 Zit13 you13 may13 continue13 where13 you13 left13 off13 by13 specifying13 the13 DEN000113 Zile13 from13 the13 50-shy‐cycle13 run13 and13 continuing13 with13 as13 many13 additional13 cycles13 as13 you13 specify13 in13 item13 2113 13 So13 in13 the13 example13 if13 you13 specify13 10013 cycles13 in13 2113 the13 total13 number13 of13 cycles13 will13 be13 5013 +13 10013 =13 150

31 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 NPrun(instr=ldquoyourfilerdquo)13 option13 and13 including13 ldquoyourZilerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

32 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 NPAG13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 NPAG13 analysis

33 The13 NPAG13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

IT2B RunsIn13 the13 past13 users13 had13 to13 run13 IT2B13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 ITrun()13 13 However13 if13 ITrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13

have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 ITrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis

Userrsquos13 Guide13 13 2813 13

71 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13 for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

8 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 IT2B13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

9 Enter13 the13 name13 of13 your13 csv13 Zile13 now10 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile11 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset111 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects112 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry12 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset13 Enter13 the13 initial13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo13 followed13

by13 return14 The13 estimated13 mean13 for13 each13 parameter13 value13 distribution13 during13 the13 Zirst13 iteration13 will13 be13 the13 median13 of13 the13

range13 speciZied13 in13 1313 13 You13 now13 have13 the13 option13 to13 specify13 the13 standard13 deviation13 for13 the13 parameter13 value13 distribution13 which13 by13 default13 is13 half13 of13 the13 range13 in13 1313 13 Choose13 113 to13 accept13 this13 (the13 usual13 answer)13 or13 013 to13 change13 it13 to13 something13 else13 expressed13 as13 a13 multiple13 of13 the13 range

15 In13 IT2B13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 You13 can13 now13 choose13 113 if13 every13 subject13 has13 the13 same13 coefZicients13 or13 013 to13 use13 a13 unique13 set13 of13 coefZicients13 for13 each13 subject13 13 The13 Zirst13 case13 is13 the13 more13 usual13 when13 all13 13 samples13 from13 all13 subjects13 are13 analyzed13 in13 the13 same13 lab13 13 If13 13 samples13 are13 analyzed13 in13 different13 labs13 and13 you13 have13 the13 assay13 data13 from13 each13 lab13 then13 you13 would13 enter13 013 13 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 (see13 151313 below)13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0151 If13 you13 choose13 113 (one13 set13 of13 coefZicients13 for13 all13 subjects)13 you13 will13 then13 be13 presented13 with13 313 additional13

choices1511 Choice13 113 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13 observation13

including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 and13 to13 Zix13 gamma13 to13 1

1512 Choice13 213 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 but13 to13 estimate13 gamma13 based13 on13 the13 data13 13 This13 is13 the13 usual13 option

1513 Choice13 313 Choose13 this13 option13 if13 you13 wish13 to13 estimate13 the13 assay13 error13 coefZicients13 based13 on13 your13 data13 for13 use13 in13 future13 runs13 13 Although13 you13 can13 access13 this13 option13 by13 using13 either13 ITrun()13 or13 ERRrun()13 in13 R13 the13 instruction13 Ziles13 that13 you13 save13 and13 the13 generated13 output13 Ziles13 will13 be13 different13 13 Therefore13 we13 recommend13 that13 if13 you13 intend13 to13 choose13 this13 option13 use13 ERRrun()13 in13 R13 which13 will13 generate13 an13 ASS000113 Zile13 that13 contains13 the13 estimates13 for13 C013 C113 C213 and13 C313 13 You13 can13 then13 include13 this13 Zile13 in13 the13 working13 directory13 (along13 with13 a13 model13 txt13 Zile13 and13 a13 data13 csv13 Zile)13 to13 do13 an13 IT2B13 run13 supplying13 the13 Zile13 name13 in13 16113 below

Userrsquos13 Guide13 13 2913 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

DOSE13 This13 is13 the13 dose13 amount13 13 If13 EVID=113 there13 must13 be13 an13 entry13 otherwise13 it13 is13 ignoredADDL13 This13 speciZies13 the13 number13 of13 additional13 doses13 to13 give13 at13 interval13 II13 13 It13 may13 be13 missing13 for13 dose13

events13 (EVID=113 or13 4)13 in13 which13 case13 it13 is13 assumed13 to13 be13 013 13 It13 is13 ignored13 for13 observation13 (EVID=0)13 events13 13 Be13 sure13 to13 adjust13 the13 time13 entry13 for13 the13 subsequent13 row13 if13 necessary13 to13 account13 for13 the13 extra13 doses13 13 If13 set13 to13 -shy‐113 the13 dose13 is13 assumed13 to13 be13 given13 under13 steady-shy‐state13 conditions13 13 ADDL=-shy‐113 can13 only13 be13 used13 for13 the13 Zirst13 dose13 event13 for13 a13 given13 subject13 or13 an13 EVID=413 event13 as13 you13 cannot13 suddenly13 be13 at13 steady13 state13 in13 the13 middle13 of13 dosing13 record13 unless13 all13 compartmentstimes13 are13 reset13 to13 013 (as13 for13 an13 EVID=413 event)

II13 This13 is13 the13 interdose13 interval13 and13 is13 only13 relevant13 if13 ADDL13 is13 not13 equal13 to13 013 in13 which13 case13 it13 cannot13 be13 missing13 13 If13 ADDL=013 or13 is13 missing13 II13 is13 ignored

INPUT13 This13 deZines13 which13 input13 (ie13 drug)13 the13 DOSE13 corresponds13 to13 13 Inputs13 are13 deZined13 in13 the13 model13 Zile

OUT 13 This13 is13 the13 observation13 or13 output13 value13 13 If13 EVID=013 there13 must13 be13 an13 entry13 if13 missing13 this13 must13 be13 coded13 as13 -shy‐9913 13 It13 will13 be13 ignored13 for13 any13 other13 EVID13 and13 therefore13 can13 be13 ldquordquo13 13 There13 can13 be13 at13 most13 15013 observations13 for13 a13 given13 subject

OUTEQ13 This13 is13 the13 output13 equation13 number13 that13 corresponds13 to13 the13 OUT13 value13 13 Output13 equations13 are13 deZined13 in13 the13 model13 Zile

C013 C113 C213 C313 These13 are13 the13 coefZicients13 for13 the13 assay13 error13 polynomial13 for13 that13 observation13 13 Each13 subject13 may13 have13 up13 to13 one13 set13 of13 coefZicients13 per13 output13 equation13 13 If13 more13 than13 one13 set13 is13 detected13 for13 a13 given13 subject13 and13 output13 equation13 the13 last13 set13 will13 be13 used13 13 If13 there13 are13 no13 available13 coefZicients13 these13 cells13 may13 be13 left13 blank13 or13 Zilled13 with13 ldquordquo13 as13 a13 placeholder

COV13 Any13 column13 after13 the13 assay13 error13 coefZicients13 is13 assumed13 to13 be13 a13 covariate13 one13 column13 per13 covariate

Model13 Files

Model13 Ziles13 for13 Pmetrics13 are13 ultimately13 Fortran13 text13 Ziles13 with13 a13 header13 version13 of13 TSMULT13 13 As13 of13 Pmetrics13 version13 03013 we13 have13 adopted13 a13 very13 simple13 user13 format13 that13 Pmetrics13 will13 use13 to13 generate13 the13 Fortran13 code13 automatically13 for13 you13 13 Version13 0413 additionally13 eliminates13 the13 previously13 separate13 instruction13 Zile13 A13 model13 library13 is13 available13 on13 our13 website13 at13 httpwwwlapkorgpmetricsphp13 13 Naming13 your13 model13 files13 The13 default13 model13 Zile13 name13 is13 ldquomodeltxtrdquo13 but13 you13 can13 call13 them13 whatever13 you13 wish13 13 However13 please13 keep13 the13 number13 of13 characters13 in13 the13 model13 Uile13 name13 le13 813 When13 you13 use13 a13 model13 Zile13 in13 NPrun() ITrun ERRrun() or SIMrun()13 Pmetrics13 will13 make13 a13 Fortran13 model13 Zile13 of13 the13 same13 name13 temporarily13 renaming13 your13 Zile13 13 At13 the13 end13 of13 the13 run13 your13 original13 model13 Zile13 will13 be13 in13 the13 inputs13 subfolder13 of13 the13 run13 folder13 and13 the13 generated13 Fortran13 model13 Zile13 will13 be13 called13 ldquomodelforrdquo13 and13 moved13 to13 the13 etc13 subfolder13 of13 the13 run13 folder13 13 If13 your13 model13 is13 called13 ldquomymodeltxtrdquo13 then13 the13 Fortran13 Zile13 will13 be13 ldquomymodelforrdquoYou13 can13 still13 use13 appropriate13 Fortran13 model13 Ziles13 directly13 but13 we13 suggest13 you13 keep13 the13 for13 extension13 for13 all13 Fortran13 Ziles13 to13 avoid13 confusion13 with13 the13 new13 format13 13 If13 you13 use13 a13 for13 Zile13 as13 your13 model13 you13 will13 have13 to13 specify13 its13 name13 explicitly13 in13 the13 NPrun() ITrun ERRrun() or SIMrun()13 command13 since13 the13 default13 model13 name13 again13 is13 ldquomodeltxtrdquo13 13 If13 you13 use13 a13 for13 Zile13 directly13 it13 will13 be13 in13 the13 inputs13 subfolder13 of13 the13 run13 folder13 not13 in13 etc13 since13 you13 did13 not13 use13 the13 simpler13 template13 as13 your13 model13 Zile

Structure13 of13 model13 files13 The13 new13 model13 Zile13 is13 a13 text13 Zile13 with13 1113 blocks13 each13 marked13 by13 13 followed13 by13 a13 header13 tagPRImary13 variablesCOVariatesSECcondary13 variablesBOLus13 inputsINItial13 conditions

Userrsquos13 Guide13 13 1013 13

F13 (bioavailability)LAG13 timeDIFferential13 equationsOUTputsERRorEXTraFor13 each13 header13 only13 the13 capital13 letters13 are13 required13 for13 recognition13 by13 Pmetrics13 The13 blocks13 can13 be13 in13 any13 order13 and13 header13 names13 are13 case-shy‐insensitive13 (ie13 the13 capitalization13 here13 is13 just13 to13 show13 which13 letters13 are13 required)13 Fortran13 is13 also13 case-shy‐insensitive13 so13 in13 variable13 names13 and13 expressions13 case13 is13 ignored13 13 Details13 of13 each13 block13 are13 next13 followed13 by13 a13 complete13 example

Primary13 variables

Primary13 variables13 are13 the13 model13 parameters13 that13 are13 to13 be13 estimated13 by13 Pmetrics13 or13 are13 designated13 as13 Zixed13 parameters13 with13 user13 speciZied13 values13 It13 should13 be13 a13 list13 of13 variable13 names13 one13 name13 to13 a13 line13 Variable13 names13 should13 be13 1113 characters13 or13 fewer13 Some13 variable13 names13 are13 reserved13 for13 use13 by13 Pmetrics13 and13 cannot13 be13 used13 as13 primary13 variable13 names13 13 13 The13 number13 of13 primary13 variables13 must13 be13 between13 213 and13 3213 with13 at13 most13 3013 random13 or13 2013 Uixed13 13 On13 each13 row13 following13 the13 variable13 name13 include13 the13 range13 for13 the13 parameter13 that13 deZines13 the13 search13 space13 13 For13 NPAG13 this13 is13 absolute13 ie13 the13 algorithm13 will13 not13 search13 outside13 this13 range13 13 For13 IT2B13 the13 range13 is13 a13 starting13 range13 13 The13 simulator13 will13 ignore13 the13 ranges13 ExamplePriKE13 013 5V13 00113 100KA13 013 5KCP13 013 5KPC13 013 13 5Tlag113 013 2IC313 013 10000FA113 013 1

Covariates

Covariates13 are13 subject13 speciZic13 data13 such13 as13 body13 weight13 contained13 in13 the13 data13 csv13 Zile13 The13 covariate13 names13 which13 are13 the13 column13 names13 in13 the13 data13 Zile13 can13 be13 included13 here13 for13 use13 in13 secondary13 variable13 equations13 The13 order13 should13 be13 the13 same13 as13 in13 the13 data13 Zile13 and13 although13 the13 names13 do13 not13 have13 to13 be13 the13 same13 we13 strongly13 encourage13 you13 to13 make13 them13 the13 same13 to13 avoid13 confusionCovariates13 are13 applied13 at13 each13 dose13 event13 13 The13 Zirst13 dose13 event13 for13 each13 subject13 must13 have13 a13 value13 for13 every13 covariate13 in13 the13 data13 Zile13 13 By13 default13 missing13 covariate13 values13 for13 subsequent13 dose13 events13 are13 linearly13 interpolated13 between13 existing13 values13 or13 carried13 forward13 if13 the13 Zirst13 value13 is13 the13 only13 non-shy‐missing13 entry13 13 To13 suppress13 interpolation13 and13 carry13 forward13 the13 previous13 value13 in13 a13 piece-shy‐wise13 constant13 fashion13 include13 an13 exclamation13 point13 ()13 in13 any13 declaration13 lineNote13 that13 any13 covariate13 relationship13 to13 any13 parameter13 may13 be13 described13 as13 the13 user13 wishes13 by13 mathematical13 equations13 and13 Fortran13 code13 allowing13 for13 exploration13 of13 complex13 non-shy‐linear13 time-shy‐dependent13 andor13 conditional13 relationshipsExampleCovwtcypIC()

Userrsquos13 Guide13 13 1113 13

where13 IC13 will13 be13 piece-shy‐wise13 constant13 and13 the13 other13 two13 will13 be13 linearly13 interpolated13 for13 missing13 values

Secondary13 variables

Secondary13 variables13 are13 those13 that13 are13 deZined13 by13 equations13 that13 are13 combinations13 of13 primary13 covariates13 and13 other13 secondary13 variables13 If13 using13 other13 secondary13 variables13 deZine13 them13 Zirst13 within13 this13 block13 Equation13 syntax13 must13 be13 Fortran13 It13 is13 permissible13 to13 have13 conditional13 statements13 but13 because13 expressions13 in13 this13 block13 are13 translated13 into13 variable13 declarations13 in13 Fortran13 expressions13 other13 than13 of13 the13 form13 X13 =13 function(Y)13 must13 be13 preZixed13 by13 a13 +13 and13 contain13 only13 variables13 which13 have13 been13 previously13 deZined13 in13 the13 Primary13 Covariate13 or13 Secondary13 blocksExampleSecCL13 =13 Ke13 13 V13 13 wt075+IF(cyp13 GT13 1)13 CL13 =13 CL13 13 cyp

Bolus13 inputs

By13 default13 inputs13 with13 DUR13 (duration)13 of13 013 in13 the13 data13 csv13 Zile13 are13 delivered13 instantaneously13 to13 the13 model13 compartment13 equal13 to13 the13 input13 number13 ie13 input13 113 goes13 to13 compartment13 113 input13 213 goes13 to13 compartment13 213 etc13 This13 can13 be13 overridden13 with13 NBOLUS(input13 number)13 =13 compartment13 numberExampleBolNBCOMP(1)13 =13 2

Ini1al13 condi1ons

By13 default13 all13 model13 compartments13 have13 zero13 amounts13 at13 time13 013 This13 can13 be13 changed13 by13 specifying13 the13 compartment13 amount13 as13 X()13 =13 expression13 where13 13 is13 the13 compartment13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignoredExampleIniX(2)13 =13 ICV13 (ie13 IC13 is13 a13 covariate13 with13 the13 measured13 trough13 concentration13 prior13 to13 an13 observed13 dose)X(3)13 =13 IC313 (ie13 IC313 is13 a13 Zitted13 amount13 in13 this13 unobserved13 compartment)In13 the13 Zirst13 case13 the13 initial13 condition13 for13 compartment13 213 becomes13 the13 value13 of13 the13 IC13 covariate13 (deZined13 in13 Covariate13 block)13 multiplied13 by13 the13 current13 estimate13 of13 V13 during13 each13 iteration13 13 This13 is13 useful13 when13 a13 subject13 has13 been13 taking13 a13 drug13 as13 an13 outpatient13 and13 comes13 in13 to13 the13 lab13 for13 PK13 sampling13 with13 measurement13 of13 a13 concentration13 immediately13 prior13 to13 a13 witnessed13 dose13 which13 is13 in13 turn13 followed13 by13 more13 sampling13 13 In13 this13 case13 IC13 or13 any13 other13 covariate13 can13 be13 set13 to13 the13 initial13 measured13 concentration13 and13 if13 V13 is13 the13 volume13 of13 compartment13 213 the13 initial13 condition13 (amount)13 in13 compartment13 213 will13 now13 be13 set13 to13 the13 measured13 concentration13 of13 drug13 multiplied13 by13 the13 estimated13 volume13 for13 each13 iteration13 until13 convergenceIn13 the13 second13 case13 the13 initial13 condition13 for13 compartment13 313 becomes13 another13 variable13 IC313 deZined13 in13 the13 Primary13 block13 to13 Zit13 in13 the13 model13 given13 the13 observed13 data

F13 (bioavailability)

Specify13 the13 bioavailability13 term13 if13 present13 Use13 the13 form13 FA()13 =13 expression13 where13 13 is13 the13 input13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignored

Userrsquos13 Guide13 13 1213 13

ExampleFFA(1)13 =13 FA1

Lag13 1me

Specify13 the13 lag13 term13 if13 present13 which13 is13 the13 delay13 after13 an13 absorbed13 dose13 before13 observed13 concentrations13 Use13 the13 form13 TLAG()13 =13 expression13 where13 13 is13 the13 input13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignoredExampleLagTLAG(1)13 =13 Tlag1

Differen1al13 equa1ons

Specify13 a13 model13 in13 terms13 of13 ordinary13 differential13 equations13 in13 Fortran13 format13 XP()13 is13 the13 notation13 for13 dX()dt13 where13 13 is13 the13 compartment13 number13 X()13 is13 the13 amount13 in13 the13 compartment13 There13 can13 be13 a13 maximum13 of13 2013 such13 equationsExampleDifXP(1)13 =13 -shy‐KAX(1)XP(2)13 =13 RATEIV(1)13 +13 KAX(1)13 -shy‐13 (KE+KCP)X(2)13 +13 KPCX(3)XP(3)13 =13 KCPX(2)13 -shy‐13 KPCX(3)RATEIV(1)13 is13 the13 notation13 to13 indicate13 an13 infusion13 of13 input13 113 (typically13 drug13 1)13 13 The13 duration13 of13 the13 infusion13 and13 total13 dose13 is13 deZined13 in13 the13 data13 csv13 Zile13 Up13 to13 713 inputs13 are13 currently13 allowed13 13 These13 can13 be13 used13 in13 the13 model13 Zile13 as13 RATEIV(1)13 RATEIV(2)13 etc13 13 The13 compartments13 for13 13 receiving13 the13 inputs13 of13 oral13 (bolus)13 doses13 are13 deZined13 in13 the13 Bolus13 block

Outputs

Output13 equations13 in13 Fortran13 format13 Outputs13 are13 of13 the13 form13 Y()13 =13 expression13 where13 13 is13 the13 output13 equation13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignored13 There13 can13 be13 a13 maximum13 of13 613 outputs13 13 They13 are13 referred13 to13 as13 Y(1)13 Y(2)13 etcExampleOutY(1)13 =13 X(2)V

Error

This13 block13 contains13 all13 the13 information13 Pmetrics13 requires13 for13 the13 structure13 of13 the13 error13 model13 13 In13 Pmetrics13 each13 observation13 is13 weighted13 by13 1error213 13 13 There13 are13 two13 choices13 for13 the13 error13 term

113 13 error13 =13 SD13 13 gamma213 13 error13 =13 (SD213 +13 lamda2)0513 (Note13 that13 lambda13 is13 only13 available13 in13 NPAG13 currently)

where13 SD13 is13 the13 standard13 deviation13 (SD)13 of13 each13 observation13 [obs]13 and13 gamma13 and13 lambda13 are13 terms13 to13 capture13 extra13 process13 noise13 related13 to13 the13 observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 SD13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 The13 13 values13 for13 the13 coefZicients13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13

Userrsquos13 Guide13 13 1313 13

coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly() 13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0In13 the13 multiplicative13 model13 13 gamma13 is13 a13 scalar13 on13 SD13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 Lambda13 is13 an13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 We13 tend13 to13 prefer13 lambda

To13 specify13 the13 model13 in13 this13 block13 the13 Zirst13 line13 needs13 to13 be13 either13 L=[number]13 or13 G=[number]13 for13 a13 lambda13 or13 gamma13 error13 model13 13 The13 [number]13 term13 is13 the13 starting13 value13 for13 lambda13 or13 gamma13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present13 13 For13 gamma13 good13 starting13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality13 13 If13 you13 include13 an13 exclamation13 point13 ()13 in13 the13 declaration13 then13 lambda13 or13 gamma13 will13 be13 Zixed13 and13 not13 estimated13 13 Note13 that13 you13 can13 only13 Zix13 lambda13 currently13 to13 zeroThe13 next13 line(s)13 contain13 the13 values13 for13 C013 C113 C213 and13 C313 separated13 by13 commas13 13 There13 should13 be13 one13 line13 of13 coefZicients13 for13 each13 output13 equation13 13 By13 default13 Pmetrics13 will13 use13 values13 for13 these13 coefZicients13 found13 in13 the13 data13 Zile13 13 If13 none13 are13 present13 or13 if13 the13 model13 declaration13 line13 contains13 an13 exclamation13 point13 ()13 the13 values13 here13 will13 be13 used

Example13 113 estimated13 lambda13 starting13 at13 0413 one13 output13 use13 data13 Zile13 coefZicients13 but13 if13 missing13 use13 010100ErrL=04010100

Example13 213 Zixed13 gamma13 of13 213 two13 outputs13 use13 data13 Zile13 coefZicients13 but13 if13 missing13 use13 01010013 for13 the13 Zirst13 output13 but13 use13 0313 0113 013 013 for13 output13 213 regardless13 of13 what13 is13 in13 the13 data13 ZileErrG=2010100030100

Extra

This13 block13 is13 for13 advanced13 Fortran13 programmers13 only13 13 Occasionally13 for13 very13 complex13 models13 additional13 Fortran13 subroutines13 are13 required13 13 They13 can13 be13 placed13 here13 13 The13 code13 must13 specify13 complete13 Fortran13 subroutines13 which13 can13 be13 called13 from13 other13 blocks13 with13 appropriate13 call13 functions13 13

Reserved13 Names

The13 following13 cannot13 be13 used13 as13 primary13 covariate13 or13 secondary13 variable13 names13 They13 can13 be13 used13 in13 equations13 however

Reserved13 Variable Func1on13 in13 Pmetricsndim internal

t time

Userrsquos13 Guide13 13 1413 13

x array13 of13 compartment13 amounts

xp array13 of13 Zirst13 derivative13 of13 compartment13 amounts

rpar internal

ipar internal

p array13 of13 primary13 parameters

r input13 rates

b input13 boluses

npl internal

numeqt output13 equation13 number

ndrug input13 number

nadd covariate13 number

rateiv intravenous13 input13 for13 inputs13 when13 DURgt013 in13 data13 Ziles

cv covariate13 values13 array

n number13 of13 compartments

nd internal

ni internal

nup internal

nuic internal

np number13 of13 primary13 parameters

nbcomp bolus13 compartment13 array

psym names13 of13 primary13 parameters

fa biovailability

tlag lag13 time

tin internal

tout internal

Complete13 Example

Here13 is13 a13 complete13 example13 of13 a13 model13 Zile13 as13 of13 Pmetrics13 version13 04013 and13 higher

Userrsquos13 Guide13 13 1513 13

NotesBy13 omitting13 a13 Diffeq13 block13 with13 ODEs13 Pmetrics13 understands13 that13 you13 are13 specifying13 the13 model13 to13 be13 solved13 algebraically13 In13 this13 case13 at13 least13 KE13 and13 V13 must13 be13 in13 the13 Primary13 or13 Secondary13 variables13 KA13 KCP13 and13 KPC13 are13 optional13 and13 specify13 absorption13 and13 transfer13 to13 and13 from13 the13 central13 to13 a13 peripheral13 compartment13 respectively

PriKE13 013 5V013 0113 100KA13 013 5Tlag113 013 3Cov13 wt

SecV13 =13 V0wt

LagTLAG(1)13 =13 Tlag1

OutY(1)13 =13 X(2)V

ErrL=04010100

Userrsquos13 Guide13 13 1613 13

Brief13 Fortran13 Tutorial

Much13 more13 detailed13 help13 is13 available13 from13 httpwwwcsmtuedu~sheneCOURSEScs201NOTESfortranhtml

Arithmetic Operator Meaning

+ addition

- subtraction

multiplication

division

exponentiation

Relational Operator Alternative Operator Meaning

lt LT less than

lt= LE less than or equal

gt GT greater than

gt= GE greater than or equal

== EQ equal

= NE not equal

Selective Execution Example

IF (logical-expression) one-statement IF (T gt= 100) CL = 10

IF (logical-expression) THEN statementsEND IF

IF (T gt= 100) THEN CL = 10 V = 10END IF

IF (logical-expression) THEN statements-1ELSE statements-2END IF

IF (T gt= 100) THEN CL = 10ELSE CL = CLEND IF

Userrsquos13 Guide13 13 1713 13

How to use R and PmetricsSeCng13 up13 a13 Pmetrics13 project

When13 beginning13 a13 new13 modeling13 project13 it13 is13 convenient13 to13 use13 the13 command13 PMtree(ldquoproject namerdquo)13 13 This13 command13 will13 set13 up13 a13 new13 directory13 in13 the13 current13 working13 directory13 named13 whatever13 you13 have13 included13 as13 the13 ldquoproject13 namerdquo13 13 For13 example13 a13 directory13 called13 ldquoDrugXrdquo13 will13 be13 created13 by13 PMtree(ldquoDrugXrdquo)13 13 Beneath13 this13 directory13 several13 subdirectories13 will13 be13 also13 created13 Rscript13 Runs13 Sim13 and13 src13 13 The13 Rscript13 subdirectory13 will13 contain13 a13 skeleton13 R13 script13 to13 begin13 Pmetrics13 runs13 in13 the13 new13 project13 13 The13 Runs13 subdirectory13 should13 contain13 all13 Ziles13 required13 for13 a13 run13 (described13 next)13 and13 it13 will13 also13 contain13 the13 resulting13 numerically13 ordered13 run13 directories13 created13 after13 each13 Pmetrics13 NPAG13 or13 IT2B13 run13 13 The13 Sim13 subdirectory13 can13 contain13 any13 Ziles13 related13 to13 simulations13 and13 the13 src13 subdirectory13 should13 contain13 original13 and13 manipulated13 source13 data13 Ziles13 13 Of13 course13 you13 are13 free13 to13 edit13 this13 directory13 tree13 structure13 as13 you13 please13 or13 make13 your13 own13 entirely

GeCng13 the13 required13 files13 to13 run13 Pmetrics

When13 you13 wish13 to13 execute13 a13 Pmetrics13 run13 you13 must13 ensure13 that13 appropriate13 Pmetrics13 model13 txt13 and13 data13 csv13 Ziles13 are13 in13 the13 working13 directory13 ie13 the13 Runs13 subdirectory13 of13 the13 project13 directory13 13 13 13 R13 can13 be13 used13 to13 help13 prepare13 the13 data13 csv13 Zile13 by13 importing13 and13 manipulating13 spreadsheets13 (eg13 readcsv())13 13 The13 Pmetrics13 function13 PMcheck()13 can13 be13 used13 to13 check13 a13 csv13 Zile13 or13 an13 R13 dataframe13 that13 is13 to13 be13 saved13 as13 a13 Pmetrics13 data13 13 csv13 Zile13 for13 errors13 13 13 13 13 13 It13 can13 also13 check13 a13 model13 Zile13 for13 errors13 in13 the13 context13 of13 a13 dataZile13 eg13 covariates13 that13 do13 not13 match13 13 PMfixMatrix()13 attempts13 to13 automatically13 rid13 data13 Ziles13 of13 errors13 13 The13 function13 PMwriteMatrix() 13 can13 be13 used13 to13 write13 the13 R13 data13 object13 in13 the13 correct13 format13 for13 use13 by13 IT2B13 NPAG13 or13 the13 Simulator13 13 You13 can13 also13 download13 sample13 data13 and13 scripts13 from13 the13 Pmetrics13 downloads13 section13 of13 our13 website13 once13 you13 sign13 in13 with13 your13 LAPK13 user13 email13 address13 and13 password13 13 Edit13 prior13 versions13 of13 model13 Ziles13 to13 make13 new13 model13 Ziles

Using13 scripts13 to13 control13 Pmetrics

As13 you13 will13 see13 in13 the13 skeleton13 R13 script13 made13 by13 PMtree() and13 placed13 in13 the13 Rscript13 subdirectory13 if13 this13 is13 a13 Zirst-shy‐time13 run13 the13 R13 commands13 to13 run13 IT2B13 or13 NPAG13 are13 as13 follows13 13 Recall13 that13 the13 ldquordquo13 character13 is13 a13 comment13 character

library(Pmetrics)Run 1 - add your run description heresetwd(ldquoworking directoryrdquo)NPrun() for NPAG or ITrun() for IT2B

The13 Zirst13 line13 will13 load13 the13 Pmetrics13 library13 of13 functions13 13 The13 second13 line13 sets13 the13 working13 directory13 to13 the13 speciZied13 path13 13 The13 third13 line13 generates13 the13 batch13 Zile13 to13 run13 NPAG13 or13 IT2B13 and13 saves13 it13 to13 the13 working13 directory13

NOTE13 13 On13 Mac13 systems13 the13 batch13 Zile13 will13 be13 automatically13 launched13 in13 a13 Terminal13 window13 13 On13 Windows13 systems13 the13 batch13 Zile13 must13 be13 launched13 manually13 by13 double13 clicking13 the13 np_runbat13 or13 it_runbat13 Zile13 in13 the13 working13 directory

ITrun() 13 and13 NPrun()13 both13 return13 the13 full13 path13 of13 the13 output13 directory13 to13 the13 clipboard13 13 By13 default13 runs13 are13 placed13 in13 folders13 numbered13 sequentially13 beginning13 with13 ldquo1rdquoNow13 the13 output13 of13 IT2B13 or13 NPAG13 needs13 to13 be13 loaded13 into13 R13 so13 the13 next13 command13 does13 this

NPload(run_number) or ITload(run_number)

Details13 of13 these13 commands13 and13 what13 is13 loaded13 are13 described13 in13 the13 R13 documentation13 (NPload 13 or13 ITload)13 and13 in13 the13 following13 section13 13 The13 run_number13 should13 be13 included13 within13 the13 parentheses13 to13 be13 appended13 to13 the13 names13

Userrsquos13 Guide13 13 1813 13

of13 loaded13 R13 objects13 allowing13 for13 comparison13 between13 runs13 eg13 NPload(1)13 13 Finally13 at13 this13 point13 other13 Pmetrics13 commands13 can13 be13 added13 to13 the13 script13 to13 process13 the13 data13 such13 as13 the13 following

plot(final1)plot(cycle1)plot(op1type=rdquopoprdquo) or plot(op1$pop1)plot(op1) default is to plot posterior predictions for output 1plot(op1type=rdquopoprdquoresid=T)

Of13 course13 the13 full13 power13 of13 R13 can13 be13 used13 in13 scripts13 to13 analyze13 data13 but13 these13 simple13 statements13 serve13 as13 examplesIf13 you13 do13 not13 use13 the13 PMtree() structure13 we13 suggest13 that13 the13 R13 script13 for13 a13 particular13 project13 be13 saved13 into13 a13 folder13 called13 ldquoRscriptrdquo13 or13 some13 other13 meaningful13 name13 in13 the13 working13 directory13 13 Folders13 are13 not13 be13 moved13 by13 the13 batch13 Zile13 13 Within13 the13 script13 number13 runs13 sequentially13 and13 use13 comments13 liberally13 to13 13 distinguish13 runs13 as13 shown13 below

library(Pmetrics)

Run 1 - Ka Kel V all subjectssetwd(ldquoworking directoryrdquo)NPrun() assumes model=rdquomodeltxtrdquo and data=rdquodatacsvrdquoNPload(1)

Remember13 in13 R13 that13 the13 command13 example(function) will13 provide13 examples13 for13 the13 speciZied13 function13 13 Most13 Pmetrics13 functions13 have13 examples

Pmetrics Data ObjectsAfter13 a13 successful13 IT2B13 or13 NPAG13 run13 an13 R13 dataZile13 is13 saved13 in13 the13 output13 subdirectory13 of13 the13 newly13 created13 numerically13 ordered13 folder13 in13 the13 working13 directory13 13 After13 IT2B13 this13 Zile13 is13 called13 ldquoIT2BoutRdatardquo13 and13 after13 NPAG13 it13 is13 called13 ldquoNPAGoutRdatardquo13 13 As13 mentioned13 in13 the13 previous13 section13 these13 data13 Ziles13 can13 be13 loaded13 by13 ensuring13 that13 the13 Runs13 folder13 is13 set13 as13 the13 working13 directory13 and13 then13 using13 the13 Pmetrics13 commands13 ITload(run_num)13 or13 NPload(run_num)

Both13 commands13 load13 their13 respective13 Rdata13 Ziles13 into13 R13 making13 the13 contained13 objects13 available13 for13 plotting13 and13 other13 analysisObjects13 loaded13 by13 ITload(run_num) and NPload(run_num)

Objects Variables Comments

op13 (class13 PMop13 list) $pop113 $post113 Population13 and13 posterior13 predictions13 for13 each13 output13 equation13 ie13 113 213

13 $id Subject13 identiZication

13 $time Observation13 time13 in13 relative13 decimal13 hours

13 $obs Observation

13 $pred Prediction13 based13 on13 median13 of13 population13 or13 posterior13 parameter13 value13 distributions

Userrsquos13 Guide13 13 1913 13

Objects Variables Comments

13 $block Dosing13 block13 usually13 113 unless13 data13 Zile13 contains13 EVID=413 dose13 reset13 events13 in13 which13 case13 each13 such13 reset13 within13 a13 given13 ID13 will13 increment13 the13 dosing13 block13 by13 113 for13 that13 ID

13 $obsSD Calculated13 standard13 deviation13 (error)13 of13 the13 observation13 based13 on13 the13 assay13 error13 polynomial

13 $d Difference13 between13 pred13 and13 obs

13 $ds Squared13 difference13 between13 pred13 and13 obs

13 $wd $d13 weighted13 by13 the13 $obsSD

13 $wds $ds13 weighted13 by13 the13 $obsSD

Zinal13 (class13 PMZinal13 list) $popPoints (NPAG13 only)13 Dataframe13 of13 the13 Zinal13 cycle13 joint13 population13 density13 of13 grid13 points13 with13 column13 names13 equal13 to13 the13 name13 of13 each13 random13 parameter13 plus13 $prob13 for13 the13 associated13 probability13 of13 that13 point13

$popMean The13 Zinal13 cycle13 mean13 for13 each13 random13 parameter13 distribution

$popSD The13 Zinal13 cycle13 standard13 deviation13 for13 each13 random13 parameter13 distribution

$popCV The13 Zinal13 cycle13 coefZicient13 of13 variation13 for13 each13 random13 parameter13 distribution

$popVar The13 Zinal13 cycle13 variance13 for13 each13 random13 parameter13 distribution

$popCov The13 Zinal13 cycle13 covariance13 matrix13 for13 each13 random13 parameter13 distribution

$popCor The13 Zinal13 cycle13 correlation13 matrix13 for13 each13 random13 parameter13 distribution

$popMedian The13 Zinal13 cycle13 median13 for13 each13 random13 parameter13 distribution

$gridpts (NPAG13 only)13 The13 initial13 number13 of13 support13 points

$ab Matrix13 of13 boundaries13 for13 random13 parameter13 values13 13 For13 NPAG13 this13 is13 speciZied13 by13 the13 user13 prior13 to13 the13 run13 for13 IT2B13 it13 is13 calculated13 as13 a13 user13 speciZied13 multiple13 of13 the13 SD13 for13 the13 parameter13 value13 distribution

Userrsquos13 Guide13 13 2013 13

Objects Variables Comments

cycle13 (class13 PMcycle13 list) $names Vector13 of13 names13 of13 the13 random13 parameters

$ll Matrix13 of13 cycle13 number13 and13 -shy‐2Log-shy‐likelihood13 at13 each13 cycle

$gamlam A13 matrix13 of13 cycle13 number13 and13 gamma13 or13 lambda13 at13 each13 cycle13 (see13 item13 1613 under13 NPAG13 Runs13 below13 for13 a13 discussion13 of13 gamma13 and13 lambda)

$mean A13 matrix13 of13 cycle13 number13 and13 the13 mean13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 mean

$sd A13 matrix13 of13 cycle13 number13 and13 the13 standard13 deviation13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$median A13 matrix13 of13 cycle13 number13 and13 the13 median13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$aic A13 matrix13 of13 cycle13 number13 and13 Akaike13 Information13 Criterion13 at13 each13 cycle

$bic A13 matrix13 of13 cycle13 number13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle

cov13 (class13 PMcov13 dataframe)

$id Subject13 identiZication

$time Time13 for13 each13 covariate13 entry

covariates Covariate13 values13 for13 each13 subject13 at13 each13 time13 extracted13 from13 the13 raw13 data13 Zile

parameters Mean13 median13 or13 mode13 of13 Bayesian13 posterior13 distribution13 for13 each13 random13 parameter13 in13 the13 model13 13 Mode13 summaries13 are13 available13 for13 NPAG13 output13 only13 and13 the13 default13 is13 median13 13 Values13 are13 recycled13 for13 each13 row13 within13 a13 given13 subject13 with13 the13 number13 of13 rows13 driven13 by13 the13 number13 of13 covariate13 entries

Userrsquos13 Guide13 13 2113 13

Objects Variables Comments

pop13 (class13 PMpop13 dataframe)

post13 (class13 PMpost13 dataframe)

NPAG13 only

$id Subject13 identiZication

$pred113 Population13 prior13 (PMpop)13 or13 Bayesian13 posterior13 (PMpost)13 predictions13 for13 each13 output13 equation13 based13 on13 mean13 median13 and13 mode13 as13 speciZied13 by13 the13 user13 and13 with13 frequency13 also13 speciZied13 by13 the13 user13 in13 the13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

$block Same13 as13 for13 PMop13 objects13 above

NPdata13 (class13 NPAG13 list)13 ITdata13 (class13 IT2B13 list

Raw13 data13 used13 to13 make13 the13 above13 objects13 13 Please13 use13 NPparse13 or13 ITparse13 in13 R13 for13 discussion13 of13 the13 data13 contained13 in13 these13 objects

Since13 R13 is13 an13 object13 oriented13 language13 to13 access13 the13 observations13 in13 a13 PMop13 object13 for13 example13 use13 the13 following13 syntax13 op$post1$obsNote13 that13 you13 will13 place13 an13 integer13 within13 the13 parentheses13 of13 the13 loading13 functions13 eg13 NPload(1)13 which13 will13 sufZix13 all13 the13 above13 objects13 with13 that13 integer13 eg13 op113 Zinal113 NPdata113 13 This13 allows13 several13 models13 to13 be13 loaded13 into13 R13 simultaneously13 each13 with13 a13 unique13 sufZix13 and13 which13 can13 be13 compared13 with13 the13 PMcompare()13 command13 (see13 Model13 Diagnostics13 below)

Making New Pmetrics ObjectsOnce13 you13 have13 loaded13 the13 raw13 (NPdata13 or13 ITdata)13 or13 processed13 (op13 Uinal13 cycle13 pop13 post)13 data13 objects13 described13 above13 with13 NPload(run_num)13 or13 ITload(run_num)13 should13 you13 wish13 to13 remake13 the13 processed13 objects13 with13 parameters13 other13 than13 the13 defaults13 you13 can13 easily13 do13 so13 with13 the13 make 13 family13 of13 commands13 13 For13 example13 the13 default13 for13 PMop13 observed13 vs13 predicted13 objects13 is13 to13 use13 the13 prediction13 based13 on13 the13 median13 of13 the13 population13 or13 posterior13 distribution13 13 If13 you13 wish13 to13 use13 the13 mean13 of13 the13 distribution13 remake13 the13 PMop13 object13 using makeOP()13 13 If13 you13 wish13 to13 see13 all13 the13 cycle13 information13 in13 a13 PMcycle13 object13 not13 omitting13 the13 Zirst13 1013 of13 cycles13 by13 default13 remake13 it13 using13 makeCycle()13 13

For13 all13 of13 the13 following13 commands13 the13 data13 input13 is13 either13 NPdata13 or13 ITdata13 with13 additional13 function13 arguments13 speciZic13 to13 each13 command13 13 Accessing13 the13 help13 for13 each13 function13 in13 R13 will13 provide13 further13 details13 on13 the13 arguments13 defaults13 and13 output13 of13 each13 command

Userrsquos13 Guide13 13 2213 13

Command Description R13 help

makeAUC Make13 a13 dataframe13 of13 class13 PMauc13 containing13 subject13 ID13 and13 AUC13 from13 a13 variety13 of13 inputs13 including13 objects13 of13 PMop13 PMsim13 or13 a13 suitable13 dataframe

makeAUC

makeCov Generate13 a13 dataframe13 of13 class13 PMcov13 with13 subject-shy‐speciZic13 covariates13 extracted13 from13 the13 data13 csv13 Zile13 This13 object13 can13 be13 plotted13 and13 used13 to13 test13 for13 covariates13 which13 are13 signiZicantly13 associated13 with13 model13 parameters13 13

makeCov

makeCycle Create13 a13 PMcycle13 object13 described13 in13 the13 previous13 section makeCycle

makeFinal Create13 a13 PMZinal13 object13 described13 in13 the13 previous13 section makeFinal

makeOP Create13 a13 PMop13 object13 described13 in13 the13 previous13 section makeOP

makeNCA Create13 a13 dataframe13 (class13 PMnca)13 with13 the13 output13 of13 a13 non-shy‐compartmental13 analysis13 using13 PMpost13 and13 NPAG13 data13 objects13 as13 input13 13 The13 PMnca13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull auc13 Area13 under13 the13 time-shy‐observation13 curve13 using13 the13

trapezoidal13 approximation13 from13 time13 013 until13 the13 second13 dose13 or13 if13 only13 one13 dose13 until13 the13 last13 observation

bull aumc13 Area13 under13 the13 Zirst13 moment13 curvebull k13 Slope13 by13 least-shy‐squares13 linear13 regression13 of13 the13 Zinal13

613 log-shy‐transformed13 observations13 vs13 timebull auclast13 Area13 under13 the13 curve13 from13 the13 time13 of13 the13

last13 observation13 to13 inZinity13 calculated13 as13 [Final13 obs]kbull aumclast13 Area13 under13 the13 Zirst13 moment13 curve13 from13

the13 time13 of13 the13 last13 observation13 to13 inZinitybull aucinf13 Area13 under13 the13 curve13 from13 time13 013 to13 inZinity13

caluculated13 as13 auc13 +13 auclastbull aumcinf13 Area13 under13 the13 Zirst13 moment13 curve13 from13

time13 013 to13 inZinitybull mrt13 Mean13 residence13 time13 calculated13 as13 1kbull cmax13 Maximum13 predicted13 concentration13 after13 the13

Zirst13 dosebull tmax13 Time13 to13 cmaxbull cl13 Clearance13 calculated13 as13 doseaucinfbull vdss13 Volume13 of13 distribution13 at13 steady13 state13

calculated13 as13 clmrtbull thalf13 Half13 life13 of13 elimination13 calculated13 as13 ln(2)kbull dose13 First13 dose13 amount13 for13 each13 subject

makeNCA

Userrsquos13 Guide13 13 2313 13

Command Description R13 help

makeErrorPoly This13 function13 plots13 Zirst13 second13 and13 third13 order13 polynomial13 functions13 Zitted13 to13 pairs13 of13 observations13 and13 associated13 standard13 deviations13 for13 a13 given13 output13 assay13 In13 this13 way13 the13 standard13 deviation13 associated13 with13 any13 observation13 may13 be13 calculated13 and13 used13 to13 appropriately13 weight13 that13 observation13 in13 the13 model13 building13 process13 Observations13 are13 weighted13 by13 the13 reciprocal13 of13 the13 variance13 or13 squared13 standard13 deviation13 13 Output13 of13 the13 function13 is13 a13 plot13 of13 the13 measured13 observations13 and13 Zitted13 polynomial13 curves13 and13 a13 list13 with13 the13 Zirst13 second13 and13 third13 order13 coefZicients

makeErrorPoly

makePTA This13 function13 performs13 a13 Probability13 of13 Target13 Attainment13 analysis13 for13 a13 set13 of13 simulated13 doses13 and13 time-shy‐concentration13 proZiles13 13 Targets13 (eg13 Minimum13 Inhibitory13 Concentrations)13 the13 type13 of13 target13 attainment13 (ie13 time13 above13 target13 Cmaxtarget13 13 AUCtarget13 Cmintarget13 or13 Cxtarget13 where13 x13 is13 any13 time13 point)13 and13 the13 success13 threshold13 (eg13 time13 gt13 0713 or13 Cmaxtarget13 gt13 10)13 can13 all13 be13 speciZied13 13 Output13 is13 a13 list13 (class13 PMpta)13 with13 two13 objectsbull Results13 a13 413 dimensional13 array13 with13 dimension13 size13 of13

[number13 of13 doses13 number13 of13 targets13 number13 of13 simulated13 proZiles13 1]13 which13 gives13 the13 target13 attainment13 (eg13 Cmaxtarget)13 for13 each13 dose13 target13 and13 proZile

bull Outcome13 For13 each13 dose13 and13 target13 a13 summary13 of13 the13 target13 attainment13 for13 all13 the13 proZiles13 including13 mean13 standard13 deviation13 and13 proportion13 above13 the13 success13 threshold

PMpta13 objects13 can13 be13 summarized13 with13 summary(x)13 and13 plotted13 with13 plot(x)13

makePTA

Userrsquos13 Guide13 13 2413 13

Command Description R13 help

makePopmakePost(NPAG13 only)

These13 functions13 create13 dataframes13 of13 class13 PMpop13 and13 PMpost13 respectively13 13 The13 PMpop13 or13 PMpost13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull time13 Times13 for13 predicted13 concentrations13 13 These13

times13 are13 not13 necessarily13 at13 observed13 times13 but13 at13 a13 frequency13 speciZied13 in13 the13 NPAG13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

bull pred113 Predictions13 for13 output13 113 13 For13 PMpop13 objects13 predictions13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 population13 prior13 distribution13 13 For13 PMpost13 objects13 they13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject

bull pred213 pred313 etc13 If13 additional13 outputs13 exist13 they13 will13 each13 be13 columns13 in13 the13 dataframe13 just13 as13 for13 pred113 13

makePopmakePost

NPAG RunsIn13 the13 past13 users13 had13 to13 run13 NPAG13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 NPrun()13 13 However13 if13 NPrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable

1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 NPAG13 creates13 a13 temporary13 instruction13 Zile13 in13 case13 something13 happens13 so13 that13 instructions13 entered13 to13 date13 can13

be13 recovered13 13 Accept13 the13 default13 by13 choosing13 113 13 You13 can13 save13 with13 a13 meaningful13 Zilename13 later13 13 If13 it13 already13 exists13 you13 will13 be13 asked13 if13 you13 wish13 to13 overwrite13 the13 Zile13 which13 is13 usually13 the13 thing13 to13 do

Userrsquos13 Guide13 13 2513 13

8 If13 you13 have13 previously13 run13 IT2B13 you13 can13 automatically13 import13 the13 suggested13 parameter13 ranges13 13 Choose13 113 to13 do13 this13 and13 013 to13 run13 NPAG13 without13 a13 previous13 IT2B13 run81 If13 you13 choose13 option13 113 you13 must13 specify13 the13 name13 of13 a13 FROMxxxx13 Zile13 typically13 FROM000113 that13 you13 can13

Zind13 in13 an13 output13 directory13 after13 a13 successful13 IT2B13 run13 13 Note13 that13 the13 program13 will13 then13 assume13 that13 you13 are13 using13 the13 same13 wrk13 Ziles13 that13 IT2B13 made13 from13 your13 data13 csv13 Zile13 13 It13 is13 strongly13 recommended13 to13 override13 this13 and13 specify13 a13 data13 csv13 Zile13 13 At13 this13 point13 you13 will13 jump13 to13 1013 below13 and13 continue13 on13 however13 your13 answers13 will13 often13 be13 supplied13 by13 the13 instructions13 contained13 in13 the13 FROMxxxx13 Zile13 and13 you13 need13 merely13 conZirm13 them

9 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13 have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 NPrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis91 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13

for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

10 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 NPAG13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

11 Enter13 the13 name13 of13 your13 csv13 Zile13 now12 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile13 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset131 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects132 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry14 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset15 Enter13 the13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo 13 followed13 by13

return16 Select13 how13 you13 would13 like13 to13 model13 assay13 (observation)13 error13 for13 each13 output13 equation13 13 You13 have13 four13 choices13 13

In13 all13 four13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0161 Error13 model13 113 (SD)13 13 Choose13 this13 option13 if13 you13 have13 already13 run13 IT2B13 and13 multiplied13 your13 assay13 error13

polynomial13 by13 gamma13 (see13 next13 option13 for13 a13 description13 of13 gamma)162 Error13 model13 213 (SD13 13 gamma)13 13 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13

observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 If13 you13 choose13 this13 option13 you13 then13 can13 specify13 the13 starting13 value13 of13 gamma13 13 Good13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality

163 Error13 model13 313 (SD213 +13 lamda2)0513 13 Lamda13 is13 an13 alternative13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present

Userrsquos13 Guide13 13 2613 13

164 Error13 model13 413 SD13 =13 gamma13 13 This13 model13 is13 rarely13 used13 and13 is13 equivalent13 to13 specifying13 a13 model13 with13 C013 only13 ie13 a13 constant13 error13 regardless13 of13 concentration

17 Once13 you13 select13 the13 assay13 error13 model13 for13 each13 output13 equation13 you13 are13 then13 offered13 four13 more13 options13 on13 which13 assay13 error13 polynomial13 coefZicients13 to13 use13 13 Choices13 113 and13 213 are13 the13 most13 commonly13 used171 Choice13 113 The13 default13 13 Use13 coefZicients13 in13 the13 subject13 record13 (C013 C113 C213 C313 in13 the13 data13 csv13 Zile)13 and13 if13

missing13 use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 (item13 1813 below)172 Choice13 213 Use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 for13 all13 subjects13 regardless13 of13 what13 is13 in13 the13

data13 csv13 Zile173 Choice13 313 13 To13 multiply13 data13 csv13 values13 and13 default13 entered13 values13 by13 a13 Zixed13 gamma13 and13 use13 them13 13 174 Choice13 013 Specify13 coefZicients13 on13 a13 subject13 by13 subject13 basis13 either13 those13 in13 the13 data13 csv13 Zile13 already13 the13

default13 values13 entered13 into13 the13 program13 or13 other13 values18 For13 each13 output13 equation13 after13 you13 have13 selected13 the13 option13 in13 item13 1713 you13 will13 be13 prompted13 to13 supply13 the13

required13 information13 including13 the13 general13 default13 values13 for13 missing13 or13 overridden13 values13 in13 the13 data13 csv13 Zile19 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13

usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13

20 Enter13 the13 grid13 point13 index13 13 This13 number13 corresponds13 to13 the13 number13 of13 grid13 (support)13 points13 which13 will13 initially13 Zill13 the13 model13 parameter13 space13 13 The13 larger13 the13 number13 of13 random13 parameters13 to13 be13 estimated13 the13 more13 points13 are13 required13 13 The13 program13 will13 make13 a13 suggestion13 based13 on13 the13 number13 of13 random13 parameters13 in13 the13 model13 13 The13 more13 you13 choose13 the13 slower13 the13 run13 will13 be13 but13 results13 may13 improve13 13 It13 is13 reasonable13 to13 choose13 fewer13 points13 early13 in13 model13 exploration13 and13 increase13 in13 later13 phases13 or13 if13 poor13 model13 Zits13 or13 lack13 of13 convergence13 are13 noted13 The13 choices13 are13 113 to13 713 corresponding13 respectively13 to13 212913 500313 1000713 2001113 4000913 and13 8002113 points13 13 If13 you13 choose13 713 you13 then13 have13 an13 additional13 choice13 to13 select13 one13 or13 more13 multiples13 of13 8002113 points

21 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 013 or13 greater13 13 If13 you13 enter13 an13 integer13 greater13 than13 013 the13 engine13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13 If13 you13 enter13 013 this13 is13 the13 way13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 an13 independent13 data13 set13 and13 a13 non-shy‐uniform13 prior13 must13 be13 speciZied13 (see13 3013 below)13 13 This13 means13 that13 the13 engine13 will13 only13 calculate13 the13 individual13 Bayesian13 posteriors13 for13 the13 new13 subjects13 using13 the13 population13 joint13 density13 from13 a13 previous13 run13 as13 a13 Bayesian13 prior

22 Information13 about13 convergence13 criteria13 13 Answer13 113 or13 some13 other13 keystroke13 plus13 Return13 to13 acknowledge13 that13 you13 have13 read13 it

23 In13 order13 to13 predict13 concentrations13 from13 a13 non-shy‐parametric13 distribution13 you13 have13 the13 option13 to13 use13 the13 1)13 mean13 2)13 median13 or13 3)13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject13 13 We13 typically13 use13 the13 median13 Zirst13 and13 then13 the13 mean13 in13 a13 separate13 run13 and13 compare13 the13 differences13 13

24 Select13 the13 time13 interval13 to13 generate13 predicted13 concentrations13 13 Additionally13 there13 will13 also13 be13 predictions13 made13 at13 the13 time13 of13 each13 observation13 13 In13 general13 for13 most13 models13 predictions13 every13 1213 minutes13 provide13 sufZicient13 granularity13 13 Smaller13 values13 can13 result13 in13 very13 large13 Ziles13 for13 big13 populations

25 Select13 the13 default13 MIC13 to13 be13 used13 for13 AUCMIC13 ratio13 reporting13 13 This13 should13 generally13 be13 set13 to13 the13 default13 of13 113 by13 choosing13 113 13 You13 can13 always13 extract13 the13 AUC13 later13 and13 divide13 it13 by13 any13 MIC13 you13 choose

26 Enter13 the13 value13 in13 hours13 that13 you13 want13 for13 calculations13 of13 AUCs13 from13 predicted13 concentration13 proZiles13 13 The13 default13 is13 2413 hours13 which13 you13 can13 accept13 by13 entering13 113 or13 013 if13 you13 want13 to13 specify13 a13 different13 interval

27 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

28 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

Userrsquos13 Guide13 13 2713 13

29 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

30 For13 the13 prior13 density13 choose13 113 if13 it13 is13 to13 be13 uniform13 13 This13 means13 that13 the13 initial13 grid13 points13 will13 be13 evenly13 distributed13 with13 equal13 probability13 within13 the13 boundaries13 speciZied13 (in13 1513 above)13 13 If13 you13 choose13 013 you13 will13 be13 prompted13 for13 the13 name13 of13 a13 Zile13 that13 contains13 the13 prior13 density13 13 This13 will13 be13 DEN000113 unless13 you13 have13 changed13 its13 name13 13 It13 will13 be13 found13 in13 the13 output13 directory13 of13 a13 prior13 NPAG13 run13 13 The13 model13 used13 to13 generate13 the13 DEN000113 Zile13 must13 be13 exactly13 the13 same13 as13 the13 current13 model13 including13 parameter13 boundaries13 13 However13 this13 option13 is13 useful13 to13 specify13 a13 non-shy‐uniform13 density13 for13 two13 reasons13 13 The13 Zirst13 is13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 a13 new13 set13 of13 subjects13 13 Do13 this13 in13 combination13 with13 setting13 the13 number13 of13 cycles13 to13 013 (see13 2113 above)13 13 The13 second13 use13 for13 a13 non-shy‐uniform13 prior13 is13 to13 continue13 a13 previous13 run13 13 For13 example13 if13 you13 only13 set13 the13 number13 of13 cycles13 to13 5013 to13 get13 a13 rough13 idea13 of13 model13 Zit13 you13 may13 continue13 where13 you13 left13 off13 by13 specifying13 the13 DEN000113 Zile13 from13 the13 50-shy‐cycle13 run13 and13 continuing13 with13 as13 many13 additional13 cycles13 as13 you13 specify13 in13 item13 2113 13 So13 in13 the13 example13 if13 you13 specify13 10013 cycles13 in13 2113 the13 total13 number13 of13 cycles13 will13 be13 5013 +13 10013 =13 150

31 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 NPrun(instr=ldquoyourfilerdquo)13 option13 and13 including13 ldquoyourZilerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

32 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 NPAG13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 NPAG13 analysis

33 The13 NPAG13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

IT2B RunsIn13 the13 past13 users13 had13 to13 run13 IT2B13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 ITrun()13 13 However13 if13 ITrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13

have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 ITrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis

Userrsquos13 Guide13 13 2813 13

71 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13 for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

8 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 IT2B13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

9 Enter13 the13 name13 of13 your13 csv13 Zile13 now10 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile11 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset111 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects112 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry12 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset13 Enter13 the13 initial13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo13 followed13

by13 return14 The13 estimated13 mean13 for13 each13 parameter13 value13 distribution13 during13 the13 Zirst13 iteration13 will13 be13 the13 median13 of13 the13

range13 speciZied13 in13 1313 13 You13 now13 have13 the13 option13 to13 specify13 the13 standard13 deviation13 for13 the13 parameter13 value13 distribution13 which13 by13 default13 is13 half13 of13 the13 range13 in13 1313 13 Choose13 113 to13 accept13 this13 (the13 usual13 answer)13 or13 013 to13 change13 it13 to13 something13 else13 expressed13 as13 a13 multiple13 of13 the13 range

15 In13 IT2B13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 You13 can13 now13 choose13 113 if13 every13 subject13 has13 the13 same13 coefZicients13 or13 013 to13 use13 a13 unique13 set13 of13 coefZicients13 for13 each13 subject13 13 The13 Zirst13 case13 is13 the13 more13 usual13 when13 all13 13 samples13 from13 all13 subjects13 are13 analyzed13 in13 the13 same13 lab13 13 If13 13 samples13 are13 analyzed13 in13 different13 labs13 and13 you13 have13 the13 assay13 data13 from13 each13 lab13 then13 you13 would13 enter13 013 13 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 (see13 151313 below)13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0151 If13 you13 choose13 113 (one13 set13 of13 coefZicients13 for13 all13 subjects)13 you13 will13 then13 be13 presented13 with13 313 additional13

choices1511 Choice13 113 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13 observation13

including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 and13 to13 Zix13 gamma13 to13 1

1512 Choice13 213 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 but13 to13 estimate13 gamma13 based13 on13 the13 data13 13 This13 is13 the13 usual13 option

1513 Choice13 313 Choose13 this13 option13 if13 you13 wish13 to13 estimate13 the13 assay13 error13 coefZicients13 based13 on13 your13 data13 for13 use13 in13 future13 runs13 13 Although13 you13 can13 access13 this13 option13 by13 using13 either13 ITrun()13 or13 ERRrun()13 in13 R13 the13 instruction13 Ziles13 that13 you13 save13 and13 the13 generated13 output13 Ziles13 will13 be13 different13 13 Therefore13 we13 recommend13 that13 if13 you13 intend13 to13 choose13 this13 option13 use13 ERRrun()13 in13 R13 which13 will13 generate13 an13 ASS000113 Zile13 that13 contains13 the13 estimates13 for13 C013 C113 C213 and13 C313 13 You13 can13 then13 include13 this13 Zile13 in13 the13 working13 directory13 (along13 with13 a13 model13 txt13 Zile13 and13 a13 data13 csv13 Zile)13 to13 do13 an13 IT2B13 run13 supplying13 the13 Zile13 name13 in13 16113 below

Userrsquos13 Guide13 13 2913 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

F13 (bioavailability)LAG13 timeDIFferential13 equationsOUTputsERRorEXTraFor13 each13 header13 only13 the13 capital13 letters13 are13 required13 for13 recognition13 by13 Pmetrics13 The13 blocks13 can13 be13 in13 any13 order13 and13 header13 names13 are13 case-shy‐insensitive13 (ie13 the13 capitalization13 here13 is13 just13 to13 show13 which13 letters13 are13 required)13 Fortran13 is13 also13 case-shy‐insensitive13 so13 in13 variable13 names13 and13 expressions13 case13 is13 ignored13 13 Details13 of13 each13 block13 are13 next13 followed13 by13 a13 complete13 example

Primary13 variables

Primary13 variables13 are13 the13 model13 parameters13 that13 are13 to13 be13 estimated13 by13 Pmetrics13 or13 are13 designated13 as13 Zixed13 parameters13 with13 user13 speciZied13 values13 It13 should13 be13 a13 list13 of13 variable13 names13 one13 name13 to13 a13 line13 Variable13 names13 should13 be13 1113 characters13 or13 fewer13 Some13 variable13 names13 are13 reserved13 for13 use13 by13 Pmetrics13 and13 cannot13 be13 used13 as13 primary13 variable13 names13 13 13 The13 number13 of13 primary13 variables13 must13 be13 between13 213 and13 3213 with13 at13 most13 3013 random13 or13 2013 Uixed13 13 On13 each13 row13 following13 the13 variable13 name13 include13 the13 range13 for13 the13 parameter13 that13 deZines13 the13 search13 space13 13 For13 NPAG13 this13 is13 absolute13 ie13 the13 algorithm13 will13 not13 search13 outside13 this13 range13 13 For13 IT2B13 the13 range13 is13 a13 starting13 range13 13 The13 simulator13 will13 ignore13 the13 ranges13 ExamplePriKE13 013 5V13 00113 100KA13 013 5KCP13 013 5KPC13 013 13 5Tlag113 013 2IC313 013 10000FA113 013 1

Covariates

Covariates13 are13 subject13 speciZic13 data13 such13 as13 body13 weight13 contained13 in13 the13 data13 csv13 Zile13 The13 covariate13 names13 which13 are13 the13 column13 names13 in13 the13 data13 Zile13 can13 be13 included13 here13 for13 use13 in13 secondary13 variable13 equations13 The13 order13 should13 be13 the13 same13 as13 in13 the13 data13 Zile13 and13 although13 the13 names13 do13 not13 have13 to13 be13 the13 same13 we13 strongly13 encourage13 you13 to13 make13 them13 the13 same13 to13 avoid13 confusionCovariates13 are13 applied13 at13 each13 dose13 event13 13 The13 Zirst13 dose13 event13 for13 each13 subject13 must13 have13 a13 value13 for13 every13 covariate13 in13 the13 data13 Zile13 13 By13 default13 missing13 covariate13 values13 for13 subsequent13 dose13 events13 are13 linearly13 interpolated13 between13 existing13 values13 or13 carried13 forward13 if13 the13 Zirst13 value13 is13 the13 only13 non-shy‐missing13 entry13 13 To13 suppress13 interpolation13 and13 carry13 forward13 the13 previous13 value13 in13 a13 piece-shy‐wise13 constant13 fashion13 include13 an13 exclamation13 point13 ()13 in13 any13 declaration13 lineNote13 that13 any13 covariate13 relationship13 to13 any13 parameter13 may13 be13 described13 as13 the13 user13 wishes13 by13 mathematical13 equations13 and13 Fortran13 code13 allowing13 for13 exploration13 of13 complex13 non-shy‐linear13 time-shy‐dependent13 andor13 conditional13 relationshipsExampleCovwtcypIC()

Userrsquos13 Guide13 13 1113 13

where13 IC13 will13 be13 piece-shy‐wise13 constant13 and13 the13 other13 two13 will13 be13 linearly13 interpolated13 for13 missing13 values

Secondary13 variables

Secondary13 variables13 are13 those13 that13 are13 deZined13 by13 equations13 that13 are13 combinations13 of13 primary13 covariates13 and13 other13 secondary13 variables13 If13 using13 other13 secondary13 variables13 deZine13 them13 Zirst13 within13 this13 block13 Equation13 syntax13 must13 be13 Fortran13 It13 is13 permissible13 to13 have13 conditional13 statements13 but13 because13 expressions13 in13 this13 block13 are13 translated13 into13 variable13 declarations13 in13 Fortran13 expressions13 other13 than13 of13 the13 form13 X13 =13 function(Y)13 must13 be13 preZixed13 by13 a13 +13 and13 contain13 only13 variables13 which13 have13 been13 previously13 deZined13 in13 the13 Primary13 Covariate13 or13 Secondary13 blocksExampleSecCL13 =13 Ke13 13 V13 13 wt075+IF(cyp13 GT13 1)13 CL13 =13 CL13 13 cyp

Bolus13 inputs

By13 default13 inputs13 with13 DUR13 (duration)13 of13 013 in13 the13 data13 csv13 Zile13 are13 delivered13 instantaneously13 to13 the13 model13 compartment13 equal13 to13 the13 input13 number13 ie13 input13 113 goes13 to13 compartment13 113 input13 213 goes13 to13 compartment13 213 etc13 This13 can13 be13 overridden13 with13 NBOLUS(input13 number)13 =13 compartment13 numberExampleBolNBCOMP(1)13 =13 2

Ini1al13 condi1ons

By13 default13 all13 model13 compartments13 have13 zero13 amounts13 at13 time13 013 This13 can13 be13 changed13 by13 specifying13 the13 compartment13 amount13 as13 X()13 =13 expression13 where13 13 is13 the13 compartment13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignoredExampleIniX(2)13 =13 ICV13 (ie13 IC13 is13 a13 covariate13 with13 the13 measured13 trough13 concentration13 prior13 to13 an13 observed13 dose)X(3)13 =13 IC313 (ie13 IC313 is13 a13 Zitted13 amount13 in13 this13 unobserved13 compartment)In13 the13 Zirst13 case13 the13 initial13 condition13 for13 compartment13 213 becomes13 the13 value13 of13 the13 IC13 covariate13 (deZined13 in13 Covariate13 block)13 multiplied13 by13 the13 current13 estimate13 of13 V13 during13 each13 iteration13 13 This13 is13 useful13 when13 a13 subject13 has13 been13 taking13 a13 drug13 as13 an13 outpatient13 and13 comes13 in13 to13 the13 lab13 for13 PK13 sampling13 with13 measurement13 of13 a13 concentration13 immediately13 prior13 to13 a13 witnessed13 dose13 which13 is13 in13 turn13 followed13 by13 more13 sampling13 13 In13 this13 case13 IC13 or13 any13 other13 covariate13 can13 be13 set13 to13 the13 initial13 measured13 concentration13 and13 if13 V13 is13 the13 volume13 of13 compartment13 213 the13 initial13 condition13 (amount)13 in13 compartment13 213 will13 now13 be13 set13 to13 the13 measured13 concentration13 of13 drug13 multiplied13 by13 the13 estimated13 volume13 for13 each13 iteration13 until13 convergenceIn13 the13 second13 case13 the13 initial13 condition13 for13 compartment13 313 becomes13 another13 variable13 IC313 deZined13 in13 the13 Primary13 block13 to13 Zit13 in13 the13 model13 given13 the13 observed13 data

F13 (bioavailability)

Specify13 the13 bioavailability13 term13 if13 present13 Use13 the13 form13 FA()13 =13 expression13 where13 13 is13 the13 input13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignored

Userrsquos13 Guide13 13 1213 13

ExampleFFA(1)13 =13 FA1

Lag13 1me

Specify13 the13 lag13 term13 if13 present13 which13 is13 the13 delay13 after13 an13 absorbed13 dose13 before13 observed13 concentrations13 Use13 the13 form13 TLAG()13 =13 expression13 where13 13 is13 the13 input13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignoredExampleLagTLAG(1)13 =13 Tlag1

Differen1al13 equa1ons

Specify13 a13 model13 in13 terms13 of13 ordinary13 differential13 equations13 in13 Fortran13 format13 XP()13 is13 the13 notation13 for13 dX()dt13 where13 13 is13 the13 compartment13 number13 X()13 is13 the13 amount13 in13 the13 compartment13 There13 can13 be13 a13 maximum13 of13 2013 such13 equationsExampleDifXP(1)13 =13 -shy‐KAX(1)XP(2)13 =13 RATEIV(1)13 +13 KAX(1)13 -shy‐13 (KE+KCP)X(2)13 +13 KPCX(3)XP(3)13 =13 KCPX(2)13 -shy‐13 KPCX(3)RATEIV(1)13 is13 the13 notation13 to13 indicate13 an13 infusion13 of13 input13 113 (typically13 drug13 1)13 13 The13 duration13 of13 the13 infusion13 and13 total13 dose13 is13 deZined13 in13 the13 data13 csv13 Zile13 Up13 to13 713 inputs13 are13 currently13 allowed13 13 These13 can13 be13 used13 in13 the13 model13 Zile13 as13 RATEIV(1)13 RATEIV(2)13 etc13 13 The13 compartments13 for13 13 receiving13 the13 inputs13 of13 oral13 (bolus)13 doses13 are13 deZined13 in13 the13 Bolus13 block

Outputs

Output13 equations13 in13 Fortran13 format13 Outputs13 are13 of13 the13 form13 Y()13 =13 expression13 where13 13 is13 the13 output13 equation13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignored13 There13 can13 be13 a13 maximum13 of13 613 outputs13 13 They13 are13 referred13 to13 as13 Y(1)13 Y(2)13 etcExampleOutY(1)13 =13 X(2)V

Error

This13 block13 contains13 all13 the13 information13 Pmetrics13 requires13 for13 the13 structure13 of13 the13 error13 model13 13 In13 Pmetrics13 each13 observation13 is13 weighted13 by13 1error213 13 13 There13 are13 two13 choices13 for13 the13 error13 term

113 13 error13 =13 SD13 13 gamma213 13 error13 =13 (SD213 +13 lamda2)0513 (Note13 that13 lambda13 is13 only13 available13 in13 NPAG13 currently)

where13 SD13 is13 the13 standard13 deviation13 (SD)13 of13 each13 observation13 [obs]13 and13 gamma13 and13 lambda13 are13 terms13 to13 capture13 extra13 process13 noise13 related13 to13 the13 observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 SD13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 The13 13 values13 for13 the13 coefZicients13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13

Userrsquos13 Guide13 13 1313 13

coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly() 13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0In13 the13 multiplicative13 model13 13 gamma13 is13 a13 scalar13 on13 SD13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 Lambda13 is13 an13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 We13 tend13 to13 prefer13 lambda

To13 specify13 the13 model13 in13 this13 block13 the13 Zirst13 line13 needs13 to13 be13 either13 L=[number]13 or13 G=[number]13 for13 a13 lambda13 or13 gamma13 error13 model13 13 The13 [number]13 term13 is13 the13 starting13 value13 for13 lambda13 or13 gamma13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present13 13 For13 gamma13 good13 starting13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality13 13 If13 you13 include13 an13 exclamation13 point13 ()13 in13 the13 declaration13 then13 lambda13 or13 gamma13 will13 be13 Zixed13 and13 not13 estimated13 13 Note13 that13 you13 can13 only13 Zix13 lambda13 currently13 to13 zeroThe13 next13 line(s)13 contain13 the13 values13 for13 C013 C113 C213 and13 C313 separated13 by13 commas13 13 There13 should13 be13 one13 line13 of13 coefZicients13 for13 each13 output13 equation13 13 By13 default13 Pmetrics13 will13 use13 values13 for13 these13 coefZicients13 found13 in13 the13 data13 Zile13 13 If13 none13 are13 present13 or13 if13 the13 model13 declaration13 line13 contains13 an13 exclamation13 point13 ()13 the13 values13 here13 will13 be13 used

Example13 113 estimated13 lambda13 starting13 at13 0413 one13 output13 use13 data13 Zile13 coefZicients13 but13 if13 missing13 use13 010100ErrL=04010100

Example13 213 Zixed13 gamma13 of13 213 two13 outputs13 use13 data13 Zile13 coefZicients13 but13 if13 missing13 use13 01010013 for13 the13 Zirst13 output13 but13 use13 0313 0113 013 013 for13 output13 213 regardless13 of13 what13 is13 in13 the13 data13 ZileErrG=2010100030100

Extra

This13 block13 is13 for13 advanced13 Fortran13 programmers13 only13 13 Occasionally13 for13 very13 complex13 models13 additional13 Fortran13 subroutines13 are13 required13 13 They13 can13 be13 placed13 here13 13 The13 code13 must13 specify13 complete13 Fortran13 subroutines13 which13 can13 be13 called13 from13 other13 blocks13 with13 appropriate13 call13 functions13 13

Reserved13 Names

The13 following13 cannot13 be13 used13 as13 primary13 covariate13 or13 secondary13 variable13 names13 They13 can13 be13 used13 in13 equations13 however

Reserved13 Variable Func1on13 in13 Pmetricsndim internal

t time

Userrsquos13 Guide13 13 1413 13

x array13 of13 compartment13 amounts

xp array13 of13 Zirst13 derivative13 of13 compartment13 amounts

rpar internal

ipar internal

p array13 of13 primary13 parameters

r input13 rates

b input13 boluses

npl internal

numeqt output13 equation13 number

ndrug input13 number

nadd covariate13 number

rateiv intravenous13 input13 for13 inputs13 when13 DURgt013 in13 data13 Ziles

cv covariate13 values13 array

n number13 of13 compartments

nd internal

ni internal

nup internal

nuic internal

np number13 of13 primary13 parameters

nbcomp bolus13 compartment13 array

psym names13 of13 primary13 parameters

fa biovailability

tlag lag13 time

tin internal

tout internal

Complete13 Example

Here13 is13 a13 complete13 example13 of13 a13 model13 Zile13 as13 of13 Pmetrics13 version13 04013 and13 higher

Userrsquos13 Guide13 13 1513 13

NotesBy13 omitting13 a13 Diffeq13 block13 with13 ODEs13 Pmetrics13 understands13 that13 you13 are13 specifying13 the13 model13 to13 be13 solved13 algebraically13 In13 this13 case13 at13 least13 KE13 and13 V13 must13 be13 in13 the13 Primary13 or13 Secondary13 variables13 KA13 KCP13 and13 KPC13 are13 optional13 and13 specify13 absorption13 and13 transfer13 to13 and13 from13 the13 central13 to13 a13 peripheral13 compartment13 respectively

PriKE13 013 5V013 0113 100KA13 013 5Tlag113 013 3Cov13 wt

SecV13 =13 V0wt

LagTLAG(1)13 =13 Tlag1

OutY(1)13 =13 X(2)V

ErrL=04010100

Userrsquos13 Guide13 13 1613 13

Brief13 Fortran13 Tutorial

Much13 more13 detailed13 help13 is13 available13 from13 httpwwwcsmtuedu~sheneCOURSEScs201NOTESfortranhtml

Arithmetic Operator Meaning

+ addition

- subtraction

multiplication

division

exponentiation

Relational Operator Alternative Operator Meaning

lt LT less than

lt= LE less than or equal

gt GT greater than

gt= GE greater than or equal

== EQ equal

= NE not equal

Selective Execution Example

IF (logical-expression) one-statement IF (T gt= 100) CL = 10

IF (logical-expression) THEN statementsEND IF

IF (T gt= 100) THEN CL = 10 V = 10END IF

IF (logical-expression) THEN statements-1ELSE statements-2END IF

IF (T gt= 100) THEN CL = 10ELSE CL = CLEND IF

Userrsquos13 Guide13 13 1713 13

How to use R and PmetricsSeCng13 up13 a13 Pmetrics13 project

When13 beginning13 a13 new13 modeling13 project13 it13 is13 convenient13 to13 use13 the13 command13 PMtree(ldquoproject namerdquo)13 13 This13 command13 will13 set13 up13 a13 new13 directory13 in13 the13 current13 working13 directory13 named13 whatever13 you13 have13 included13 as13 the13 ldquoproject13 namerdquo13 13 For13 example13 a13 directory13 called13 ldquoDrugXrdquo13 will13 be13 created13 by13 PMtree(ldquoDrugXrdquo)13 13 Beneath13 this13 directory13 several13 subdirectories13 will13 be13 also13 created13 Rscript13 Runs13 Sim13 and13 src13 13 The13 Rscript13 subdirectory13 will13 contain13 a13 skeleton13 R13 script13 to13 begin13 Pmetrics13 runs13 in13 the13 new13 project13 13 The13 Runs13 subdirectory13 should13 contain13 all13 Ziles13 required13 for13 a13 run13 (described13 next)13 and13 it13 will13 also13 contain13 the13 resulting13 numerically13 ordered13 run13 directories13 created13 after13 each13 Pmetrics13 NPAG13 or13 IT2B13 run13 13 The13 Sim13 subdirectory13 can13 contain13 any13 Ziles13 related13 to13 simulations13 and13 the13 src13 subdirectory13 should13 contain13 original13 and13 manipulated13 source13 data13 Ziles13 13 Of13 course13 you13 are13 free13 to13 edit13 this13 directory13 tree13 structure13 as13 you13 please13 or13 make13 your13 own13 entirely

GeCng13 the13 required13 files13 to13 run13 Pmetrics

When13 you13 wish13 to13 execute13 a13 Pmetrics13 run13 you13 must13 ensure13 that13 appropriate13 Pmetrics13 model13 txt13 and13 data13 csv13 Ziles13 are13 in13 the13 working13 directory13 ie13 the13 Runs13 subdirectory13 of13 the13 project13 directory13 13 13 13 R13 can13 be13 used13 to13 help13 prepare13 the13 data13 csv13 Zile13 by13 importing13 and13 manipulating13 spreadsheets13 (eg13 readcsv())13 13 The13 Pmetrics13 function13 PMcheck()13 can13 be13 used13 to13 check13 a13 csv13 Zile13 or13 an13 R13 dataframe13 that13 is13 to13 be13 saved13 as13 a13 Pmetrics13 data13 13 csv13 Zile13 for13 errors13 13 13 13 13 13 It13 can13 also13 check13 a13 model13 Zile13 for13 errors13 in13 the13 context13 of13 a13 dataZile13 eg13 covariates13 that13 do13 not13 match13 13 PMfixMatrix()13 attempts13 to13 automatically13 rid13 data13 Ziles13 of13 errors13 13 The13 function13 PMwriteMatrix() 13 can13 be13 used13 to13 write13 the13 R13 data13 object13 in13 the13 correct13 format13 for13 use13 by13 IT2B13 NPAG13 or13 the13 Simulator13 13 You13 can13 also13 download13 sample13 data13 and13 scripts13 from13 the13 Pmetrics13 downloads13 section13 of13 our13 website13 once13 you13 sign13 in13 with13 your13 LAPK13 user13 email13 address13 and13 password13 13 Edit13 prior13 versions13 of13 model13 Ziles13 to13 make13 new13 model13 Ziles

Using13 scripts13 to13 control13 Pmetrics

As13 you13 will13 see13 in13 the13 skeleton13 R13 script13 made13 by13 PMtree() and13 placed13 in13 the13 Rscript13 subdirectory13 if13 this13 is13 a13 Zirst-shy‐time13 run13 the13 R13 commands13 to13 run13 IT2B13 or13 NPAG13 are13 as13 follows13 13 Recall13 that13 the13 ldquordquo13 character13 is13 a13 comment13 character

library(Pmetrics)Run 1 - add your run description heresetwd(ldquoworking directoryrdquo)NPrun() for NPAG or ITrun() for IT2B

The13 Zirst13 line13 will13 load13 the13 Pmetrics13 library13 of13 functions13 13 The13 second13 line13 sets13 the13 working13 directory13 to13 the13 speciZied13 path13 13 The13 third13 line13 generates13 the13 batch13 Zile13 to13 run13 NPAG13 or13 IT2B13 and13 saves13 it13 to13 the13 working13 directory13

NOTE13 13 On13 Mac13 systems13 the13 batch13 Zile13 will13 be13 automatically13 launched13 in13 a13 Terminal13 window13 13 On13 Windows13 systems13 the13 batch13 Zile13 must13 be13 launched13 manually13 by13 double13 clicking13 the13 np_runbat13 or13 it_runbat13 Zile13 in13 the13 working13 directory

ITrun() 13 and13 NPrun()13 both13 return13 the13 full13 path13 of13 the13 output13 directory13 to13 the13 clipboard13 13 By13 default13 runs13 are13 placed13 in13 folders13 numbered13 sequentially13 beginning13 with13 ldquo1rdquoNow13 the13 output13 of13 IT2B13 or13 NPAG13 needs13 to13 be13 loaded13 into13 R13 so13 the13 next13 command13 does13 this

NPload(run_number) or ITload(run_number)

Details13 of13 these13 commands13 and13 what13 is13 loaded13 are13 described13 in13 the13 R13 documentation13 (NPload 13 or13 ITload)13 and13 in13 the13 following13 section13 13 The13 run_number13 should13 be13 included13 within13 the13 parentheses13 to13 be13 appended13 to13 the13 names13

Userrsquos13 Guide13 13 1813 13

of13 loaded13 R13 objects13 allowing13 for13 comparison13 between13 runs13 eg13 NPload(1)13 13 Finally13 at13 this13 point13 other13 Pmetrics13 commands13 can13 be13 added13 to13 the13 script13 to13 process13 the13 data13 such13 as13 the13 following

plot(final1)plot(cycle1)plot(op1type=rdquopoprdquo) or plot(op1$pop1)plot(op1) default is to plot posterior predictions for output 1plot(op1type=rdquopoprdquoresid=T)

Of13 course13 the13 full13 power13 of13 R13 can13 be13 used13 in13 scripts13 to13 analyze13 data13 but13 these13 simple13 statements13 serve13 as13 examplesIf13 you13 do13 not13 use13 the13 PMtree() structure13 we13 suggest13 that13 the13 R13 script13 for13 a13 particular13 project13 be13 saved13 into13 a13 folder13 called13 ldquoRscriptrdquo13 or13 some13 other13 meaningful13 name13 in13 the13 working13 directory13 13 Folders13 are13 not13 be13 moved13 by13 the13 batch13 Zile13 13 Within13 the13 script13 number13 runs13 sequentially13 and13 use13 comments13 liberally13 to13 13 distinguish13 runs13 as13 shown13 below

library(Pmetrics)

Run 1 - Ka Kel V all subjectssetwd(ldquoworking directoryrdquo)NPrun() assumes model=rdquomodeltxtrdquo and data=rdquodatacsvrdquoNPload(1)

Remember13 in13 R13 that13 the13 command13 example(function) will13 provide13 examples13 for13 the13 speciZied13 function13 13 Most13 Pmetrics13 functions13 have13 examples

Pmetrics Data ObjectsAfter13 a13 successful13 IT2B13 or13 NPAG13 run13 an13 R13 dataZile13 is13 saved13 in13 the13 output13 subdirectory13 of13 the13 newly13 created13 numerically13 ordered13 folder13 in13 the13 working13 directory13 13 After13 IT2B13 this13 Zile13 is13 called13 ldquoIT2BoutRdatardquo13 and13 after13 NPAG13 it13 is13 called13 ldquoNPAGoutRdatardquo13 13 As13 mentioned13 in13 the13 previous13 section13 these13 data13 Ziles13 can13 be13 loaded13 by13 ensuring13 that13 the13 Runs13 folder13 is13 set13 as13 the13 working13 directory13 and13 then13 using13 the13 Pmetrics13 commands13 ITload(run_num)13 or13 NPload(run_num)

Both13 commands13 load13 their13 respective13 Rdata13 Ziles13 into13 R13 making13 the13 contained13 objects13 available13 for13 plotting13 and13 other13 analysisObjects13 loaded13 by13 ITload(run_num) and NPload(run_num)

Objects Variables Comments

op13 (class13 PMop13 list) $pop113 $post113 Population13 and13 posterior13 predictions13 for13 each13 output13 equation13 ie13 113 213

13 $id Subject13 identiZication

13 $time Observation13 time13 in13 relative13 decimal13 hours

13 $obs Observation

13 $pred Prediction13 based13 on13 median13 of13 population13 or13 posterior13 parameter13 value13 distributions

Userrsquos13 Guide13 13 1913 13

Objects Variables Comments

13 $block Dosing13 block13 usually13 113 unless13 data13 Zile13 contains13 EVID=413 dose13 reset13 events13 in13 which13 case13 each13 such13 reset13 within13 a13 given13 ID13 will13 increment13 the13 dosing13 block13 by13 113 for13 that13 ID

13 $obsSD Calculated13 standard13 deviation13 (error)13 of13 the13 observation13 based13 on13 the13 assay13 error13 polynomial

13 $d Difference13 between13 pred13 and13 obs

13 $ds Squared13 difference13 between13 pred13 and13 obs

13 $wd $d13 weighted13 by13 the13 $obsSD

13 $wds $ds13 weighted13 by13 the13 $obsSD

Zinal13 (class13 PMZinal13 list) $popPoints (NPAG13 only)13 Dataframe13 of13 the13 Zinal13 cycle13 joint13 population13 density13 of13 grid13 points13 with13 column13 names13 equal13 to13 the13 name13 of13 each13 random13 parameter13 plus13 $prob13 for13 the13 associated13 probability13 of13 that13 point13

$popMean The13 Zinal13 cycle13 mean13 for13 each13 random13 parameter13 distribution

$popSD The13 Zinal13 cycle13 standard13 deviation13 for13 each13 random13 parameter13 distribution

$popCV The13 Zinal13 cycle13 coefZicient13 of13 variation13 for13 each13 random13 parameter13 distribution

$popVar The13 Zinal13 cycle13 variance13 for13 each13 random13 parameter13 distribution

$popCov The13 Zinal13 cycle13 covariance13 matrix13 for13 each13 random13 parameter13 distribution

$popCor The13 Zinal13 cycle13 correlation13 matrix13 for13 each13 random13 parameter13 distribution

$popMedian The13 Zinal13 cycle13 median13 for13 each13 random13 parameter13 distribution

$gridpts (NPAG13 only)13 The13 initial13 number13 of13 support13 points

$ab Matrix13 of13 boundaries13 for13 random13 parameter13 values13 13 For13 NPAG13 this13 is13 speciZied13 by13 the13 user13 prior13 to13 the13 run13 for13 IT2B13 it13 is13 calculated13 as13 a13 user13 speciZied13 multiple13 of13 the13 SD13 for13 the13 parameter13 value13 distribution

Userrsquos13 Guide13 13 2013 13

Objects Variables Comments

cycle13 (class13 PMcycle13 list) $names Vector13 of13 names13 of13 the13 random13 parameters

$ll Matrix13 of13 cycle13 number13 and13 -shy‐2Log-shy‐likelihood13 at13 each13 cycle

$gamlam A13 matrix13 of13 cycle13 number13 and13 gamma13 or13 lambda13 at13 each13 cycle13 (see13 item13 1613 under13 NPAG13 Runs13 below13 for13 a13 discussion13 of13 gamma13 and13 lambda)

$mean A13 matrix13 of13 cycle13 number13 and13 the13 mean13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 mean

$sd A13 matrix13 of13 cycle13 number13 and13 the13 standard13 deviation13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$median A13 matrix13 of13 cycle13 number13 and13 the13 median13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$aic A13 matrix13 of13 cycle13 number13 and13 Akaike13 Information13 Criterion13 at13 each13 cycle

$bic A13 matrix13 of13 cycle13 number13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle

cov13 (class13 PMcov13 dataframe)

$id Subject13 identiZication

$time Time13 for13 each13 covariate13 entry

covariates Covariate13 values13 for13 each13 subject13 at13 each13 time13 extracted13 from13 the13 raw13 data13 Zile

parameters Mean13 median13 or13 mode13 of13 Bayesian13 posterior13 distribution13 for13 each13 random13 parameter13 in13 the13 model13 13 Mode13 summaries13 are13 available13 for13 NPAG13 output13 only13 and13 the13 default13 is13 median13 13 Values13 are13 recycled13 for13 each13 row13 within13 a13 given13 subject13 with13 the13 number13 of13 rows13 driven13 by13 the13 number13 of13 covariate13 entries

Userrsquos13 Guide13 13 2113 13

Objects Variables Comments

pop13 (class13 PMpop13 dataframe)

post13 (class13 PMpost13 dataframe)

NPAG13 only

$id Subject13 identiZication

$pred113 Population13 prior13 (PMpop)13 or13 Bayesian13 posterior13 (PMpost)13 predictions13 for13 each13 output13 equation13 based13 on13 mean13 median13 and13 mode13 as13 speciZied13 by13 the13 user13 and13 with13 frequency13 also13 speciZied13 by13 the13 user13 in13 the13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

$block Same13 as13 for13 PMop13 objects13 above

NPdata13 (class13 NPAG13 list)13 ITdata13 (class13 IT2B13 list

Raw13 data13 used13 to13 make13 the13 above13 objects13 13 Please13 use13 NPparse13 or13 ITparse13 in13 R13 for13 discussion13 of13 the13 data13 contained13 in13 these13 objects

Since13 R13 is13 an13 object13 oriented13 language13 to13 access13 the13 observations13 in13 a13 PMop13 object13 for13 example13 use13 the13 following13 syntax13 op$post1$obsNote13 that13 you13 will13 place13 an13 integer13 within13 the13 parentheses13 of13 the13 loading13 functions13 eg13 NPload(1)13 which13 will13 sufZix13 all13 the13 above13 objects13 with13 that13 integer13 eg13 op113 Zinal113 NPdata113 13 This13 allows13 several13 models13 to13 be13 loaded13 into13 R13 simultaneously13 each13 with13 a13 unique13 sufZix13 and13 which13 can13 be13 compared13 with13 the13 PMcompare()13 command13 (see13 Model13 Diagnostics13 below)

Making New Pmetrics ObjectsOnce13 you13 have13 loaded13 the13 raw13 (NPdata13 or13 ITdata)13 or13 processed13 (op13 Uinal13 cycle13 pop13 post)13 data13 objects13 described13 above13 with13 NPload(run_num)13 or13 ITload(run_num)13 should13 you13 wish13 to13 remake13 the13 processed13 objects13 with13 parameters13 other13 than13 the13 defaults13 you13 can13 easily13 do13 so13 with13 the13 make 13 family13 of13 commands13 13 For13 example13 the13 default13 for13 PMop13 observed13 vs13 predicted13 objects13 is13 to13 use13 the13 prediction13 based13 on13 the13 median13 of13 the13 population13 or13 posterior13 distribution13 13 If13 you13 wish13 to13 use13 the13 mean13 of13 the13 distribution13 remake13 the13 PMop13 object13 using makeOP()13 13 If13 you13 wish13 to13 see13 all13 the13 cycle13 information13 in13 a13 PMcycle13 object13 not13 omitting13 the13 Zirst13 1013 of13 cycles13 by13 default13 remake13 it13 using13 makeCycle()13 13

For13 all13 of13 the13 following13 commands13 the13 data13 input13 is13 either13 NPdata13 or13 ITdata13 with13 additional13 function13 arguments13 speciZic13 to13 each13 command13 13 Accessing13 the13 help13 for13 each13 function13 in13 R13 will13 provide13 further13 details13 on13 the13 arguments13 defaults13 and13 output13 of13 each13 command

Userrsquos13 Guide13 13 2213 13

Command Description R13 help

makeAUC Make13 a13 dataframe13 of13 class13 PMauc13 containing13 subject13 ID13 and13 AUC13 from13 a13 variety13 of13 inputs13 including13 objects13 of13 PMop13 PMsim13 or13 a13 suitable13 dataframe

makeAUC

makeCov Generate13 a13 dataframe13 of13 class13 PMcov13 with13 subject-shy‐speciZic13 covariates13 extracted13 from13 the13 data13 csv13 Zile13 This13 object13 can13 be13 plotted13 and13 used13 to13 test13 for13 covariates13 which13 are13 signiZicantly13 associated13 with13 model13 parameters13 13

makeCov

makeCycle Create13 a13 PMcycle13 object13 described13 in13 the13 previous13 section makeCycle

makeFinal Create13 a13 PMZinal13 object13 described13 in13 the13 previous13 section makeFinal

makeOP Create13 a13 PMop13 object13 described13 in13 the13 previous13 section makeOP

makeNCA Create13 a13 dataframe13 (class13 PMnca)13 with13 the13 output13 of13 a13 non-shy‐compartmental13 analysis13 using13 PMpost13 and13 NPAG13 data13 objects13 as13 input13 13 The13 PMnca13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull auc13 Area13 under13 the13 time-shy‐observation13 curve13 using13 the13

trapezoidal13 approximation13 from13 time13 013 until13 the13 second13 dose13 or13 if13 only13 one13 dose13 until13 the13 last13 observation

bull aumc13 Area13 under13 the13 Zirst13 moment13 curvebull k13 Slope13 by13 least-shy‐squares13 linear13 regression13 of13 the13 Zinal13

613 log-shy‐transformed13 observations13 vs13 timebull auclast13 Area13 under13 the13 curve13 from13 the13 time13 of13 the13

last13 observation13 to13 inZinity13 calculated13 as13 [Final13 obs]kbull aumclast13 Area13 under13 the13 Zirst13 moment13 curve13 from13

the13 time13 of13 the13 last13 observation13 to13 inZinitybull aucinf13 Area13 under13 the13 curve13 from13 time13 013 to13 inZinity13

caluculated13 as13 auc13 +13 auclastbull aumcinf13 Area13 under13 the13 Zirst13 moment13 curve13 from13

time13 013 to13 inZinitybull mrt13 Mean13 residence13 time13 calculated13 as13 1kbull cmax13 Maximum13 predicted13 concentration13 after13 the13

Zirst13 dosebull tmax13 Time13 to13 cmaxbull cl13 Clearance13 calculated13 as13 doseaucinfbull vdss13 Volume13 of13 distribution13 at13 steady13 state13

calculated13 as13 clmrtbull thalf13 Half13 life13 of13 elimination13 calculated13 as13 ln(2)kbull dose13 First13 dose13 amount13 for13 each13 subject

makeNCA

Userrsquos13 Guide13 13 2313 13

Command Description R13 help

makeErrorPoly This13 function13 plots13 Zirst13 second13 and13 third13 order13 polynomial13 functions13 Zitted13 to13 pairs13 of13 observations13 and13 associated13 standard13 deviations13 for13 a13 given13 output13 assay13 In13 this13 way13 the13 standard13 deviation13 associated13 with13 any13 observation13 may13 be13 calculated13 and13 used13 to13 appropriately13 weight13 that13 observation13 in13 the13 model13 building13 process13 Observations13 are13 weighted13 by13 the13 reciprocal13 of13 the13 variance13 or13 squared13 standard13 deviation13 13 Output13 of13 the13 function13 is13 a13 plot13 of13 the13 measured13 observations13 and13 Zitted13 polynomial13 curves13 and13 a13 list13 with13 the13 Zirst13 second13 and13 third13 order13 coefZicients

makeErrorPoly

makePTA This13 function13 performs13 a13 Probability13 of13 Target13 Attainment13 analysis13 for13 a13 set13 of13 simulated13 doses13 and13 time-shy‐concentration13 proZiles13 13 Targets13 (eg13 Minimum13 Inhibitory13 Concentrations)13 the13 type13 of13 target13 attainment13 (ie13 time13 above13 target13 Cmaxtarget13 13 AUCtarget13 Cmintarget13 or13 Cxtarget13 where13 x13 is13 any13 time13 point)13 and13 the13 success13 threshold13 (eg13 time13 gt13 0713 or13 Cmaxtarget13 gt13 10)13 can13 all13 be13 speciZied13 13 Output13 is13 a13 list13 (class13 PMpta)13 with13 two13 objectsbull Results13 a13 413 dimensional13 array13 with13 dimension13 size13 of13

[number13 of13 doses13 number13 of13 targets13 number13 of13 simulated13 proZiles13 1]13 which13 gives13 the13 target13 attainment13 (eg13 Cmaxtarget)13 for13 each13 dose13 target13 and13 proZile

bull Outcome13 For13 each13 dose13 and13 target13 a13 summary13 of13 the13 target13 attainment13 for13 all13 the13 proZiles13 including13 mean13 standard13 deviation13 and13 proportion13 above13 the13 success13 threshold

PMpta13 objects13 can13 be13 summarized13 with13 summary(x)13 and13 plotted13 with13 plot(x)13

makePTA

Userrsquos13 Guide13 13 2413 13

Command Description R13 help

makePopmakePost(NPAG13 only)

These13 functions13 create13 dataframes13 of13 class13 PMpop13 and13 PMpost13 respectively13 13 The13 PMpop13 or13 PMpost13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull time13 Times13 for13 predicted13 concentrations13 13 These13

times13 are13 not13 necessarily13 at13 observed13 times13 but13 at13 a13 frequency13 speciZied13 in13 the13 NPAG13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

bull pred113 Predictions13 for13 output13 113 13 For13 PMpop13 objects13 predictions13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 population13 prior13 distribution13 13 For13 PMpost13 objects13 they13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject

bull pred213 pred313 etc13 If13 additional13 outputs13 exist13 they13 will13 each13 be13 columns13 in13 the13 dataframe13 just13 as13 for13 pred113 13

makePopmakePost

NPAG RunsIn13 the13 past13 users13 had13 to13 run13 NPAG13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 NPrun()13 13 However13 if13 NPrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable

1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 NPAG13 creates13 a13 temporary13 instruction13 Zile13 in13 case13 something13 happens13 so13 that13 instructions13 entered13 to13 date13 can13

be13 recovered13 13 Accept13 the13 default13 by13 choosing13 113 13 You13 can13 save13 with13 a13 meaningful13 Zilename13 later13 13 If13 it13 already13 exists13 you13 will13 be13 asked13 if13 you13 wish13 to13 overwrite13 the13 Zile13 which13 is13 usually13 the13 thing13 to13 do

Userrsquos13 Guide13 13 2513 13

8 If13 you13 have13 previously13 run13 IT2B13 you13 can13 automatically13 import13 the13 suggested13 parameter13 ranges13 13 Choose13 113 to13 do13 this13 and13 013 to13 run13 NPAG13 without13 a13 previous13 IT2B13 run81 If13 you13 choose13 option13 113 you13 must13 specify13 the13 name13 of13 a13 FROMxxxx13 Zile13 typically13 FROM000113 that13 you13 can13

Zind13 in13 an13 output13 directory13 after13 a13 successful13 IT2B13 run13 13 Note13 that13 the13 program13 will13 then13 assume13 that13 you13 are13 using13 the13 same13 wrk13 Ziles13 that13 IT2B13 made13 from13 your13 data13 csv13 Zile13 13 It13 is13 strongly13 recommended13 to13 override13 this13 and13 specify13 a13 data13 csv13 Zile13 13 At13 this13 point13 you13 will13 jump13 to13 1013 below13 and13 continue13 on13 however13 your13 answers13 will13 often13 be13 supplied13 by13 the13 instructions13 contained13 in13 the13 FROMxxxx13 Zile13 and13 you13 need13 merely13 conZirm13 them

9 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13 have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 NPrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis91 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13

for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

10 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 NPAG13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

11 Enter13 the13 name13 of13 your13 csv13 Zile13 now12 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile13 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset131 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects132 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry14 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset15 Enter13 the13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo 13 followed13 by13

return16 Select13 how13 you13 would13 like13 to13 model13 assay13 (observation)13 error13 for13 each13 output13 equation13 13 You13 have13 four13 choices13 13

In13 all13 four13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0161 Error13 model13 113 (SD)13 13 Choose13 this13 option13 if13 you13 have13 already13 run13 IT2B13 and13 multiplied13 your13 assay13 error13

polynomial13 by13 gamma13 (see13 next13 option13 for13 a13 description13 of13 gamma)162 Error13 model13 213 (SD13 13 gamma)13 13 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13

observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 If13 you13 choose13 this13 option13 you13 then13 can13 specify13 the13 starting13 value13 of13 gamma13 13 Good13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality

163 Error13 model13 313 (SD213 +13 lamda2)0513 13 Lamda13 is13 an13 alternative13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present

Userrsquos13 Guide13 13 2613 13

164 Error13 model13 413 SD13 =13 gamma13 13 This13 model13 is13 rarely13 used13 and13 is13 equivalent13 to13 specifying13 a13 model13 with13 C013 only13 ie13 a13 constant13 error13 regardless13 of13 concentration

17 Once13 you13 select13 the13 assay13 error13 model13 for13 each13 output13 equation13 you13 are13 then13 offered13 four13 more13 options13 on13 which13 assay13 error13 polynomial13 coefZicients13 to13 use13 13 Choices13 113 and13 213 are13 the13 most13 commonly13 used171 Choice13 113 The13 default13 13 Use13 coefZicients13 in13 the13 subject13 record13 (C013 C113 C213 C313 in13 the13 data13 csv13 Zile)13 and13 if13

missing13 use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 (item13 1813 below)172 Choice13 213 Use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 for13 all13 subjects13 regardless13 of13 what13 is13 in13 the13

data13 csv13 Zile173 Choice13 313 13 To13 multiply13 data13 csv13 values13 and13 default13 entered13 values13 by13 a13 Zixed13 gamma13 and13 use13 them13 13 174 Choice13 013 Specify13 coefZicients13 on13 a13 subject13 by13 subject13 basis13 either13 those13 in13 the13 data13 csv13 Zile13 already13 the13

default13 values13 entered13 into13 the13 program13 or13 other13 values18 For13 each13 output13 equation13 after13 you13 have13 selected13 the13 option13 in13 item13 1713 you13 will13 be13 prompted13 to13 supply13 the13

required13 information13 including13 the13 general13 default13 values13 for13 missing13 or13 overridden13 values13 in13 the13 data13 csv13 Zile19 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13

usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13

20 Enter13 the13 grid13 point13 index13 13 This13 number13 corresponds13 to13 the13 number13 of13 grid13 (support)13 points13 which13 will13 initially13 Zill13 the13 model13 parameter13 space13 13 The13 larger13 the13 number13 of13 random13 parameters13 to13 be13 estimated13 the13 more13 points13 are13 required13 13 The13 program13 will13 make13 a13 suggestion13 based13 on13 the13 number13 of13 random13 parameters13 in13 the13 model13 13 The13 more13 you13 choose13 the13 slower13 the13 run13 will13 be13 but13 results13 may13 improve13 13 It13 is13 reasonable13 to13 choose13 fewer13 points13 early13 in13 model13 exploration13 and13 increase13 in13 later13 phases13 or13 if13 poor13 model13 Zits13 or13 lack13 of13 convergence13 are13 noted13 The13 choices13 are13 113 to13 713 corresponding13 respectively13 to13 212913 500313 1000713 2001113 4000913 and13 8002113 points13 13 If13 you13 choose13 713 you13 then13 have13 an13 additional13 choice13 to13 select13 one13 or13 more13 multiples13 of13 8002113 points

21 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 013 or13 greater13 13 If13 you13 enter13 an13 integer13 greater13 than13 013 the13 engine13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13 If13 you13 enter13 013 this13 is13 the13 way13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 an13 independent13 data13 set13 and13 a13 non-shy‐uniform13 prior13 must13 be13 speciZied13 (see13 3013 below)13 13 This13 means13 that13 the13 engine13 will13 only13 calculate13 the13 individual13 Bayesian13 posteriors13 for13 the13 new13 subjects13 using13 the13 population13 joint13 density13 from13 a13 previous13 run13 as13 a13 Bayesian13 prior

22 Information13 about13 convergence13 criteria13 13 Answer13 113 or13 some13 other13 keystroke13 plus13 Return13 to13 acknowledge13 that13 you13 have13 read13 it

23 In13 order13 to13 predict13 concentrations13 from13 a13 non-shy‐parametric13 distribution13 you13 have13 the13 option13 to13 use13 the13 1)13 mean13 2)13 median13 or13 3)13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject13 13 We13 typically13 use13 the13 median13 Zirst13 and13 then13 the13 mean13 in13 a13 separate13 run13 and13 compare13 the13 differences13 13

24 Select13 the13 time13 interval13 to13 generate13 predicted13 concentrations13 13 Additionally13 there13 will13 also13 be13 predictions13 made13 at13 the13 time13 of13 each13 observation13 13 In13 general13 for13 most13 models13 predictions13 every13 1213 minutes13 provide13 sufZicient13 granularity13 13 Smaller13 values13 can13 result13 in13 very13 large13 Ziles13 for13 big13 populations

25 Select13 the13 default13 MIC13 to13 be13 used13 for13 AUCMIC13 ratio13 reporting13 13 This13 should13 generally13 be13 set13 to13 the13 default13 of13 113 by13 choosing13 113 13 You13 can13 always13 extract13 the13 AUC13 later13 and13 divide13 it13 by13 any13 MIC13 you13 choose

26 Enter13 the13 value13 in13 hours13 that13 you13 want13 for13 calculations13 of13 AUCs13 from13 predicted13 concentration13 proZiles13 13 The13 default13 is13 2413 hours13 which13 you13 can13 accept13 by13 entering13 113 or13 013 if13 you13 want13 to13 specify13 a13 different13 interval

27 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

28 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

Userrsquos13 Guide13 13 2713 13

29 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

30 For13 the13 prior13 density13 choose13 113 if13 it13 is13 to13 be13 uniform13 13 This13 means13 that13 the13 initial13 grid13 points13 will13 be13 evenly13 distributed13 with13 equal13 probability13 within13 the13 boundaries13 speciZied13 (in13 1513 above)13 13 If13 you13 choose13 013 you13 will13 be13 prompted13 for13 the13 name13 of13 a13 Zile13 that13 contains13 the13 prior13 density13 13 This13 will13 be13 DEN000113 unless13 you13 have13 changed13 its13 name13 13 It13 will13 be13 found13 in13 the13 output13 directory13 of13 a13 prior13 NPAG13 run13 13 The13 model13 used13 to13 generate13 the13 DEN000113 Zile13 must13 be13 exactly13 the13 same13 as13 the13 current13 model13 including13 parameter13 boundaries13 13 However13 this13 option13 is13 useful13 to13 specify13 a13 non-shy‐uniform13 density13 for13 two13 reasons13 13 The13 Zirst13 is13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 a13 new13 set13 of13 subjects13 13 Do13 this13 in13 combination13 with13 setting13 the13 number13 of13 cycles13 to13 013 (see13 2113 above)13 13 The13 second13 use13 for13 a13 non-shy‐uniform13 prior13 is13 to13 continue13 a13 previous13 run13 13 For13 example13 if13 you13 only13 set13 the13 number13 of13 cycles13 to13 5013 to13 get13 a13 rough13 idea13 of13 model13 Zit13 you13 may13 continue13 where13 you13 left13 off13 by13 specifying13 the13 DEN000113 Zile13 from13 the13 50-shy‐cycle13 run13 and13 continuing13 with13 as13 many13 additional13 cycles13 as13 you13 specify13 in13 item13 2113 13 So13 in13 the13 example13 if13 you13 specify13 10013 cycles13 in13 2113 the13 total13 number13 of13 cycles13 will13 be13 5013 +13 10013 =13 150

31 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 NPrun(instr=ldquoyourfilerdquo)13 option13 and13 including13 ldquoyourZilerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

32 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 NPAG13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 NPAG13 analysis

33 The13 NPAG13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

IT2B RunsIn13 the13 past13 users13 had13 to13 run13 IT2B13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 ITrun()13 13 However13 if13 ITrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13

have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 ITrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis

Userrsquos13 Guide13 13 2813 13

71 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13 for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

8 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 IT2B13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

9 Enter13 the13 name13 of13 your13 csv13 Zile13 now10 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile11 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset111 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects112 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry12 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset13 Enter13 the13 initial13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo13 followed13

by13 return14 The13 estimated13 mean13 for13 each13 parameter13 value13 distribution13 during13 the13 Zirst13 iteration13 will13 be13 the13 median13 of13 the13

range13 speciZied13 in13 1313 13 You13 now13 have13 the13 option13 to13 specify13 the13 standard13 deviation13 for13 the13 parameter13 value13 distribution13 which13 by13 default13 is13 half13 of13 the13 range13 in13 1313 13 Choose13 113 to13 accept13 this13 (the13 usual13 answer)13 or13 013 to13 change13 it13 to13 something13 else13 expressed13 as13 a13 multiple13 of13 the13 range

15 In13 IT2B13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 You13 can13 now13 choose13 113 if13 every13 subject13 has13 the13 same13 coefZicients13 or13 013 to13 use13 a13 unique13 set13 of13 coefZicients13 for13 each13 subject13 13 The13 Zirst13 case13 is13 the13 more13 usual13 when13 all13 13 samples13 from13 all13 subjects13 are13 analyzed13 in13 the13 same13 lab13 13 If13 13 samples13 are13 analyzed13 in13 different13 labs13 and13 you13 have13 the13 assay13 data13 from13 each13 lab13 then13 you13 would13 enter13 013 13 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 (see13 151313 below)13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0151 If13 you13 choose13 113 (one13 set13 of13 coefZicients13 for13 all13 subjects)13 you13 will13 then13 be13 presented13 with13 313 additional13

choices1511 Choice13 113 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13 observation13

including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 and13 to13 Zix13 gamma13 to13 1

1512 Choice13 213 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 but13 to13 estimate13 gamma13 based13 on13 the13 data13 13 This13 is13 the13 usual13 option

1513 Choice13 313 Choose13 this13 option13 if13 you13 wish13 to13 estimate13 the13 assay13 error13 coefZicients13 based13 on13 your13 data13 for13 use13 in13 future13 runs13 13 Although13 you13 can13 access13 this13 option13 by13 using13 either13 ITrun()13 or13 ERRrun()13 in13 R13 the13 instruction13 Ziles13 that13 you13 save13 and13 the13 generated13 output13 Ziles13 will13 be13 different13 13 Therefore13 we13 recommend13 that13 if13 you13 intend13 to13 choose13 this13 option13 use13 ERRrun()13 in13 R13 which13 will13 generate13 an13 ASS000113 Zile13 that13 contains13 the13 estimates13 for13 C013 C113 C213 and13 C313 13 You13 can13 then13 include13 this13 Zile13 in13 the13 working13 directory13 (along13 with13 a13 model13 txt13 Zile13 and13 a13 data13 csv13 Zile)13 to13 do13 an13 IT2B13 run13 supplying13 the13 Zile13 name13 in13 16113 below

Userrsquos13 Guide13 13 2913 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

where13 IC13 will13 be13 piece-shy‐wise13 constant13 and13 the13 other13 two13 will13 be13 linearly13 interpolated13 for13 missing13 values

Secondary13 variables

Secondary13 variables13 are13 those13 that13 are13 deZined13 by13 equations13 that13 are13 combinations13 of13 primary13 covariates13 and13 other13 secondary13 variables13 If13 using13 other13 secondary13 variables13 deZine13 them13 Zirst13 within13 this13 block13 Equation13 syntax13 must13 be13 Fortran13 It13 is13 permissible13 to13 have13 conditional13 statements13 but13 because13 expressions13 in13 this13 block13 are13 translated13 into13 variable13 declarations13 in13 Fortran13 expressions13 other13 than13 of13 the13 form13 X13 =13 function(Y)13 must13 be13 preZixed13 by13 a13 +13 and13 contain13 only13 variables13 which13 have13 been13 previously13 deZined13 in13 the13 Primary13 Covariate13 or13 Secondary13 blocksExampleSecCL13 =13 Ke13 13 V13 13 wt075+IF(cyp13 GT13 1)13 CL13 =13 CL13 13 cyp

Bolus13 inputs

By13 default13 inputs13 with13 DUR13 (duration)13 of13 013 in13 the13 data13 csv13 Zile13 are13 delivered13 instantaneously13 to13 the13 model13 compartment13 equal13 to13 the13 input13 number13 ie13 input13 113 goes13 to13 compartment13 113 input13 213 goes13 to13 compartment13 213 etc13 This13 can13 be13 overridden13 with13 NBOLUS(input13 number)13 =13 compartment13 numberExampleBolNBCOMP(1)13 =13 2

Ini1al13 condi1ons

By13 default13 all13 model13 compartments13 have13 zero13 amounts13 at13 time13 013 This13 can13 be13 changed13 by13 specifying13 the13 compartment13 amount13 as13 X()13 =13 expression13 where13 13 is13 the13 compartment13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignoredExampleIniX(2)13 =13 ICV13 (ie13 IC13 is13 a13 covariate13 with13 the13 measured13 trough13 concentration13 prior13 to13 an13 observed13 dose)X(3)13 =13 IC313 (ie13 IC313 is13 a13 Zitted13 amount13 in13 this13 unobserved13 compartment)In13 the13 Zirst13 case13 the13 initial13 condition13 for13 compartment13 213 becomes13 the13 value13 of13 the13 IC13 covariate13 (deZined13 in13 Covariate13 block)13 multiplied13 by13 the13 current13 estimate13 of13 V13 during13 each13 iteration13 13 This13 is13 useful13 when13 a13 subject13 has13 been13 taking13 a13 drug13 as13 an13 outpatient13 and13 comes13 in13 to13 the13 lab13 for13 PK13 sampling13 with13 measurement13 of13 a13 concentration13 immediately13 prior13 to13 a13 witnessed13 dose13 which13 is13 in13 turn13 followed13 by13 more13 sampling13 13 In13 this13 case13 IC13 or13 any13 other13 covariate13 can13 be13 set13 to13 the13 initial13 measured13 concentration13 and13 if13 V13 is13 the13 volume13 of13 compartment13 213 the13 initial13 condition13 (amount)13 in13 compartment13 213 will13 now13 be13 set13 to13 the13 measured13 concentration13 of13 drug13 multiplied13 by13 the13 estimated13 volume13 for13 each13 iteration13 until13 convergenceIn13 the13 second13 case13 the13 initial13 condition13 for13 compartment13 313 becomes13 another13 variable13 IC313 deZined13 in13 the13 Primary13 block13 to13 Zit13 in13 the13 model13 given13 the13 observed13 data

F13 (bioavailability)

Specify13 the13 bioavailability13 term13 if13 present13 Use13 the13 form13 FA()13 =13 expression13 where13 13 is13 the13 input13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignored

Userrsquos13 Guide13 13 1213 13

ExampleFFA(1)13 =13 FA1

Lag13 1me

Specify13 the13 lag13 term13 if13 present13 which13 is13 the13 delay13 after13 an13 absorbed13 dose13 before13 observed13 concentrations13 Use13 the13 form13 TLAG()13 =13 expression13 where13 13 is13 the13 input13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignoredExampleLagTLAG(1)13 =13 Tlag1

Differen1al13 equa1ons

Specify13 a13 model13 in13 terms13 of13 ordinary13 differential13 equations13 in13 Fortran13 format13 XP()13 is13 the13 notation13 for13 dX()dt13 where13 13 is13 the13 compartment13 number13 X()13 is13 the13 amount13 in13 the13 compartment13 There13 can13 be13 a13 maximum13 of13 2013 such13 equationsExampleDifXP(1)13 =13 -shy‐KAX(1)XP(2)13 =13 RATEIV(1)13 +13 KAX(1)13 -shy‐13 (KE+KCP)X(2)13 +13 KPCX(3)XP(3)13 =13 KCPX(2)13 -shy‐13 KPCX(3)RATEIV(1)13 is13 the13 notation13 to13 indicate13 an13 infusion13 of13 input13 113 (typically13 drug13 1)13 13 The13 duration13 of13 the13 infusion13 and13 total13 dose13 is13 deZined13 in13 the13 data13 csv13 Zile13 Up13 to13 713 inputs13 are13 currently13 allowed13 13 These13 can13 be13 used13 in13 the13 model13 Zile13 as13 RATEIV(1)13 RATEIV(2)13 etc13 13 The13 compartments13 for13 13 receiving13 the13 inputs13 of13 oral13 (bolus)13 doses13 are13 deZined13 in13 the13 Bolus13 block

Outputs

Output13 equations13 in13 Fortran13 format13 Outputs13 are13 of13 the13 form13 Y()13 =13 expression13 where13 13 is13 the13 output13 equation13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignored13 There13 can13 be13 a13 maximum13 of13 613 outputs13 13 They13 are13 referred13 to13 as13 Y(1)13 Y(2)13 etcExampleOutY(1)13 =13 X(2)V

Error

This13 block13 contains13 all13 the13 information13 Pmetrics13 requires13 for13 the13 structure13 of13 the13 error13 model13 13 In13 Pmetrics13 each13 observation13 is13 weighted13 by13 1error213 13 13 There13 are13 two13 choices13 for13 the13 error13 term

113 13 error13 =13 SD13 13 gamma213 13 error13 =13 (SD213 +13 lamda2)0513 (Note13 that13 lambda13 is13 only13 available13 in13 NPAG13 currently)

where13 SD13 is13 the13 standard13 deviation13 (SD)13 of13 each13 observation13 [obs]13 and13 gamma13 and13 lambda13 are13 terms13 to13 capture13 extra13 process13 noise13 related13 to13 the13 observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 SD13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 The13 13 values13 for13 the13 coefZicients13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13

Userrsquos13 Guide13 13 1313 13

coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly() 13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0In13 the13 multiplicative13 model13 13 gamma13 is13 a13 scalar13 on13 SD13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 Lambda13 is13 an13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 We13 tend13 to13 prefer13 lambda

To13 specify13 the13 model13 in13 this13 block13 the13 Zirst13 line13 needs13 to13 be13 either13 L=[number]13 or13 G=[number]13 for13 a13 lambda13 or13 gamma13 error13 model13 13 The13 [number]13 term13 is13 the13 starting13 value13 for13 lambda13 or13 gamma13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present13 13 For13 gamma13 good13 starting13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality13 13 If13 you13 include13 an13 exclamation13 point13 ()13 in13 the13 declaration13 then13 lambda13 or13 gamma13 will13 be13 Zixed13 and13 not13 estimated13 13 Note13 that13 you13 can13 only13 Zix13 lambda13 currently13 to13 zeroThe13 next13 line(s)13 contain13 the13 values13 for13 C013 C113 C213 and13 C313 separated13 by13 commas13 13 There13 should13 be13 one13 line13 of13 coefZicients13 for13 each13 output13 equation13 13 By13 default13 Pmetrics13 will13 use13 values13 for13 these13 coefZicients13 found13 in13 the13 data13 Zile13 13 If13 none13 are13 present13 or13 if13 the13 model13 declaration13 line13 contains13 an13 exclamation13 point13 ()13 the13 values13 here13 will13 be13 used

Example13 113 estimated13 lambda13 starting13 at13 0413 one13 output13 use13 data13 Zile13 coefZicients13 but13 if13 missing13 use13 010100ErrL=04010100

Example13 213 Zixed13 gamma13 of13 213 two13 outputs13 use13 data13 Zile13 coefZicients13 but13 if13 missing13 use13 01010013 for13 the13 Zirst13 output13 but13 use13 0313 0113 013 013 for13 output13 213 regardless13 of13 what13 is13 in13 the13 data13 ZileErrG=2010100030100

Extra

This13 block13 is13 for13 advanced13 Fortran13 programmers13 only13 13 Occasionally13 for13 very13 complex13 models13 additional13 Fortran13 subroutines13 are13 required13 13 They13 can13 be13 placed13 here13 13 The13 code13 must13 specify13 complete13 Fortran13 subroutines13 which13 can13 be13 called13 from13 other13 blocks13 with13 appropriate13 call13 functions13 13

Reserved13 Names

The13 following13 cannot13 be13 used13 as13 primary13 covariate13 or13 secondary13 variable13 names13 They13 can13 be13 used13 in13 equations13 however

Reserved13 Variable Func1on13 in13 Pmetricsndim internal

t time

Userrsquos13 Guide13 13 1413 13

x array13 of13 compartment13 amounts

xp array13 of13 Zirst13 derivative13 of13 compartment13 amounts

rpar internal

ipar internal

p array13 of13 primary13 parameters

r input13 rates

b input13 boluses

npl internal

numeqt output13 equation13 number

ndrug input13 number

nadd covariate13 number

rateiv intravenous13 input13 for13 inputs13 when13 DURgt013 in13 data13 Ziles

cv covariate13 values13 array

n number13 of13 compartments

nd internal

ni internal

nup internal

nuic internal

np number13 of13 primary13 parameters

nbcomp bolus13 compartment13 array

psym names13 of13 primary13 parameters

fa biovailability

tlag lag13 time

tin internal

tout internal

Complete13 Example

Here13 is13 a13 complete13 example13 of13 a13 model13 Zile13 as13 of13 Pmetrics13 version13 04013 and13 higher

Userrsquos13 Guide13 13 1513 13

NotesBy13 omitting13 a13 Diffeq13 block13 with13 ODEs13 Pmetrics13 understands13 that13 you13 are13 specifying13 the13 model13 to13 be13 solved13 algebraically13 In13 this13 case13 at13 least13 KE13 and13 V13 must13 be13 in13 the13 Primary13 or13 Secondary13 variables13 KA13 KCP13 and13 KPC13 are13 optional13 and13 specify13 absorption13 and13 transfer13 to13 and13 from13 the13 central13 to13 a13 peripheral13 compartment13 respectively

PriKE13 013 5V013 0113 100KA13 013 5Tlag113 013 3Cov13 wt

SecV13 =13 V0wt

LagTLAG(1)13 =13 Tlag1

OutY(1)13 =13 X(2)V

ErrL=04010100

Userrsquos13 Guide13 13 1613 13

Brief13 Fortran13 Tutorial

Much13 more13 detailed13 help13 is13 available13 from13 httpwwwcsmtuedu~sheneCOURSEScs201NOTESfortranhtml

Arithmetic Operator Meaning

+ addition

- subtraction

multiplication

division

exponentiation

Relational Operator Alternative Operator Meaning

lt LT less than

lt= LE less than or equal

gt GT greater than

gt= GE greater than or equal

== EQ equal

= NE not equal

Selective Execution Example

IF (logical-expression) one-statement IF (T gt= 100) CL = 10

IF (logical-expression) THEN statementsEND IF

IF (T gt= 100) THEN CL = 10 V = 10END IF

IF (logical-expression) THEN statements-1ELSE statements-2END IF

IF (T gt= 100) THEN CL = 10ELSE CL = CLEND IF

Userrsquos13 Guide13 13 1713 13

How to use R and PmetricsSeCng13 up13 a13 Pmetrics13 project

When13 beginning13 a13 new13 modeling13 project13 it13 is13 convenient13 to13 use13 the13 command13 PMtree(ldquoproject namerdquo)13 13 This13 command13 will13 set13 up13 a13 new13 directory13 in13 the13 current13 working13 directory13 named13 whatever13 you13 have13 included13 as13 the13 ldquoproject13 namerdquo13 13 For13 example13 a13 directory13 called13 ldquoDrugXrdquo13 will13 be13 created13 by13 PMtree(ldquoDrugXrdquo)13 13 Beneath13 this13 directory13 several13 subdirectories13 will13 be13 also13 created13 Rscript13 Runs13 Sim13 and13 src13 13 The13 Rscript13 subdirectory13 will13 contain13 a13 skeleton13 R13 script13 to13 begin13 Pmetrics13 runs13 in13 the13 new13 project13 13 The13 Runs13 subdirectory13 should13 contain13 all13 Ziles13 required13 for13 a13 run13 (described13 next)13 and13 it13 will13 also13 contain13 the13 resulting13 numerically13 ordered13 run13 directories13 created13 after13 each13 Pmetrics13 NPAG13 or13 IT2B13 run13 13 The13 Sim13 subdirectory13 can13 contain13 any13 Ziles13 related13 to13 simulations13 and13 the13 src13 subdirectory13 should13 contain13 original13 and13 manipulated13 source13 data13 Ziles13 13 Of13 course13 you13 are13 free13 to13 edit13 this13 directory13 tree13 structure13 as13 you13 please13 or13 make13 your13 own13 entirely

GeCng13 the13 required13 files13 to13 run13 Pmetrics

When13 you13 wish13 to13 execute13 a13 Pmetrics13 run13 you13 must13 ensure13 that13 appropriate13 Pmetrics13 model13 txt13 and13 data13 csv13 Ziles13 are13 in13 the13 working13 directory13 ie13 the13 Runs13 subdirectory13 of13 the13 project13 directory13 13 13 13 R13 can13 be13 used13 to13 help13 prepare13 the13 data13 csv13 Zile13 by13 importing13 and13 manipulating13 spreadsheets13 (eg13 readcsv())13 13 The13 Pmetrics13 function13 PMcheck()13 can13 be13 used13 to13 check13 a13 csv13 Zile13 or13 an13 R13 dataframe13 that13 is13 to13 be13 saved13 as13 a13 Pmetrics13 data13 13 csv13 Zile13 for13 errors13 13 13 13 13 13 It13 can13 also13 check13 a13 model13 Zile13 for13 errors13 in13 the13 context13 of13 a13 dataZile13 eg13 covariates13 that13 do13 not13 match13 13 PMfixMatrix()13 attempts13 to13 automatically13 rid13 data13 Ziles13 of13 errors13 13 The13 function13 PMwriteMatrix() 13 can13 be13 used13 to13 write13 the13 R13 data13 object13 in13 the13 correct13 format13 for13 use13 by13 IT2B13 NPAG13 or13 the13 Simulator13 13 You13 can13 also13 download13 sample13 data13 and13 scripts13 from13 the13 Pmetrics13 downloads13 section13 of13 our13 website13 once13 you13 sign13 in13 with13 your13 LAPK13 user13 email13 address13 and13 password13 13 Edit13 prior13 versions13 of13 model13 Ziles13 to13 make13 new13 model13 Ziles

Using13 scripts13 to13 control13 Pmetrics

As13 you13 will13 see13 in13 the13 skeleton13 R13 script13 made13 by13 PMtree() and13 placed13 in13 the13 Rscript13 subdirectory13 if13 this13 is13 a13 Zirst-shy‐time13 run13 the13 R13 commands13 to13 run13 IT2B13 or13 NPAG13 are13 as13 follows13 13 Recall13 that13 the13 ldquordquo13 character13 is13 a13 comment13 character

library(Pmetrics)Run 1 - add your run description heresetwd(ldquoworking directoryrdquo)NPrun() for NPAG or ITrun() for IT2B

The13 Zirst13 line13 will13 load13 the13 Pmetrics13 library13 of13 functions13 13 The13 second13 line13 sets13 the13 working13 directory13 to13 the13 speciZied13 path13 13 The13 third13 line13 generates13 the13 batch13 Zile13 to13 run13 NPAG13 or13 IT2B13 and13 saves13 it13 to13 the13 working13 directory13

NOTE13 13 On13 Mac13 systems13 the13 batch13 Zile13 will13 be13 automatically13 launched13 in13 a13 Terminal13 window13 13 On13 Windows13 systems13 the13 batch13 Zile13 must13 be13 launched13 manually13 by13 double13 clicking13 the13 np_runbat13 or13 it_runbat13 Zile13 in13 the13 working13 directory

ITrun() 13 and13 NPrun()13 both13 return13 the13 full13 path13 of13 the13 output13 directory13 to13 the13 clipboard13 13 By13 default13 runs13 are13 placed13 in13 folders13 numbered13 sequentially13 beginning13 with13 ldquo1rdquoNow13 the13 output13 of13 IT2B13 or13 NPAG13 needs13 to13 be13 loaded13 into13 R13 so13 the13 next13 command13 does13 this

NPload(run_number) or ITload(run_number)

Details13 of13 these13 commands13 and13 what13 is13 loaded13 are13 described13 in13 the13 R13 documentation13 (NPload 13 or13 ITload)13 and13 in13 the13 following13 section13 13 The13 run_number13 should13 be13 included13 within13 the13 parentheses13 to13 be13 appended13 to13 the13 names13

Userrsquos13 Guide13 13 1813 13

of13 loaded13 R13 objects13 allowing13 for13 comparison13 between13 runs13 eg13 NPload(1)13 13 Finally13 at13 this13 point13 other13 Pmetrics13 commands13 can13 be13 added13 to13 the13 script13 to13 process13 the13 data13 such13 as13 the13 following

plot(final1)plot(cycle1)plot(op1type=rdquopoprdquo) or plot(op1$pop1)plot(op1) default is to plot posterior predictions for output 1plot(op1type=rdquopoprdquoresid=T)

Of13 course13 the13 full13 power13 of13 R13 can13 be13 used13 in13 scripts13 to13 analyze13 data13 but13 these13 simple13 statements13 serve13 as13 examplesIf13 you13 do13 not13 use13 the13 PMtree() structure13 we13 suggest13 that13 the13 R13 script13 for13 a13 particular13 project13 be13 saved13 into13 a13 folder13 called13 ldquoRscriptrdquo13 or13 some13 other13 meaningful13 name13 in13 the13 working13 directory13 13 Folders13 are13 not13 be13 moved13 by13 the13 batch13 Zile13 13 Within13 the13 script13 number13 runs13 sequentially13 and13 use13 comments13 liberally13 to13 13 distinguish13 runs13 as13 shown13 below

library(Pmetrics)

Run 1 - Ka Kel V all subjectssetwd(ldquoworking directoryrdquo)NPrun() assumes model=rdquomodeltxtrdquo and data=rdquodatacsvrdquoNPload(1)

Remember13 in13 R13 that13 the13 command13 example(function) will13 provide13 examples13 for13 the13 speciZied13 function13 13 Most13 Pmetrics13 functions13 have13 examples

Pmetrics Data ObjectsAfter13 a13 successful13 IT2B13 or13 NPAG13 run13 an13 R13 dataZile13 is13 saved13 in13 the13 output13 subdirectory13 of13 the13 newly13 created13 numerically13 ordered13 folder13 in13 the13 working13 directory13 13 After13 IT2B13 this13 Zile13 is13 called13 ldquoIT2BoutRdatardquo13 and13 after13 NPAG13 it13 is13 called13 ldquoNPAGoutRdatardquo13 13 As13 mentioned13 in13 the13 previous13 section13 these13 data13 Ziles13 can13 be13 loaded13 by13 ensuring13 that13 the13 Runs13 folder13 is13 set13 as13 the13 working13 directory13 and13 then13 using13 the13 Pmetrics13 commands13 ITload(run_num)13 or13 NPload(run_num)

Both13 commands13 load13 their13 respective13 Rdata13 Ziles13 into13 R13 making13 the13 contained13 objects13 available13 for13 plotting13 and13 other13 analysisObjects13 loaded13 by13 ITload(run_num) and NPload(run_num)

Objects Variables Comments

op13 (class13 PMop13 list) $pop113 $post113 Population13 and13 posterior13 predictions13 for13 each13 output13 equation13 ie13 113 213

13 $id Subject13 identiZication

13 $time Observation13 time13 in13 relative13 decimal13 hours

13 $obs Observation

13 $pred Prediction13 based13 on13 median13 of13 population13 or13 posterior13 parameter13 value13 distributions

Userrsquos13 Guide13 13 1913 13

Objects Variables Comments

13 $block Dosing13 block13 usually13 113 unless13 data13 Zile13 contains13 EVID=413 dose13 reset13 events13 in13 which13 case13 each13 such13 reset13 within13 a13 given13 ID13 will13 increment13 the13 dosing13 block13 by13 113 for13 that13 ID

13 $obsSD Calculated13 standard13 deviation13 (error)13 of13 the13 observation13 based13 on13 the13 assay13 error13 polynomial

13 $d Difference13 between13 pred13 and13 obs

13 $ds Squared13 difference13 between13 pred13 and13 obs

13 $wd $d13 weighted13 by13 the13 $obsSD

13 $wds $ds13 weighted13 by13 the13 $obsSD

Zinal13 (class13 PMZinal13 list) $popPoints (NPAG13 only)13 Dataframe13 of13 the13 Zinal13 cycle13 joint13 population13 density13 of13 grid13 points13 with13 column13 names13 equal13 to13 the13 name13 of13 each13 random13 parameter13 plus13 $prob13 for13 the13 associated13 probability13 of13 that13 point13

$popMean The13 Zinal13 cycle13 mean13 for13 each13 random13 parameter13 distribution

$popSD The13 Zinal13 cycle13 standard13 deviation13 for13 each13 random13 parameter13 distribution

$popCV The13 Zinal13 cycle13 coefZicient13 of13 variation13 for13 each13 random13 parameter13 distribution

$popVar The13 Zinal13 cycle13 variance13 for13 each13 random13 parameter13 distribution

$popCov The13 Zinal13 cycle13 covariance13 matrix13 for13 each13 random13 parameter13 distribution

$popCor The13 Zinal13 cycle13 correlation13 matrix13 for13 each13 random13 parameter13 distribution

$popMedian The13 Zinal13 cycle13 median13 for13 each13 random13 parameter13 distribution

$gridpts (NPAG13 only)13 The13 initial13 number13 of13 support13 points

$ab Matrix13 of13 boundaries13 for13 random13 parameter13 values13 13 For13 NPAG13 this13 is13 speciZied13 by13 the13 user13 prior13 to13 the13 run13 for13 IT2B13 it13 is13 calculated13 as13 a13 user13 speciZied13 multiple13 of13 the13 SD13 for13 the13 parameter13 value13 distribution

Userrsquos13 Guide13 13 2013 13

Objects Variables Comments

cycle13 (class13 PMcycle13 list) $names Vector13 of13 names13 of13 the13 random13 parameters

$ll Matrix13 of13 cycle13 number13 and13 -shy‐2Log-shy‐likelihood13 at13 each13 cycle

$gamlam A13 matrix13 of13 cycle13 number13 and13 gamma13 or13 lambda13 at13 each13 cycle13 (see13 item13 1613 under13 NPAG13 Runs13 below13 for13 a13 discussion13 of13 gamma13 and13 lambda)

$mean A13 matrix13 of13 cycle13 number13 and13 the13 mean13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 mean

$sd A13 matrix13 of13 cycle13 number13 and13 the13 standard13 deviation13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$median A13 matrix13 of13 cycle13 number13 and13 the13 median13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$aic A13 matrix13 of13 cycle13 number13 and13 Akaike13 Information13 Criterion13 at13 each13 cycle

$bic A13 matrix13 of13 cycle13 number13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle

cov13 (class13 PMcov13 dataframe)

$id Subject13 identiZication

$time Time13 for13 each13 covariate13 entry

covariates Covariate13 values13 for13 each13 subject13 at13 each13 time13 extracted13 from13 the13 raw13 data13 Zile

parameters Mean13 median13 or13 mode13 of13 Bayesian13 posterior13 distribution13 for13 each13 random13 parameter13 in13 the13 model13 13 Mode13 summaries13 are13 available13 for13 NPAG13 output13 only13 and13 the13 default13 is13 median13 13 Values13 are13 recycled13 for13 each13 row13 within13 a13 given13 subject13 with13 the13 number13 of13 rows13 driven13 by13 the13 number13 of13 covariate13 entries

Userrsquos13 Guide13 13 2113 13

Objects Variables Comments

pop13 (class13 PMpop13 dataframe)

post13 (class13 PMpost13 dataframe)

NPAG13 only

$id Subject13 identiZication

$pred113 Population13 prior13 (PMpop)13 or13 Bayesian13 posterior13 (PMpost)13 predictions13 for13 each13 output13 equation13 based13 on13 mean13 median13 and13 mode13 as13 speciZied13 by13 the13 user13 and13 with13 frequency13 also13 speciZied13 by13 the13 user13 in13 the13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

$block Same13 as13 for13 PMop13 objects13 above

NPdata13 (class13 NPAG13 list)13 ITdata13 (class13 IT2B13 list

Raw13 data13 used13 to13 make13 the13 above13 objects13 13 Please13 use13 NPparse13 or13 ITparse13 in13 R13 for13 discussion13 of13 the13 data13 contained13 in13 these13 objects

Since13 R13 is13 an13 object13 oriented13 language13 to13 access13 the13 observations13 in13 a13 PMop13 object13 for13 example13 use13 the13 following13 syntax13 op$post1$obsNote13 that13 you13 will13 place13 an13 integer13 within13 the13 parentheses13 of13 the13 loading13 functions13 eg13 NPload(1)13 which13 will13 sufZix13 all13 the13 above13 objects13 with13 that13 integer13 eg13 op113 Zinal113 NPdata113 13 This13 allows13 several13 models13 to13 be13 loaded13 into13 R13 simultaneously13 each13 with13 a13 unique13 sufZix13 and13 which13 can13 be13 compared13 with13 the13 PMcompare()13 command13 (see13 Model13 Diagnostics13 below)

Making New Pmetrics ObjectsOnce13 you13 have13 loaded13 the13 raw13 (NPdata13 or13 ITdata)13 or13 processed13 (op13 Uinal13 cycle13 pop13 post)13 data13 objects13 described13 above13 with13 NPload(run_num)13 or13 ITload(run_num)13 should13 you13 wish13 to13 remake13 the13 processed13 objects13 with13 parameters13 other13 than13 the13 defaults13 you13 can13 easily13 do13 so13 with13 the13 make 13 family13 of13 commands13 13 For13 example13 the13 default13 for13 PMop13 observed13 vs13 predicted13 objects13 is13 to13 use13 the13 prediction13 based13 on13 the13 median13 of13 the13 population13 or13 posterior13 distribution13 13 If13 you13 wish13 to13 use13 the13 mean13 of13 the13 distribution13 remake13 the13 PMop13 object13 using makeOP()13 13 If13 you13 wish13 to13 see13 all13 the13 cycle13 information13 in13 a13 PMcycle13 object13 not13 omitting13 the13 Zirst13 1013 of13 cycles13 by13 default13 remake13 it13 using13 makeCycle()13 13

For13 all13 of13 the13 following13 commands13 the13 data13 input13 is13 either13 NPdata13 or13 ITdata13 with13 additional13 function13 arguments13 speciZic13 to13 each13 command13 13 Accessing13 the13 help13 for13 each13 function13 in13 R13 will13 provide13 further13 details13 on13 the13 arguments13 defaults13 and13 output13 of13 each13 command

Userrsquos13 Guide13 13 2213 13

Command Description R13 help

makeAUC Make13 a13 dataframe13 of13 class13 PMauc13 containing13 subject13 ID13 and13 AUC13 from13 a13 variety13 of13 inputs13 including13 objects13 of13 PMop13 PMsim13 or13 a13 suitable13 dataframe

makeAUC

makeCov Generate13 a13 dataframe13 of13 class13 PMcov13 with13 subject-shy‐speciZic13 covariates13 extracted13 from13 the13 data13 csv13 Zile13 This13 object13 can13 be13 plotted13 and13 used13 to13 test13 for13 covariates13 which13 are13 signiZicantly13 associated13 with13 model13 parameters13 13

makeCov

makeCycle Create13 a13 PMcycle13 object13 described13 in13 the13 previous13 section makeCycle

makeFinal Create13 a13 PMZinal13 object13 described13 in13 the13 previous13 section makeFinal

makeOP Create13 a13 PMop13 object13 described13 in13 the13 previous13 section makeOP

makeNCA Create13 a13 dataframe13 (class13 PMnca)13 with13 the13 output13 of13 a13 non-shy‐compartmental13 analysis13 using13 PMpost13 and13 NPAG13 data13 objects13 as13 input13 13 The13 PMnca13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull auc13 Area13 under13 the13 time-shy‐observation13 curve13 using13 the13

trapezoidal13 approximation13 from13 time13 013 until13 the13 second13 dose13 or13 if13 only13 one13 dose13 until13 the13 last13 observation

bull aumc13 Area13 under13 the13 Zirst13 moment13 curvebull k13 Slope13 by13 least-shy‐squares13 linear13 regression13 of13 the13 Zinal13

613 log-shy‐transformed13 observations13 vs13 timebull auclast13 Area13 under13 the13 curve13 from13 the13 time13 of13 the13

last13 observation13 to13 inZinity13 calculated13 as13 [Final13 obs]kbull aumclast13 Area13 under13 the13 Zirst13 moment13 curve13 from13

the13 time13 of13 the13 last13 observation13 to13 inZinitybull aucinf13 Area13 under13 the13 curve13 from13 time13 013 to13 inZinity13

caluculated13 as13 auc13 +13 auclastbull aumcinf13 Area13 under13 the13 Zirst13 moment13 curve13 from13

time13 013 to13 inZinitybull mrt13 Mean13 residence13 time13 calculated13 as13 1kbull cmax13 Maximum13 predicted13 concentration13 after13 the13

Zirst13 dosebull tmax13 Time13 to13 cmaxbull cl13 Clearance13 calculated13 as13 doseaucinfbull vdss13 Volume13 of13 distribution13 at13 steady13 state13

calculated13 as13 clmrtbull thalf13 Half13 life13 of13 elimination13 calculated13 as13 ln(2)kbull dose13 First13 dose13 amount13 for13 each13 subject

makeNCA

Userrsquos13 Guide13 13 2313 13

Command Description R13 help

makeErrorPoly This13 function13 plots13 Zirst13 second13 and13 third13 order13 polynomial13 functions13 Zitted13 to13 pairs13 of13 observations13 and13 associated13 standard13 deviations13 for13 a13 given13 output13 assay13 In13 this13 way13 the13 standard13 deviation13 associated13 with13 any13 observation13 may13 be13 calculated13 and13 used13 to13 appropriately13 weight13 that13 observation13 in13 the13 model13 building13 process13 Observations13 are13 weighted13 by13 the13 reciprocal13 of13 the13 variance13 or13 squared13 standard13 deviation13 13 Output13 of13 the13 function13 is13 a13 plot13 of13 the13 measured13 observations13 and13 Zitted13 polynomial13 curves13 and13 a13 list13 with13 the13 Zirst13 second13 and13 third13 order13 coefZicients

makeErrorPoly

makePTA This13 function13 performs13 a13 Probability13 of13 Target13 Attainment13 analysis13 for13 a13 set13 of13 simulated13 doses13 and13 time-shy‐concentration13 proZiles13 13 Targets13 (eg13 Minimum13 Inhibitory13 Concentrations)13 the13 type13 of13 target13 attainment13 (ie13 time13 above13 target13 Cmaxtarget13 13 AUCtarget13 Cmintarget13 or13 Cxtarget13 where13 x13 is13 any13 time13 point)13 and13 the13 success13 threshold13 (eg13 time13 gt13 0713 or13 Cmaxtarget13 gt13 10)13 can13 all13 be13 speciZied13 13 Output13 is13 a13 list13 (class13 PMpta)13 with13 two13 objectsbull Results13 a13 413 dimensional13 array13 with13 dimension13 size13 of13

[number13 of13 doses13 number13 of13 targets13 number13 of13 simulated13 proZiles13 1]13 which13 gives13 the13 target13 attainment13 (eg13 Cmaxtarget)13 for13 each13 dose13 target13 and13 proZile

bull Outcome13 For13 each13 dose13 and13 target13 a13 summary13 of13 the13 target13 attainment13 for13 all13 the13 proZiles13 including13 mean13 standard13 deviation13 and13 proportion13 above13 the13 success13 threshold

PMpta13 objects13 can13 be13 summarized13 with13 summary(x)13 and13 plotted13 with13 plot(x)13

makePTA

Userrsquos13 Guide13 13 2413 13

Command Description R13 help

makePopmakePost(NPAG13 only)

These13 functions13 create13 dataframes13 of13 class13 PMpop13 and13 PMpost13 respectively13 13 The13 PMpop13 or13 PMpost13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull time13 Times13 for13 predicted13 concentrations13 13 These13

times13 are13 not13 necessarily13 at13 observed13 times13 but13 at13 a13 frequency13 speciZied13 in13 the13 NPAG13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

bull pred113 Predictions13 for13 output13 113 13 For13 PMpop13 objects13 predictions13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 population13 prior13 distribution13 13 For13 PMpost13 objects13 they13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject

bull pred213 pred313 etc13 If13 additional13 outputs13 exist13 they13 will13 each13 be13 columns13 in13 the13 dataframe13 just13 as13 for13 pred113 13

makePopmakePost

NPAG RunsIn13 the13 past13 users13 had13 to13 run13 NPAG13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 NPrun()13 13 However13 if13 NPrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable

1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 NPAG13 creates13 a13 temporary13 instruction13 Zile13 in13 case13 something13 happens13 so13 that13 instructions13 entered13 to13 date13 can13

be13 recovered13 13 Accept13 the13 default13 by13 choosing13 113 13 You13 can13 save13 with13 a13 meaningful13 Zilename13 later13 13 If13 it13 already13 exists13 you13 will13 be13 asked13 if13 you13 wish13 to13 overwrite13 the13 Zile13 which13 is13 usually13 the13 thing13 to13 do

Userrsquos13 Guide13 13 2513 13

8 If13 you13 have13 previously13 run13 IT2B13 you13 can13 automatically13 import13 the13 suggested13 parameter13 ranges13 13 Choose13 113 to13 do13 this13 and13 013 to13 run13 NPAG13 without13 a13 previous13 IT2B13 run81 If13 you13 choose13 option13 113 you13 must13 specify13 the13 name13 of13 a13 FROMxxxx13 Zile13 typically13 FROM000113 that13 you13 can13

Zind13 in13 an13 output13 directory13 after13 a13 successful13 IT2B13 run13 13 Note13 that13 the13 program13 will13 then13 assume13 that13 you13 are13 using13 the13 same13 wrk13 Ziles13 that13 IT2B13 made13 from13 your13 data13 csv13 Zile13 13 It13 is13 strongly13 recommended13 to13 override13 this13 and13 specify13 a13 data13 csv13 Zile13 13 At13 this13 point13 you13 will13 jump13 to13 1013 below13 and13 continue13 on13 however13 your13 answers13 will13 often13 be13 supplied13 by13 the13 instructions13 contained13 in13 the13 FROMxxxx13 Zile13 and13 you13 need13 merely13 conZirm13 them

9 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13 have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 NPrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis91 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13

for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

10 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 NPAG13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

11 Enter13 the13 name13 of13 your13 csv13 Zile13 now12 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile13 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset131 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects132 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry14 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset15 Enter13 the13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo 13 followed13 by13

return16 Select13 how13 you13 would13 like13 to13 model13 assay13 (observation)13 error13 for13 each13 output13 equation13 13 You13 have13 four13 choices13 13

In13 all13 four13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0161 Error13 model13 113 (SD)13 13 Choose13 this13 option13 if13 you13 have13 already13 run13 IT2B13 and13 multiplied13 your13 assay13 error13

polynomial13 by13 gamma13 (see13 next13 option13 for13 a13 description13 of13 gamma)162 Error13 model13 213 (SD13 13 gamma)13 13 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13

observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 If13 you13 choose13 this13 option13 you13 then13 can13 specify13 the13 starting13 value13 of13 gamma13 13 Good13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality

163 Error13 model13 313 (SD213 +13 lamda2)0513 13 Lamda13 is13 an13 alternative13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present

Userrsquos13 Guide13 13 2613 13

164 Error13 model13 413 SD13 =13 gamma13 13 This13 model13 is13 rarely13 used13 and13 is13 equivalent13 to13 specifying13 a13 model13 with13 C013 only13 ie13 a13 constant13 error13 regardless13 of13 concentration

17 Once13 you13 select13 the13 assay13 error13 model13 for13 each13 output13 equation13 you13 are13 then13 offered13 four13 more13 options13 on13 which13 assay13 error13 polynomial13 coefZicients13 to13 use13 13 Choices13 113 and13 213 are13 the13 most13 commonly13 used171 Choice13 113 The13 default13 13 Use13 coefZicients13 in13 the13 subject13 record13 (C013 C113 C213 C313 in13 the13 data13 csv13 Zile)13 and13 if13

missing13 use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 (item13 1813 below)172 Choice13 213 Use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 for13 all13 subjects13 regardless13 of13 what13 is13 in13 the13

data13 csv13 Zile173 Choice13 313 13 To13 multiply13 data13 csv13 values13 and13 default13 entered13 values13 by13 a13 Zixed13 gamma13 and13 use13 them13 13 174 Choice13 013 Specify13 coefZicients13 on13 a13 subject13 by13 subject13 basis13 either13 those13 in13 the13 data13 csv13 Zile13 already13 the13

default13 values13 entered13 into13 the13 program13 or13 other13 values18 For13 each13 output13 equation13 after13 you13 have13 selected13 the13 option13 in13 item13 1713 you13 will13 be13 prompted13 to13 supply13 the13

required13 information13 including13 the13 general13 default13 values13 for13 missing13 or13 overridden13 values13 in13 the13 data13 csv13 Zile19 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13

usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13

20 Enter13 the13 grid13 point13 index13 13 This13 number13 corresponds13 to13 the13 number13 of13 grid13 (support)13 points13 which13 will13 initially13 Zill13 the13 model13 parameter13 space13 13 The13 larger13 the13 number13 of13 random13 parameters13 to13 be13 estimated13 the13 more13 points13 are13 required13 13 The13 program13 will13 make13 a13 suggestion13 based13 on13 the13 number13 of13 random13 parameters13 in13 the13 model13 13 The13 more13 you13 choose13 the13 slower13 the13 run13 will13 be13 but13 results13 may13 improve13 13 It13 is13 reasonable13 to13 choose13 fewer13 points13 early13 in13 model13 exploration13 and13 increase13 in13 later13 phases13 or13 if13 poor13 model13 Zits13 or13 lack13 of13 convergence13 are13 noted13 The13 choices13 are13 113 to13 713 corresponding13 respectively13 to13 212913 500313 1000713 2001113 4000913 and13 8002113 points13 13 If13 you13 choose13 713 you13 then13 have13 an13 additional13 choice13 to13 select13 one13 or13 more13 multiples13 of13 8002113 points

21 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 013 or13 greater13 13 If13 you13 enter13 an13 integer13 greater13 than13 013 the13 engine13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13 If13 you13 enter13 013 this13 is13 the13 way13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 an13 independent13 data13 set13 and13 a13 non-shy‐uniform13 prior13 must13 be13 speciZied13 (see13 3013 below)13 13 This13 means13 that13 the13 engine13 will13 only13 calculate13 the13 individual13 Bayesian13 posteriors13 for13 the13 new13 subjects13 using13 the13 population13 joint13 density13 from13 a13 previous13 run13 as13 a13 Bayesian13 prior

22 Information13 about13 convergence13 criteria13 13 Answer13 113 or13 some13 other13 keystroke13 plus13 Return13 to13 acknowledge13 that13 you13 have13 read13 it

23 In13 order13 to13 predict13 concentrations13 from13 a13 non-shy‐parametric13 distribution13 you13 have13 the13 option13 to13 use13 the13 1)13 mean13 2)13 median13 or13 3)13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject13 13 We13 typically13 use13 the13 median13 Zirst13 and13 then13 the13 mean13 in13 a13 separate13 run13 and13 compare13 the13 differences13 13

24 Select13 the13 time13 interval13 to13 generate13 predicted13 concentrations13 13 Additionally13 there13 will13 also13 be13 predictions13 made13 at13 the13 time13 of13 each13 observation13 13 In13 general13 for13 most13 models13 predictions13 every13 1213 minutes13 provide13 sufZicient13 granularity13 13 Smaller13 values13 can13 result13 in13 very13 large13 Ziles13 for13 big13 populations

25 Select13 the13 default13 MIC13 to13 be13 used13 for13 AUCMIC13 ratio13 reporting13 13 This13 should13 generally13 be13 set13 to13 the13 default13 of13 113 by13 choosing13 113 13 You13 can13 always13 extract13 the13 AUC13 later13 and13 divide13 it13 by13 any13 MIC13 you13 choose

26 Enter13 the13 value13 in13 hours13 that13 you13 want13 for13 calculations13 of13 AUCs13 from13 predicted13 concentration13 proZiles13 13 The13 default13 is13 2413 hours13 which13 you13 can13 accept13 by13 entering13 113 or13 013 if13 you13 want13 to13 specify13 a13 different13 interval

27 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

28 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

Userrsquos13 Guide13 13 2713 13

29 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

30 For13 the13 prior13 density13 choose13 113 if13 it13 is13 to13 be13 uniform13 13 This13 means13 that13 the13 initial13 grid13 points13 will13 be13 evenly13 distributed13 with13 equal13 probability13 within13 the13 boundaries13 speciZied13 (in13 1513 above)13 13 If13 you13 choose13 013 you13 will13 be13 prompted13 for13 the13 name13 of13 a13 Zile13 that13 contains13 the13 prior13 density13 13 This13 will13 be13 DEN000113 unless13 you13 have13 changed13 its13 name13 13 It13 will13 be13 found13 in13 the13 output13 directory13 of13 a13 prior13 NPAG13 run13 13 The13 model13 used13 to13 generate13 the13 DEN000113 Zile13 must13 be13 exactly13 the13 same13 as13 the13 current13 model13 including13 parameter13 boundaries13 13 However13 this13 option13 is13 useful13 to13 specify13 a13 non-shy‐uniform13 density13 for13 two13 reasons13 13 The13 Zirst13 is13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 a13 new13 set13 of13 subjects13 13 Do13 this13 in13 combination13 with13 setting13 the13 number13 of13 cycles13 to13 013 (see13 2113 above)13 13 The13 second13 use13 for13 a13 non-shy‐uniform13 prior13 is13 to13 continue13 a13 previous13 run13 13 For13 example13 if13 you13 only13 set13 the13 number13 of13 cycles13 to13 5013 to13 get13 a13 rough13 idea13 of13 model13 Zit13 you13 may13 continue13 where13 you13 left13 off13 by13 specifying13 the13 DEN000113 Zile13 from13 the13 50-shy‐cycle13 run13 and13 continuing13 with13 as13 many13 additional13 cycles13 as13 you13 specify13 in13 item13 2113 13 So13 in13 the13 example13 if13 you13 specify13 10013 cycles13 in13 2113 the13 total13 number13 of13 cycles13 will13 be13 5013 +13 10013 =13 150

31 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 NPrun(instr=ldquoyourfilerdquo)13 option13 and13 including13 ldquoyourZilerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

32 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 NPAG13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 NPAG13 analysis

33 The13 NPAG13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

IT2B RunsIn13 the13 past13 users13 had13 to13 run13 IT2B13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 ITrun()13 13 However13 if13 ITrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13

have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 ITrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis

Userrsquos13 Guide13 13 2813 13

71 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13 for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

8 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 IT2B13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

9 Enter13 the13 name13 of13 your13 csv13 Zile13 now10 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile11 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset111 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects112 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry12 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset13 Enter13 the13 initial13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo13 followed13

by13 return14 The13 estimated13 mean13 for13 each13 parameter13 value13 distribution13 during13 the13 Zirst13 iteration13 will13 be13 the13 median13 of13 the13

range13 speciZied13 in13 1313 13 You13 now13 have13 the13 option13 to13 specify13 the13 standard13 deviation13 for13 the13 parameter13 value13 distribution13 which13 by13 default13 is13 half13 of13 the13 range13 in13 1313 13 Choose13 113 to13 accept13 this13 (the13 usual13 answer)13 or13 013 to13 change13 it13 to13 something13 else13 expressed13 as13 a13 multiple13 of13 the13 range

15 In13 IT2B13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 You13 can13 now13 choose13 113 if13 every13 subject13 has13 the13 same13 coefZicients13 or13 013 to13 use13 a13 unique13 set13 of13 coefZicients13 for13 each13 subject13 13 The13 Zirst13 case13 is13 the13 more13 usual13 when13 all13 13 samples13 from13 all13 subjects13 are13 analyzed13 in13 the13 same13 lab13 13 If13 13 samples13 are13 analyzed13 in13 different13 labs13 and13 you13 have13 the13 assay13 data13 from13 each13 lab13 then13 you13 would13 enter13 013 13 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 (see13 151313 below)13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0151 If13 you13 choose13 113 (one13 set13 of13 coefZicients13 for13 all13 subjects)13 you13 will13 then13 be13 presented13 with13 313 additional13

choices1511 Choice13 113 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13 observation13

including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 and13 to13 Zix13 gamma13 to13 1

1512 Choice13 213 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 but13 to13 estimate13 gamma13 based13 on13 the13 data13 13 This13 is13 the13 usual13 option

1513 Choice13 313 Choose13 this13 option13 if13 you13 wish13 to13 estimate13 the13 assay13 error13 coefZicients13 based13 on13 your13 data13 for13 use13 in13 future13 runs13 13 Although13 you13 can13 access13 this13 option13 by13 using13 either13 ITrun()13 or13 ERRrun()13 in13 R13 the13 instruction13 Ziles13 that13 you13 save13 and13 the13 generated13 output13 Ziles13 will13 be13 different13 13 Therefore13 we13 recommend13 that13 if13 you13 intend13 to13 choose13 this13 option13 use13 ERRrun()13 in13 R13 which13 will13 generate13 an13 ASS000113 Zile13 that13 contains13 the13 estimates13 for13 C013 C113 C213 and13 C313 13 You13 can13 then13 include13 this13 Zile13 in13 the13 working13 directory13 (along13 with13 a13 model13 txt13 Zile13 and13 a13 data13 csv13 Zile)13 to13 do13 an13 IT2B13 run13 supplying13 the13 Zile13 name13 in13 16113 below

Userrsquos13 Guide13 13 2913 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

ExampleFFA(1)13 =13 FA1

Lag13 1me

Specify13 the13 lag13 term13 if13 present13 which13 is13 the13 delay13 after13 an13 absorbed13 dose13 before13 observed13 concentrations13 Use13 the13 form13 TLAG()13 =13 expression13 where13 13 is13 the13 input13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignoredExampleLagTLAG(1)13 =13 Tlag1

Differen1al13 equa1ons

Specify13 a13 model13 in13 terms13 of13 ordinary13 differential13 equations13 in13 Fortran13 format13 XP()13 is13 the13 notation13 for13 dX()dt13 where13 13 is13 the13 compartment13 number13 X()13 is13 the13 amount13 in13 the13 compartment13 There13 can13 be13 a13 maximum13 of13 2013 such13 equationsExampleDifXP(1)13 =13 -shy‐KAX(1)XP(2)13 =13 RATEIV(1)13 +13 KAX(1)13 -shy‐13 (KE+KCP)X(2)13 +13 KPCX(3)XP(3)13 =13 KCPX(2)13 -shy‐13 KPCX(3)RATEIV(1)13 is13 the13 notation13 to13 indicate13 an13 infusion13 of13 input13 113 (typically13 drug13 1)13 13 The13 duration13 of13 the13 infusion13 and13 total13 dose13 is13 deZined13 in13 the13 data13 csv13 Zile13 Up13 to13 713 inputs13 are13 currently13 allowed13 13 These13 can13 be13 used13 in13 the13 model13 Zile13 as13 RATEIV(1)13 RATEIV(2)13 etc13 13 The13 compartments13 for13 13 receiving13 the13 inputs13 of13 oral13 (bolus)13 doses13 are13 deZined13 in13 the13 Bolus13 block

Outputs

Output13 equations13 in13 Fortran13 format13 Outputs13 are13 of13 the13 form13 Y()13 =13 expression13 where13 13 is13 the13 output13 equation13 number13 Primary13 and13 secondary13 variables13 and13 covariates13 may13 be13 used13 in13 the13 expression13 as13 can13 conditional13 statemtents13 in13 Fortran13 code13 A13 +13 preZix13 is13 not13 necessary13 in13 this13 block13 for13 any13 statement13 although13 if13 present13 will13 be13 ignored13 There13 can13 be13 a13 maximum13 of13 613 outputs13 13 They13 are13 referred13 to13 as13 Y(1)13 Y(2)13 etcExampleOutY(1)13 =13 X(2)V

Error

This13 block13 contains13 all13 the13 information13 Pmetrics13 requires13 for13 the13 structure13 of13 the13 error13 model13 13 In13 Pmetrics13 each13 observation13 is13 weighted13 by13 1error213 13 13 There13 are13 two13 choices13 for13 the13 error13 term

113 13 error13 =13 SD13 13 gamma213 13 error13 =13 (SD213 +13 lamda2)0513 (Note13 that13 lambda13 is13 only13 available13 in13 NPAG13 currently)

where13 SD13 is13 the13 standard13 deviation13 (SD)13 of13 each13 observation13 [obs]13 and13 gamma13 and13 lambda13 are13 terms13 to13 capture13 extra13 process13 noise13 related13 to13 the13 observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 SD13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 The13 13 values13 for13 the13 coefZicients13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13

Userrsquos13 Guide13 13 1313 13

coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly() 13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0In13 the13 multiplicative13 model13 13 gamma13 is13 a13 scalar13 on13 SD13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 Lambda13 is13 an13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 We13 tend13 to13 prefer13 lambda

To13 specify13 the13 model13 in13 this13 block13 the13 Zirst13 line13 needs13 to13 be13 either13 L=[number]13 or13 G=[number]13 for13 a13 lambda13 or13 gamma13 error13 model13 13 The13 [number]13 term13 is13 the13 starting13 value13 for13 lambda13 or13 gamma13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present13 13 For13 gamma13 good13 starting13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality13 13 If13 you13 include13 an13 exclamation13 point13 ()13 in13 the13 declaration13 then13 lambda13 or13 gamma13 will13 be13 Zixed13 and13 not13 estimated13 13 Note13 that13 you13 can13 only13 Zix13 lambda13 currently13 to13 zeroThe13 next13 line(s)13 contain13 the13 values13 for13 C013 C113 C213 and13 C313 separated13 by13 commas13 13 There13 should13 be13 one13 line13 of13 coefZicients13 for13 each13 output13 equation13 13 By13 default13 Pmetrics13 will13 use13 values13 for13 these13 coefZicients13 found13 in13 the13 data13 Zile13 13 If13 none13 are13 present13 or13 if13 the13 model13 declaration13 line13 contains13 an13 exclamation13 point13 ()13 the13 values13 here13 will13 be13 used

Example13 113 estimated13 lambda13 starting13 at13 0413 one13 output13 use13 data13 Zile13 coefZicients13 but13 if13 missing13 use13 010100ErrL=04010100

Example13 213 Zixed13 gamma13 of13 213 two13 outputs13 use13 data13 Zile13 coefZicients13 but13 if13 missing13 use13 01010013 for13 the13 Zirst13 output13 but13 use13 0313 0113 013 013 for13 output13 213 regardless13 of13 what13 is13 in13 the13 data13 ZileErrG=2010100030100

Extra

This13 block13 is13 for13 advanced13 Fortran13 programmers13 only13 13 Occasionally13 for13 very13 complex13 models13 additional13 Fortran13 subroutines13 are13 required13 13 They13 can13 be13 placed13 here13 13 The13 code13 must13 specify13 complete13 Fortran13 subroutines13 which13 can13 be13 called13 from13 other13 blocks13 with13 appropriate13 call13 functions13 13

Reserved13 Names

The13 following13 cannot13 be13 used13 as13 primary13 covariate13 or13 secondary13 variable13 names13 They13 can13 be13 used13 in13 equations13 however

Reserved13 Variable Func1on13 in13 Pmetricsndim internal

t time

Userrsquos13 Guide13 13 1413 13

x array13 of13 compartment13 amounts

xp array13 of13 Zirst13 derivative13 of13 compartment13 amounts

rpar internal

ipar internal

p array13 of13 primary13 parameters

r input13 rates

b input13 boluses

npl internal

numeqt output13 equation13 number

ndrug input13 number

nadd covariate13 number

rateiv intravenous13 input13 for13 inputs13 when13 DURgt013 in13 data13 Ziles

cv covariate13 values13 array

n number13 of13 compartments

nd internal

ni internal

nup internal

nuic internal

np number13 of13 primary13 parameters

nbcomp bolus13 compartment13 array

psym names13 of13 primary13 parameters

fa biovailability

tlag lag13 time

tin internal

tout internal

Complete13 Example

Here13 is13 a13 complete13 example13 of13 a13 model13 Zile13 as13 of13 Pmetrics13 version13 04013 and13 higher

Userrsquos13 Guide13 13 1513 13

NotesBy13 omitting13 a13 Diffeq13 block13 with13 ODEs13 Pmetrics13 understands13 that13 you13 are13 specifying13 the13 model13 to13 be13 solved13 algebraically13 In13 this13 case13 at13 least13 KE13 and13 V13 must13 be13 in13 the13 Primary13 or13 Secondary13 variables13 KA13 KCP13 and13 KPC13 are13 optional13 and13 specify13 absorption13 and13 transfer13 to13 and13 from13 the13 central13 to13 a13 peripheral13 compartment13 respectively

PriKE13 013 5V013 0113 100KA13 013 5Tlag113 013 3Cov13 wt

SecV13 =13 V0wt

LagTLAG(1)13 =13 Tlag1

OutY(1)13 =13 X(2)V

ErrL=04010100

Userrsquos13 Guide13 13 1613 13

Brief13 Fortran13 Tutorial

Much13 more13 detailed13 help13 is13 available13 from13 httpwwwcsmtuedu~sheneCOURSEScs201NOTESfortranhtml

Arithmetic Operator Meaning

+ addition

- subtraction

multiplication

division

exponentiation

Relational Operator Alternative Operator Meaning

lt LT less than

lt= LE less than or equal

gt GT greater than

gt= GE greater than or equal

== EQ equal

= NE not equal

Selective Execution Example

IF (logical-expression) one-statement IF (T gt= 100) CL = 10

IF (logical-expression) THEN statementsEND IF

IF (T gt= 100) THEN CL = 10 V = 10END IF

IF (logical-expression) THEN statements-1ELSE statements-2END IF

IF (T gt= 100) THEN CL = 10ELSE CL = CLEND IF

Userrsquos13 Guide13 13 1713 13

How to use R and PmetricsSeCng13 up13 a13 Pmetrics13 project

When13 beginning13 a13 new13 modeling13 project13 it13 is13 convenient13 to13 use13 the13 command13 PMtree(ldquoproject namerdquo)13 13 This13 command13 will13 set13 up13 a13 new13 directory13 in13 the13 current13 working13 directory13 named13 whatever13 you13 have13 included13 as13 the13 ldquoproject13 namerdquo13 13 For13 example13 a13 directory13 called13 ldquoDrugXrdquo13 will13 be13 created13 by13 PMtree(ldquoDrugXrdquo)13 13 Beneath13 this13 directory13 several13 subdirectories13 will13 be13 also13 created13 Rscript13 Runs13 Sim13 and13 src13 13 The13 Rscript13 subdirectory13 will13 contain13 a13 skeleton13 R13 script13 to13 begin13 Pmetrics13 runs13 in13 the13 new13 project13 13 The13 Runs13 subdirectory13 should13 contain13 all13 Ziles13 required13 for13 a13 run13 (described13 next)13 and13 it13 will13 also13 contain13 the13 resulting13 numerically13 ordered13 run13 directories13 created13 after13 each13 Pmetrics13 NPAG13 or13 IT2B13 run13 13 The13 Sim13 subdirectory13 can13 contain13 any13 Ziles13 related13 to13 simulations13 and13 the13 src13 subdirectory13 should13 contain13 original13 and13 manipulated13 source13 data13 Ziles13 13 Of13 course13 you13 are13 free13 to13 edit13 this13 directory13 tree13 structure13 as13 you13 please13 or13 make13 your13 own13 entirely

GeCng13 the13 required13 files13 to13 run13 Pmetrics

When13 you13 wish13 to13 execute13 a13 Pmetrics13 run13 you13 must13 ensure13 that13 appropriate13 Pmetrics13 model13 txt13 and13 data13 csv13 Ziles13 are13 in13 the13 working13 directory13 ie13 the13 Runs13 subdirectory13 of13 the13 project13 directory13 13 13 13 R13 can13 be13 used13 to13 help13 prepare13 the13 data13 csv13 Zile13 by13 importing13 and13 manipulating13 spreadsheets13 (eg13 readcsv())13 13 The13 Pmetrics13 function13 PMcheck()13 can13 be13 used13 to13 check13 a13 csv13 Zile13 or13 an13 R13 dataframe13 that13 is13 to13 be13 saved13 as13 a13 Pmetrics13 data13 13 csv13 Zile13 for13 errors13 13 13 13 13 13 It13 can13 also13 check13 a13 model13 Zile13 for13 errors13 in13 the13 context13 of13 a13 dataZile13 eg13 covariates13 that13 do13 not13 match13 13 PMfixMatrix()13 attempts13 to13 automatically13 rid13 data13 Ziles13 of13 errors13 13 The13 function13 PMwriteMatrix() 13 can13 be13 used13 to13 write13 the13 R13 data13 object13 in13 the13 correct13 format13 for13 use13 by13 IT2B13 NPAG13 or13 the13 Simulator13 13 You13 can13 also13 download13 sample13 data13 and13 scripts13 from13 the13 Pmetrics13 downloads13 section13 of13 our13 website13 once13 you13 sign13 in13 with13 your13 LAPK13 user13 email13 address13 and13 password13 13 Edit13 prior13 versions13 of13 model13 Ziles13 to13 make13 new13 model13 Ziles

Using13 scripts13 to13 control13 Pmetrics

As13 you13 will13 see13 in13 the13 skeleton13 R13 script13 made13 by13 PMtree() and13 placed13 in13 the13 Rscript13 subdirectory13 if13 this13 is13 a13 Zirst-shy‐time13 run13 the13 R13 commands13 to13 run13 IT2B13 or13 NPAG13 are13 as13 follows13 13 Recall13 that13 the13 ldquordquo13 character13 is13 a13 comment13 character

library(Pmetrics)Run 1 - add your run description heresetwd(ldquoworking directoryrdquo)NPrun() for NPAG or ITrun() for IT2B

The13 Zirst13 line13 will13 load13 the13 Pmetrics13 library13 of13 functions13 13 The13 second13 line13 sets13 the13 working13 directory13 to13 the13 speciZied13 path13 13 The13 third13 line13 generates13 the13 batch13 Zile13 to13 run13 NPAG13 or13 IT2B13 and13 saves13 it13 to13 the13 working13 directory13

NOTE13 13 On13 Mac13 systems13 the13 batch13 Zile13 will13 be13 automatically13 launched13 in13 a13 Terminal13 window13 13 On13 Windows13 systems13 the13 batch13 Zile13 must13 be13 launched13 manually13 by13 double13 clicking13 the13 np_runbat13 or13 it_runbat13 Zile13 in13 the13 working13 directory

ITrun() 13 and13 NPrun()13 both13 return13 the13 full13 path13 of13 the13 output13 directory13 to13 the13 clipboard13 13 By13 default13 runs13 are13 placed13 in13 folders13 numbered13 sequentially13 beginning13 with13 ldquo1rdquoNow13 the13 output13 of13 IT2B13 or13 NPAG13 needs13 to13 be13 loaded13 into13 R13 so13 the13 next13 command13 does13 this

NPload(run_number) or ITload(run_number)

Details13 of13 these13 commands13 and13 what13 is13 loaded13 are13 described13 in13 the13 R13 documentation13 (NPload 13 or13 ITload)13 and13 in13 the13 following13 section13 13 The13 run_number13 should13 be13 included13 within13 the13 parentheses13 to13 be13 appended13 to13 the13 names13

Userrsquos13 Guide13 13 1813 13

of13 loaded13 R13 objects13 allowing13 for13 comparison13 between13 runs13 eg13 NPload(1)13 13 Finally13 at13 this13 point13 other13 Pmetrics13 commands13 can13 be13 added13 to13 the13 script13 to13 process13 the13 data13 such13 as13 the13 following

plot(final1)plot(cycle1)plot(op1type=rdquopoprdquo) or plot(op1$pop1)plot(op1) default is to plot posterior predictions for output 1plot(op1type=rdquopoprdquoresid=T)

Of13 course13 the13 full13 power13 of13 R13 can13 be13 used13 in13 scripts13 to13 analyze13 data13 but13 these13 simple13 statements13 serve13 as13 examplesIf13 you13 do13 not13 use13 the13 PMtree() structure13 we13 suggest13 that13 the13 R13 script13 for13 a13 particular13 project13 be13 saved13 into13 a13 folder13 called13 ldquoRscriptrdquo13 or13 some13 other13 meaningful13 name13 in13 the13 working13 directory13 13 Folders13 are13 not13 be13 moved13 by13 the13 batch13 Zile13 13 Within13 the13 script13 number13 runs13 sequentially13 and13 use13 comments13 liberally13 to13 13 distinguish13 runs13 as13 shown13 below

library(Pmetrics)

Run 1 - Ka Kel V all subjectssetwd(ldquoworking directoryrdquo)NPrun() assumes model=rdquomodeltxtrdquo and data=rdquodatacsvrdquoNPload(1)

Remember13 in13 R13 that13 the13 command13 example(function) will13 provide13 examples13 for13 the13 speciZied13 function13 13 Most13 Pmetrics13 functions13 have13 examples

Pmetrics Data ObjectsAfter13 a13 successful13 IT2B13 or13 NPAG13 run13 an13 R13 dataZile13 is13 saved13 in13 the13 output13 subdirectory13 of13 the13 newly13 created13 numerically13 ordered13 folder13 in13 the13 working13 directory13 13 After13 IT2B13 this13 Zile13 is13 called13 ldquoIT2BoutRdatardquo13 and13 after13 NPAG13 it13 is13 called13 ldquoNPAGoutRdatardquo13 13 As13 mentioned13 in13 the13 previous13 section13 these13 data13 Ziles13 can13 be13 loaded13 by13 ensuring13 that13 the13 Runs13 folder13 is13 set13 as13 the13 working13 directory13 and13 then13 using13 the13 Pmetrics13 commands13 ITload(run_num)13 or13 NPload(run_num)

Both13 commands13 load13 their13 respective13 Rdata13 Ziles13 into13 R13 making13 the13 contained13 objects13 available13 for13 plotting13 and13 other13 analysisObjects13 loaded13 by13 ITload(run_num) and NPload(run_num)

Objects Variables Comments

op13 (class13 PMop13 list) $pop113 $post113 Population13 and13 posterior13 predictions13 for13 each13 output13 equation13 ie13 113 213

13 $id Subject13 identiZication

13 $time Observation13 time13 in13 relative13 decimal13 hours

13 $obs Observation

13 $pred Prediction13 based13 on13 median13 of13 population13 or13 posterior13 parameter13 value13 distributions

Userrsquos13 Guide13 13 1913 13

Objects Variables Comments

13 $block Dosing13 block13 usually13 113 unless13 data13 Zile13 contains13 EVID=413 dose13 reset13 events13 in13 which13 case13 each13 such13 reset13 within13 a13 given13 ID13 will13 increment13 the13 dosing13 block13 by13 113 for13 that13 ID

13 $obsSD Calculated13 standard13 deviation13 (error)13 of13 the13 observation13 based13 on13 the13 assay13 error13 polynomial

13 $d Difference13 between13 pred13 and13 obs

13 $ds Squared13 difference13 between13 pred13 and13 obs

13 $wd $d13 weighted13 by13 the13 $obsSD

13 $wds $ds13 weighted13 by13 the13 $obsSD

Zinal13 (class13 PMZinal13 list) $popPoints (NPAG13 only)13 Dataframe13 of13 the13 Zinal13 cycle13 joint13 population13 density13 of13 grid13 points13 with13 column13 names13 equal13 to13 the13 name13 of13 each13 random13 parameter13 plus13 $prob13 for13 the13 associated13 probability13 of13 that13 point13

$popMean The13 Zinal13 cycle13 mean13 for13 each13 random13 parameter13 distribution

$popSD The13 Zinal13 cycle13 standard13 deviation13 for13 each13 random13 parameter13 distribution

$popCV The13 Zinal13 cycle13 coefZicient13 of13 variation13 for13 each13 random13 parameter13 distribution

$popVar The13 Zinal13 cycle13 variance13 for13 each13 random13 parameter13 distribution

$popCov The13 Zinal13 cycle13 covariance13 matrix13 for13 each13 random13 parameter13 distribution

$popCor The13 Zinal13 cycle13 correlation13 matrix13 for13 each13 random13 parameter13 distribution

$popMedian The13 Zinal13 cycle13 median13 for13 each13 random13 parameter13 distribution

$gridpts (NPAG13 only)13 The13 initial13 number13 of13 support13 points

$ab Matrix13 of13 boundaries13 for13 random13 parameter13 values13 13 For13 NPAG13 this13 is13 speciZied13 by13 the13 user13 prior13 to13 the13 run13 for13 IT2B13 it13 is13 calculated13 as13 a13 user13 speciZied13 multiple13 of13 the13 SD13 for13 the13 parameter13 value13 distribution

Userrsquos13 Guide13 13 2013 13

Objects Variables Comments

cycle13 (class13 PMcycle13 list) $names Vector13 of13 names13 of13 the13 random13 parameters

$ll Matrix13 of13 cycle13 number13 and13 -shy‐2Log-shy‐likelihood13 at13 each13 cycle

$gamlam A13 matrix13 of13 cycle13 number13 and13 gamma13 or13 lambda13 at13 each13 cycle13 (see13 item13 1613 under13 NPAG13 Runs13 below13 for13 a13 discussion13 of13 gamma13 and13 lambda)

$mean A13 matrix13 of13 cycle13 number13 and13 the13 mean13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 mean

$sd A13 matrix13 of13 cycle13 number13 and13 the13 standard13 deviation13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$median A13 matrix13 of13 cycle13 number13 and13 the13 median13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$aic A13 matrix13 of13 cycle13 number13 and13 Akaike13 Information13 Criterion13 at13 each13 cycle

$bic A13 matrix13 of13 cycle13 number13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle

cov13 (class13 PMcov13 dataframe)

$id Subject13 identiZication

$time Time13 for13 each13 covariate13 entry

covariates Covariate13 values13 for13 each13 subject13 at13 each13 time13 extracted13 from13 the13 raw13 data13 Zile

parameters Mean13 median13 or13 mode13 of13 Bayesian13 posterior13 distribution13 for13 each13 random13 parameter13 in13 the13 model13 13 Mode13 summaries13 are13 available13 for13 NPAG13 output13 only13 and13 the13 default13 is13 median13 13 Values13 are13 recycled13 for13 each13 row13 within13 a13 given13 subject13 with13 the13 number13 of13 rows13 driven13 by13 the13 number13 of13 covariate13 entries

Userrsquos13 Guide13 13 2113 13

Objects Variables Comments

pop13 (class13 PMpop13 dataframe)

post13 (class13 PMpost13 dataframe)

NPAG13 only

$id Subject13 identiZication

$pred113 Population13 prior13 (PMpop)13 or13 Bayesian13 posterior13 (PMpost)13 predictions13 for13 each13 output13 equation13 based13 on13 mean13 median13 and13 mode13 as13 speciZied13 by13 the13 user13 and13 with13 frequency13 also13 speciZied13 by13 the13 user13 in13 the13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

$block Same13 as13 for13 PMop13 objects13 above

NPdata13 (class13 NPAG13 list)13 ITdata13 (class13 IT2B13 list

Raw13 data13 used13 to13 make13 the13 above13 objects13 13 Please13 use13 NPparse13 or13 ITparse13 in13 R13 for13 discussion13 of13 the13 data13 contained13 in13 these13 objects

Since13 R13 is13 an13 object13 oriented13 language13 to13 access13 the13 observations13 in13 a13 PMop13 object13 for13 example13 use13 the13 following13 syntax13 op$post1$obsNote13 that13 you13 will13 place13 an13 integer13 within13 the13 parentheses13 of13 the13 loading13 functions13 eg13 NPload(1)13 which13 will13 sufZix13 all13 the13 above13 objects13 with13 that13 integer13 eg13 op113 Zinal113 NPdata113 13 This13 allows13 several13 models13 to13 be13 loaded13 into13 R13 simultaneously13 each13 with13 a13 unique13 sufZix13 and13 which13 can13 be13 compared13 with13 the13 PMcompare()13 command13 (see13 Model13 Diagnostics13 below)

Making New Pmetrics ObjectsOnce13 you13 have13 loaded13 the13 raw13 (NPdata13 or13 ITdata)13 or13 processed13 (op13 Uinal13 cycle13 pop13 post)13 data13 objects13 described13 above13 with13 NPload(run_num)13 or13 ITload(run_num)13 should13 you13 wish13 to13 remake13 the13 processed13 objects13 with13 parameters13 other13 than13 the13 defaults13 you13 can13 easily13 do13 so13 with13 the13 make 13 family13 of13 commands13 13 For13 example13 the13 default13 for13 PMop13 observed13 vs13 predicted13 objects13 is13 to13 use13 the13 prediction13 based13 on13 the13 median13 of13 the13 population13 or13 posterior13 distribution13 13 If13 you13 wish13 to13 use13 the13 mean13 of13 the13 distribution13 remake13 the13 PMop13 object13 using makeOP()13 13 If13 you13 wish13 to13 see13 all13 the13 cycle13 information13 in13 a13 PMcycle13 object13 not13 omitting13 the13 Zirst13 1013 of13 cycles13 by13 default13 remake13 it13 using13 makeCycle()13 13

For13 all13 of13 the13 following13 commands13 the13 data13 input13 is13 either13 NPdata13 or13 ITdata13 with13 additional13 function13 arguments13 speciZic13 to13 each13 command13 13 Accessing13 the13 help13 for13 each13 function13 in13 R13 will13 provide13 further13 details13 on13 the13 arguments13 defaults13 and13 output13 of13 each13 command

Userrsquos13 Guide13 13 2213 13

Command Description R13 help

makeAUC Make13 a13 dataframe13 of13 class13 PMauc13 containing13 subject13 ID13 and13 AUC13 from13 a13 variety13 of13 inputs13 including13 objects13 of13 PMop13 PMsim13 or13 a13 suitable13 dataframe

makeAUC

makeCov Generate13 a13 dataframe13 of13 class13 PMcov13 with13 subject-shy‐speciZic13 covariates13 extracted13 from13 the13 data13 csv13 Zile13 This13 object13 can13 be13 plotted13 and13 used13 to13 test13 for13 covariates13 which13 are13 signiZicantly13 associated13 with13 model13 parameters13 13

makeCov

makeCycle Create13 a13 PMcycle13 object13 described13 in13 the13 previous13 section makeCycle

makeFinal Create13 a13 PMZinal13 object13 described13 in13 the13 previous13 section makeFinal

makeOP Create13 a13 PMop13 object13 described13 in13 the13 previous13 section makeOP

makeNCA Create13 a13 dataframe13 (class13 PMnca)13 with13 the13 output13 of13 a13 non-shy‐compartmental13 analysis13 using13 PMpost13 and13 NPAG13 data13 objects13 as13 input13 13 The13 PMnca13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull auc13 Area13 under13 the13 time-shy‐observation13 curve13 using13 the13

trapezoidal13 approximation13 from13 time13 013 until13 the13 second13 dose13 or13 if13 only13 one13 dose13 until13 the13 last13 observation

bull aumc13 Area13 under13 the13 Zirst13 moment13 curvebull k13 Slope13 by13 least-shy‐squares13 linear13 regression13 of13 the13 Zinal13

613 log-shy‐transformed13 observations13 vs13 timebull auclast13 Area13 under13 the13 curve13 from13 the13 time13 of13 the13

last13 observation13 to13 inZinity13 calculated13 as13 [Final13 obs]kbull aumclast13 Area13 under13 the13 Zirst13 moment13 curve13 from13

the13 time13 of13 the13 last13 observation13 to13 inZinitybull aucinf13 Area13 under13 the13 curve13 from13 time13 013 to13 inZinity13

caluculated13 as13 auc13 +13 auclastbull aumcinf13 Area13 under13 the13 Zirst13 moment13 curve13 from13

time13 013 to13 inZinitybull mrt13 Mean13 residence13 time13 calculated13 as13 1kbull cmax13 Maximum13 predicted13 concentration13 after13 the13

Zirst13 dosebull tmax13 Time13 to13 cmaxbull cl13 Clearance13 calculated13 as13 doseaucinfbull vdss13 Volume13 of13 distribution13 at13 steady13 state13

calculated13 as13 clmrtbull thalf13 Half13 life13 of13 elimination13 calculated13 as13 ln(2)kbull dose13 First13 dose13 amount13 for13 each13 subject

makeNCA

Userrsquos13 Guide13 13 2313 13

Command Description R13 help

makeErrorPoly This13 function13 plots13 Zirst13 second13 and13 third13 order13 polynomial13 functions13 Zitted13 to13 pairs13 of13 observations13 and13 associated13 standard13 deviations13 for13 a13 given13 output13 assay13 In13 this13 way13 the13 standard13 deviation13 associated13 with13 any13 observation13 may13 be13 calculated13 and13 used13 to13 appropriately13 weight13 that13 observation13 in13 the13 model13 building13 process13 Observations13 are13 weighted13 by13 the13 reciprocal13 of13 the13 variance13 or13 squared13 standard13 deviation13 13 Output13 of13 the13 function13 is13 a13 plot13 of13 the13 measured13 observations13 and13 Zitted13 polynomial13 curves13 and13 a13 list13 with13 the13 Zirst13 second13 and13 third13 order13 coefZicients

makeErrorPoly

makePTA This13 function13 performs13 a13 Probability13 of13 Target13 Attainment13 analysis13 for13 a13 set13 of13 simulated13 doses13 and13 time-shy‐concentration13 proZiles13 13 Targets13 (eg13 Minimum13 Inhibitory13 Concentrations)13 the13 type13 of13 target13 attainment13 (ie13 time13 above13 target13 Cmaxtarget13 13 AUCtarget13 Cmintarget13 or13 Cxtarget13 where13 x13 is13 any13 time13 point)13 and13 the13 success13 threshold13 (eg13 time13 gt13 0713 or13 Cmaxtarget13 gt13 10)13 can13 all13 be13 speciZied13 13 Output13 is13 a13 list13 (class13 PMpta)13 with13 two13 objectsbull Results13 a13 413 dimensional13 array13 with13 dimension13 size13 of13

[number13 of13 doses13 number13 of13 targets13 number13 of13 simulated13 proZiles13 1]13 which13 gives13 the13 target13 attainment13 (eg13 Cmaxtarget)13 for13 each13 dose13 target13 and13 proZile

bull Outcome13 For13 each13 dose13 and13 target13 a13 summary13 of13 the13 target13 attainment13 for13 all13 the13 proZiles13 including13 mean13 standard13 deviation13 and13 proportion13 above13 the13 success13 threshold

PMpta13 objects13 can13 be13 summarized13 with13 summary(x)13 and13 plotted13 with13 plot(x)13

makePTA

Userrsquos13 Guide13 13 2413 13

Command Description R13 help

makePopmakePost(NPAG13 only)

These13 functions13 create13 dataframes13 of13 class13 PMpop13 and13 PMpost13 respectively13 13 The13 PMpop13 or13 PMpost13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull time13 Times13 for13 predicted13 concentrations13 13 These13

times13 are13 not13 necessarily13 at13 observed13 times13 but13 at13 a13 frequency13 speciZied13 in13 the13 NPAG13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

bull pred113 Predictions13 for13 output13 113 13 For13 PMpop13 objects13 predictions13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 population13 prior13 distribution13 13 For13 PMpost13 objects13 they13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject

bull pred213 pred313 etc13 If13 additional13 outputs13 exist13 they13 will13 each13 be13 columns13 in13 the13 dataframe13 just13 as13 for13 pred113 13

makePopmakePost

NPAG RunsIn13 the13 past13 users13 had13 to13 run13 NPAG13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 NPrun()13 13 However13 if13 NPrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable

1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 NPAG13 creates13 a13 temporary13 instruction13 Zile13 in13 case13 something13 happens13 so13 that13 instructions13 entered13 to13 date13 can13

be13 recovered13 13 Accept13 the13 default13 by13 choosing13 113 13 You13 can13 save13 with13 a13 meaningful13 Zilename13 later13 13 If13 it13 already13 exists13 you13 will13 be13 asked13 if13 you13 wish13 to13 overwrite13 the13 Zile13 which13 is13 usually13 the13 thing13 to13 do

Userrsquos13 Guide13 13 2513 13

8 If13 you13 have13 previously13 run13 IT2B13 you13 can13 automatically13 import13 the13 suggested13 parameter13 ranges13 13 Choose13 113 to13 do13 this13 and13 013 to13 run13 NPAG13 without13 a13 previous13 IT2B13 run81 If13 you13 choose13 option13 113 you13 must13 specify13 the13 name13 of13 a13 FROMxxxx13 Zile13 typically13 FROM000113 that13 you13 can13

Zind13 in13 an13 output13 directory13 after13 a13 successful13 IT2B13 run13 13 Note13 that13 the13 program13 will13 then13 assume13 that13 you13 are13 using13 the13 same13 wrk13 Ziles13 that13 IT2B13 made13 from13 your13 data13 csv13 Zile13 13 It13 is13 strongly13 recommended13 to13 override13 this13 and13 specify13 a13 data13 csv13 Zile13 13 At13 this13 point13 you13 will13 jump13 to13 1013 below13 and13 continue13 on13 however13 your13 answers13 will13 often13 be13 supplied13 by13 the13 instructions13 contained13 in13 the13 FROMxxxx13 Zile13 and13 you13 need13 merely13 conZirm13 them

9 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13 have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 NPrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis91 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13

for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

10 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 NPAG13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

11 Enter13 the13 name13 of13 your13 csv13 Zile13 now12 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile13 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset131 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects132 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry14 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset15 Enter13 the13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo 13 followed13 by13

return16 Select13 how13 you13 would13 like13 to13 model13 assay13 (observation)13 error13 for13 each13 output13 equation13 13 You13 have13 four13 choices13 13

In13 all13 four13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0161 Error13 model13 113 (SD)13 13 Choose13 this13 option13 if13 you13 have13 already13 run13 IT2B13 and13 multiplied13 your13 assay13 error13

polynomial13 by13 gamma13 (see13 next13 option13 for13 a13 description13 of13 gamma)162 Error13 model13 213 (SD13 13 gamma)13 13 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13

observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 If13 you13 choose13 this13 option13 you13 then13 can13 specify13 the13 starting13 value13 of13 gamma13 13 Good13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality

163 Error13 model13 313 (SD213 +13 lamda2)0513 13 Lamda13 is13 an13 alternative13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present

Userrsquos13 Guide13 13 2613 13

164 Error13 model13 413 SD13 =13 gamma13 13 This13 model13 is13 rarely13 used13 and13 is13 equivalent13 to13 specifying13 a13 model13 with13 C013 only13 ie13 a13 constant13 error13 regardless13 of13 concentration

17 Once13 you13 select13 the13 assay13 error13 model13 for13 each13 output13 equation13 you13 are13 then13 offered13 four13 more13 options13 on13 which13 assay13 error13 polynomial13 coefZicients13 to13 use13 13 Choices13 113 and13 213 are13 the13 most13 commonly13 used171 Choice13 113 The13 default13 13 Use13 coefZicients13 in13 the13 subject13 record13 (C013 C113 C213 C313 in13 the13 data13 csv13 Zile)13 and13 if13

missing13 use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 (item13 1813 below)172 Choice13 213 Use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 for13 all13 subjects13 regardless13 of13 what13 is13 in13 the13

data13 csv13 Zile173 Choice13 313 13 To13 multiply13 data13 csv13 values13 and13 default13 entered13 values13 by13 a13 Zixed13 gamma13 and13 use13 them13 13 174 Choice13 013 Specify13 coefZicients13 on13 a13 subject13 by13 subject13 basis13 either13 those13 in13 the13 data13 csv13 Zile13 already13 the13

default13 values13 entered13 into13 the13 program13 or13 other13 values18 For13 each13 output13 equation13 after13 you13 have13 selected13 the13 option13 in13 item13 1713 you13 will13 be13 prompted13 to13 supply13 the13

required13 information13 including13 the13 general13 default13 values13 for13 missing13 or13 overridden13 values13 in13 the13 data13 csv13 Zile19 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13

usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13

20 Enter13 the13 grid13 point13 index13 13 This13 number13 corresponds13 to13 the13 number13 of13 grid13 (support)13 points13 which13 will13 initially13 Zill13 the13 model13 parameter13 space13 13 The13 larger13 the13 number13 of13 random13 parameters13 to13 be13 estimated13 the13 more13 points13 are13 required13 13 The13 program13 will13 make13 a13 suggestion13 based13 on13 the13 number13 of13 random13 parameters13 in13 the13 model13 13 The13 more13 you13 choose13 the13 slower13 the13 run13 will13 be13 but13 results13 may13 improve13 13 It13 is13 reasonable13 to13 choose13 fewer13 points13 early13 in13 model13 exploration13 and13 increase13 in13 later13 phases13 or13 if13 poor13 model13 Zits13 or13 lack13 of13 convergence13 are13 noted13 The13 choices13 are13 113 to13 713 corresponding13 respectively13 to13 212913 500313 1000713 2001113 4000913 and13 8002113 points13 13 If13 you13 choose13 713 you13 then13 have13 an13 additional13 choice13 to13 select13 one13 or13 more13 multiples13 of13 8002113 points

21 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 013 or13 greater13 13 If13 you13 enter13 an13 integer13 greater13 than13 013 the13 engine13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13 If13 you13 enter13 013 this13 is13 the13 way13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 an13 independent13 data13 set13 and13 a13 non-shy‐uniform13 prior13 must13 be13 speciZied13 (see13 3013 below)13 13 This13 means13 that13 the13 engine13 will13 only13 calculate13 the13 individual13 Bayesian13 posteriors13 for13 the13 new13 subjects13 using13 the13 population13 joint13 density13 from13 a13 previous13 run13 as13 a13 Bayesian13 prior

22 Information13 about13 convergence13 criteria13 13 Answer13 113 or13 some13 other13 keystroke13 plus13 Return13 to13 acknowledge13 that13 you13 have13 read13 it

23 In13 order13 to13 predict13 concentrations13 from13 a13 non-shy‐parametric13 distribution13 you13 have13 the13 option13 to13 use13 the13 1)13 mean13 2)13 median13 or13 3)13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject13 13 We13 typically13 use13 the13 median13 Zirst13 and13 then13 the13 mean13 in13 a13 separate13 run13 and13 compare13 the13 differences13 13

24 Select13 the13 time13 interval13 to13 generate13 predicted13 concentrations13 13 Additionally13 there13 will13 also13 be13 predictions13 made13 at13 the13 time13 of13 each13 observation13 13 In13 general13 for13 most13 models13 predictions13 every13 1213 minutes13 provide13 sufZicient13 granularity13 13 Smaller13 values13 can13 result13 in13 very13 large13 Ziles13 for13 big13 populations

25 Select13 the13 default13 MIC13 to13 be13 used13 for13 AUCMIC13 ratio13 reporting13 13 This13 should13 generally13 be13 set13 to13 the13 default13 of13 113 by13 choosing13 113 13 You13 can13 always13 extract13 the13 AUC13 later13 and13 divide13 it13 by13 any13 MIC13 you13 choose

26 Enter13 the13 value13 in13 hours13 that13 you13 want13 for13 calculations13 of13 AUCs13 from13 predicted13 concentration13 proZiles13 13 The13 default13 is13 2413 hours13 which13 you13 can13 accept13 by13 entering13 113 or13 013 if13 you13 want13 to13 specify13 a13 different13 interval

27 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

28 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

Userrsquos13 Guide13 13 2713 13

29 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

30 For13 the13 prior13 density13 choose13 113 if13 it13 is13 to13 be13 uniform13 13 This13 means13 that13 the13 initial13 grid13 points13 will13 be13 evenly13 distributed13 with13 equal13 probability13 within13 the13 boundaries13 speciZied13 (in13 1513 above)13 13 If13 you13 choose13 013 you13 will13 be13 prompted13 for13 the13 name13 of13 a13 Zile13 that13 contains13 the13 prior13 density13 13 This13 will13 be13 DEN000113 unless13 you13 have13 changed13 its13 name13 13 It13 will13 be13 found13 in13 the13 output13 directory13 of13 a13 prior13 NPAG13 run13 13 The13 model13 used13 to13 generate13 the13 DEN000113 Zile13 must13 be13 exactly13 the13 same13 as13 the13 current13 model13 including13 parameter13 boundaries13 13 However13 this13 option13 is13 useful13 to13 specify13 a13 non-shy‐uniform13 density13 for13 two13 reasons13 13 The13 Zirst13 is13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 a13 new13 set13 of13 subjects13 13 Do13 this13 in13 combination13 with13 setting13 the13 number13 of13 cycles13 to13 013 (see13 2113 above)13 13 The13 second13 use13 for13 a13 non-shy‐uniform13 prior13 is13 to13 continue13 a13 previous13 run13 13 For13 example13 if13 you13 only13 set13 the13 number13 of13 cycles13 to13 5013 to13 get13 a13 rough13 idea13 of13 model13 Zit13 you13 may13 continue13 where13 you13 left13 off13 by13 specifying13 the13 DEN000113 Zile13 from13 the13 50-shy‐cycle13 run13 and13 continuing13 with13 as13 many13 additional13 cycles13 as13 you13 specify13 in13 item13 2113 13 So13 in13 the13 example13 if13 you13 specify13 10013 cycles13 in13 2113 the13 total13 number13 of13 cycles13 will13 be13 5013 +13 10013 =13 150

31 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 NPrun(instr=ldquoyourfilerdquo)13 option13 and13 including13 ldquoyourZilerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

32 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 NPAG13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 NPAG13 analysis

33 The13 NPAG13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

IT2B RunsIn13 the13 past13 users13 had13 to13 run13 IT2B13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 ITrun()13 13 However13 if13 ITrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13

have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 ITrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis

Userrsquos13 Guide13 13 2813 13

71 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13 for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

8 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 IT2B13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

9 Enter13 the13 name13 of13 your13 csv13 Zile13 now10 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile11 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset111 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects112 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry12 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset13 Enter13 the13 initial13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo13 followed13

by13 return14 The13 estimated13 mean13 for13 each13 parameter13 value13 distribution13 during13 the13 Zirst13 iteration13 will13 be13 the13 median13 of13 the13

range13 speciZied13 in13 1313 13 You13 now13 have13 the13 option13 to13 specify13 the13 standard13 deviation13 for13 the13 parameter13 value13 distribution13 which13 by13 default13 is13 half13 of13 the13 range13 in13 1313 13 Choose13 113 to13 accept13 this13 (the13 usual13 answer)13 or13 013 to13 change13 it13 to13 something13 else13 expressed13 as13 a13 multiple13 of13 the13 range

15 In13 IT2B13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 You13 can13 now13 choose13 113 if13 every13 subject13 has13 the13 same13 coefZicients13 or13 013 to13 use13 a13 unique13 set13 of13 coefZicients13 for13 each13 subject13 13 The13 Zirst13 case13 is13 the13 more13 usual13 when13 all13 13 samples13 from13 all13 subjects13 are13 analyzed13 in13 the13 same13 lab13 13 If13 13 samples13 are13 analyzed13 in13 different13 labs13 and13 you13 have13 the13 assay13 data13 from13 each13 lab13 then13 you13 would13 enter13 013 13 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 (see13 151313 below)13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0151 If13 you13 choose13 113 (one13 set13 of13 coefZicients13 for13 all13 subjects)13 you13 will13 then13 be13 presented13 with13 313 additional13

choices1511 Choice13 113 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13 observation13

including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 and13 to13 Zix13 gamma13 to13 1

1512 Choice13 213 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 but13 to13 estimate13 gamma13 based13 on13 the13 data13 13 This13 is13 the13 usual13 option

1513 Choice13 313 Choose13 this13 option13 if13 you13 wish13 to13 estimate13 the13 assay13 error13 coefZicients13 based13 on13 your13 data13 for13 use13 in13 future13 runs13 13 Although13 you13 can13 access13 this13 option13 by13 using13 either13 ITrun()13 or13 ERRrun()13 in13 R13 the13 instruction13 Ziles13 that13 you13 save13 and13 the13 generated13 output13 Ziles13 will13 be13 different13 13 Therefore13 we13 recommend13 that13 if13 you13 intend13 to13 choose13 this13 option13 use13 ERRrun()13 in13 R13 which13 will13 generate13 an13 ASS000113 Zile13 that13 contains13 the13 estimates13 for13 C013 C113 C213 and13 C313 13 You13 can13 then13 include13 this13 Zile13 in13 the13 working13 directory13 (along13 with13 a13 model13 txt13 Zile13 and13 a13 data13 csv13 Zile)13 to13 do13 an13 IT2B13 run13 supplying13 the13 Zile13 name13 in13 16113 below

Userrsquos13 Guide13 13 2913 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly() 13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0In13 the13 multiplicative13 model13 13 gamma13 is13 a13 scalar13 on13 SD13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 Lambda13 is13 an13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 We13 tend13 to13 prefer13 lambda

To13 specify13 the13 model13 in13 this13 block13 the13 Zirst13 line13 needs13 to13 be13 either13 L=[number]13 or13 G=[number]13 for13 a13 lambda13 or13 gamma13 error13 model13 13 The13 [number]13 term13 is13 the13 starting13 value13 for13 lambda13 or13 gamma13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present13 13 For13 gamma13 good13 starting13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality13 13 If13 you13 include13 an13 exclamation13 point13 ()13 in13 the13 declaration13 then13 lambda13 or13 gamma13 will13 be13 Zixed13 and13 not13 estimated13 13 Note13 that13 you13 can13 only13 Zix13 lambda13 currently13 to13 zeroThe13 next13 line(s)13 contain13 the13 values13 for13 C013 C113 C213 and13 C313 separated13 by13 commas13 13 There13 should13 be13 one13 line13 of13 coefZicients13 for13 each13 output13 equation13 13 By13 default13 Pmetrics13 will13 use13 values13 for13 these13 coefZicients13 found13 in13 the13 data13 Zile13 13 If13 none13 are13 present13 or13 if13 the13 model13 declaration13 line13 contains13 an13 exclamation13 point13 ()13 the13 values13 here13 will13 be13 used

Example13 113 estimated13 lambda13 starting13 at13 0413 one13 output13 use13 data13 Zile13 coefZicients13 but13 if13 missing13 use13 010100ErrL=04010100

Example13 213 Zixed13 gamma13 of13 213 two13 outputs13 use13 data13 Zile13 coefZicients13 but13 if13 missing13 use13 01010013 for13 the13 Zirst13 output13 but13 use13 0313 0113 013 013 for13 output13 213 regardless13 of13 what13 is13 in13 the13 data13 ZileErrG=2010100030100

Extra

This13 block13 is13 for13 advanced13 Fortran13 programmers13 only13 13 Occasionally13 for13 very13 complex13 models13 additional13 Fortran13 subroutines13 are13 required13 13 They13 can13 be13 placed13 here13 13 The13 code13 must13 specify13 complete13 Fortran13 subroutines13 which13 can13 be13 called13 from13 other13 blocks13 with13 appropriate13 call13 functions13 13

Reserved13 Names

The13 following13 cannot13 be13 used13 as13 primary13 covariate13 or13 secondary13 variable13 names13 They13 can13 be13 used13 in13 equations13 however

Reserved13 Variable Func1on13 in13 Pmetricsndim internal

t time

Userrsquos13 Guide13 13 1413 13

x array13 of13 compartment13 amounts

xp array13 of13 Zirst13 derivative13 of13 compartment13 amounts

rpar internal

ipar internal

p array13 of13 primary13 parameters

r input13 rates

b input13 boluses

npl internal

numeqt output13 equation13 number

ndrug input13 number

nadd covariate13 number

rateiv intravenous13 input13 for13 inputs13 when13 DURgt013 in13 data13 Ziles

cv covariate13 values13 array

n number13 of13 compartments

nd internal

ni internal

nup internal

nuic internal

np number13 of13 primary13 parameters

nbcomp bolus13 compartment13 array

psym names13 of13 primary13 parameters

fa biovailability

tlag lag13 time

tin internal

tout internal

Complete13 Example

Here13 is13 a13 complete13 example13 of13 a13 model13 Zile13 as13 of13 Pmetrics13 version13 04013 and13 higher

Userrsquos13 Guide13 13 1513 13

NotesBy13 omitting13 a13 Diffeq13 block13 with13 ODEs13 Pmetrics13 understands13 that13 you13 are13 specifying13 the13 model13 to13 be13 solved13 algebraically13 In13 this13 case13 at13 least13 KE13 and13 V13 must13 be13 in13 the13 Primary13 or13 Secondary13 variables13 KA13 KCP13 and13 KPC13 are13 optional13 and13 specify13 absorption13 and13 transfer13 to13 and13 from13 the13 central13 to13 a13 peripheral13 compartment13 respectively

PriKE13 013 5V013 0113 100KA13 013 5Tlag113 013 3Cov13 wt

SecV13 =13 V0wt

LagTLAG(1)13 =13 Tlag1

OutY(1)13 =13 X(2)V

ErrL=04010100

Userrsquos13 Guide13 13 1613 13

Brief13 Fortran13 Tutorial

Much13 more13 detailed13 help13 is13 available13 from13 httpwwwcsmtuedu~sheneCOURSEScs201NOTESfortranhtml

Arithmetic Operator Meaning

+ addition

- subtraction

multiplication

division

exponentiation

Relational Operator Alternative Operator Meaning

lt LT less than

lt= LE less than or equal

gt GT greater than

gt= GE greater than or equal

== EQ equal

= NE not equal

Selective Execution Example

IF (logical-expression) one-statement IF (T gt= 100) CL = 10

IF (logical-expression) THEN statementsEND IF

IF (T gt= 100) THEN CL = 10 V = 10END IF

IF (logical-expression) THEN statements-1ELSE statements-2END IF

IF (T gt= 100) THEN CL = 10ELSE CL = CLEND IF

Userrsquos13 Guide13 13 1713 13

How to use R and PmetricsSeCng13 up13 a13 Pmetrics13 project

When13 beginning13 a13 new13 modeling13 project13 it13 is13 convenient13 to13 use13 the13 command13 PMtree(ldquoproject namerdquo)13 13 This13 command13 will13 set13 up13 a13 new13 directory13 in13 the13 current13 working13 directory13 named13 whatever13 you13 have13 included13 as13 the13 ldquoproject13 namerdquo13 13 For13 example13 a13 directory13 called13 ldquoDrugXrdquo13 will13 be13 created13 by13 PMtree(ldquoDrugXrdquo)13 13 Beneath13 this13 directory13 several13 subdirectories13 will13 be13 also13 created13 Rscript13 Runs13 Sim13 and13 src13 13 The13 Rscript13 subdirectory13 will13 contain13 a13 skeleton13 R13 script13 to13 begin13 Pmetrics13 runs13 in13 the13 new13 project13 13 The13 Runs13 subdirectory13 should13 contain13 all13 Ziles13 required13 for13 a13 run13 (described13 next)13 and13 it13 will13 also13 contain13 the13 resulting13 numerically13 ordered13 run13 directories13 created13 after13 each13 Pmetrics13 NPAG13 or13 IT2B13 run13 13 The13 Sim13 subdirectory13 can13 contain13 any13 Ziles13 related13 to13 simulations13 and13 the13 src13 subdirectory13 should13 contain13 original13 and13 manipulated13 source13 data13 Ziles13 13 Of13 course13 you13 are13 free13 to13 edit13 this13 directory13 tree13 structure13 as13 you13 please13 or13 make13 your13 own13 entirely

GeCng13 the13 required13 files13 to13 run13 Pmetrics

When13 you13 wish13 to13 execute13 a13 Pmetrics13 run13 you13 must13 ensure13 that13 appropriate13 Pmetrics13 model13 txt13 and13 data13 csv13 Ziles13 are13 in13 the13 working13 directory13 ie13 the13 Runs13 subdirectory13 of13 the13 project13 directory13 13 13 13 R13 can13 be13 used13 to13 help13 prepare13 the13 data13 csv13 Zile13 by13 importing13 and13 manipulating13 spreadsheets13 (eg13 readcsv())13 13 The13 Pmetrics13 function13 PMcheck()13 can13 be13 used13 to13 check13 a13 csv13 Zile13 or13 an13 R13 dataframe13 that13 is13 to13 be13 saved13 as13 a13 Pmetrics13 data13 13 csv13 Zile13 for13 errors13 13 13 13 13 13 It13 can13 also13 check13 a13 model13 Zile13 for13 errors13 in13 the13 context13 of13 a13 dataZile13 eg13 covariates13 that13 do13 not13 match13 13 PMfixMatrix()13 attempts13 to13 automatically13 rid13 data13 Ziles13 of13 errors13 13 The13 function13 PMwriteMatrix() 13 can13 be13 used13 to13 write13 the13 R13 data13 object13 in13 the13 correct13 format13 for13 use13 by13 IT2B13 NPAG13 or13 the13 Simulator13 13 You13 can13 also13 download13 sample13 data13 and13 scripts13 from13 the13 Pmetrics13 downloads13 section13 of13 our13 website13 once13 you13 sign13 in13 with13 your13 LAPK13 user13 email13 address13 and13 password13 13 Edit13 prior13 versions13 of13 model13 Ziles13 to13 make13 new13 model13 Ziles

Using13 scripts13 to13 control13 Pmetrics

As13 you13 will13 see13 in13 the13 skeleton13 R13 script13 made13 by13 PMtree() and13 placed13 in13 the13 Rscript13 subdirectory13 if13 this13 is13 a13 Zirst-shy‐time13 run13 the13 R13 commands13 to13 run13 IT2B13 or13 NPAG13 are13 as13 follows13 13 Recall13 that13 the13 ldquordquo13 character13 is13 a13 comment13 character

library(Pmetrics)Run 1 - add your run description heresetwd(ldquoworking directoryrdquo)NPrun() for NPAG or ITrun() for IT2B

The13 Zirst13 line13 will13 load13 the13 Pmetrics13 library13 of13 functions13 13 The13 second13 line13 sets13 the13 working13 directory13 to13 the13 speciZied13 path13 13 The13 third13 line13 generates13 the13 batch13 Zile13 to13 run13 NPAG13 or13 IT2B13 and13 saves13 it13 to13 the13 working13 directory13

NOTE13 13 On13 Mac13 systems13 the13 batch13 Zile13 will13 be13 automatically13 launched13 in13 a13 Terminal13 window13 13 On13 Windows13 systems13 the13 batch13 Zile13 must13 be13 launched13 manually13 by13 double13 clicking13 the13 np_runbat13 or13 it_runbat13 Zile13 in13 the13 working13 directory

ITrun() 13 and13 NPrun()13 both13 return13 the13 full13 path13 of13 the13 output13 directory13 to13 the13 clipboard13 13 By13 default13 runs13 are13 placed13 in13 folders13 numbered13 sequentially13 beginning13 with13 ldquo1rdquoNow13 the13 output13 of13 IT2B13 or13 NPAG13 needs13 to13 be13 loaded13 into13 R13 so13 the13 next13 command13 does13 this

NPload(run_number) or ITload(run_number)

Details13 of13 these13 commands13 and13 what13 is13 loaded13 are13 described13 in13 the13 R13 documentation13 (NPload 13 or13 ITload)13 and13 in13 the13 following13 section13 13 The13 run_number13 should13 be13 included13 within13 the13 parentheses13 to13 be13 appended13 to13 the13 names13

Userrsquos13 Guide13 13 1813 13

of13 loaded13 R13 objects13 allowing13 for13 comparison13 between13 runs13 eg13 NPload(1)13 13 Finally13 at13 this13 point13 other13 Pmetrics13 commands13 can13 be13 added13 to13 the13 script13 to13 process13 the13 data13 such13 as13 the13 following

plot(final1)plot(cycle1)plot(op1type=rdquopoprdquo) or plot(op1$pop1)plot(op1) default is to plot posterior predictions for output 1plot(op1type=rdquopoprdquoresid=T)

Of13 course13 the13 full13 power13 of13 R13 can13 be13 used13 in13 scripts13 to13 analyze13 data13 but13 these13 simple13 statements13 serve13 as13 examplesIf13 you13 do13 not13 use13 the13 PMtree() structure13 we13 suggest13 that13 the13 R13 script13 for13 a13 particular13 project13 be13 saved13 into13 a13 folder13 called13 ldquoRscriptrdquo13 or13 some13 other13 meaningful13 name13 in13 the13 working13 directory13 13 Folders13 are13 not13 be13 moved13 by13 the13 batch13 Zile13 13 Within13 the13 script13 number13 runs13 sequentially13 and13 use13 comments13 liberally13 to13 13 distinguish13 runs13 as13 shown13 below

library(Pmetrics)

Run 1 - Ka Kel V all subjectssetwd(ldquoworking directoryrdquo)NPrun() assumes model=rdquomodeltxtrdquo and data=rdquodatacsvrdquoNPload(1)

Remember13 in13 R13 that13 the13 command13 example(function) will13 provide13 examples13 for13 the13 speciZied13 function13 13 Most13 Pmetrics13 functions13 have13 examples

Pmetrics Data ObjectsAfter13 a13 successful13 IT2B13 or13 NPAG13 run13 an13 R13 dataZile13 is13 saved13 in13 the13 output13 subdirectory13 of13 the13 newly13 created13 numerically13 ordered13 folder13 in13 the13 working13 directory13 13 After13 IT2B13 this13 Zile13 is13 called13 ldquoIT2BoutRdatardquo13 and13 after13 NPAG13 it13 is13 called13 ldquoNPAGoutRdatardquo13 13 As13 mentioned13 in13 the13 previous13 section13 these13 data13 Ziles13 can13 be13 loaded13 by13 ensuring13 that13 the13 Runs13 folder13 is13 set13 as13 the13 working13 directory13 and13 then13 using13 the13 Pmetrics13 commands13 ITload(run_num)13 or13 NPload(run_num)

Both13 commands13 load13 their13 respective13 Rdata13 Ziles13 into13 R13 making13 the13 contained13 objects13 available13 for13 plotting13 and13 other13 analysisObjects13 loaded13 by13 ITload(run_num) and NPload(run_num)

Objects Variables Comments

op13 (class13 PMop13 list) $pop113 $post113 Population13 and13 posterior13 predictions13 for13 each13 output13 equation13 ie13 113 213

13 $id Subject13 identiZication

13 $time Observation13 time13 in13 relative13 decimal13 hours

13 $obs Observation

13 $pred Prediction13 based13 on13 median13 of13 population13 or13 posterior13 parameter13 value13 distributions

Userrsquos13 Guide13 13 1913 13

Objects Variables Comments

13 $block Dosing13 block13 usually13 113 unless13 data13 Zile13 contains13 EVID=413 dose13 reset13 events13 in13 which13 case13 each13 such13 reset13 within13 a13 given13 ID13 will13 increment13 the13 dosing13 block13 by13 113 for13 that13 ID

13 $obsSD Calculated13 standard13 deviation13 (error)13 of13 the13 observation13 based13 on13 the13 assay13 error13 polynomial

13 $d Difference13 between13 pred13 and13 obs

13 $ds Squared13 difference13 between13 pred13 and13 obs

13 $wd $d13 weighted13 by13 the13 $obsSD

13 $wds $ds13 weighted13 by13 the13 $obsSD

Zinal13 (class13 PMZinal13 list) $popPoints (NPAG13 only)13 Dataframe13 of13 the13 Zinal13 cycle13 joint13 population13 density13 of13 grid13 points13 with13 column13 names13 equal13 to13 the13 name13 of13 each13 random13 parameter13 plus13 $prob13 for13 the13 associated13 probability13 of13 that13 point13

$popMean The13 Zinal13 cycle13 mean13 for13 each13 random13 parameter13 distribution

$popSD The13 Zinal13 cycle13 standard13 deviation13 for13 each13 random13 parameter13 distribution

$popCV The13 Zinal13 cycle13 coefZicient13 of13 variation13 for13 each13 random13 parameter13 distribution

$popVar The13 Zinal13 cycle13 variance13 for13 each13 random13 parameter13 distribution

$popCov The13 Zinal13 cycle13 covariance13 matrix13 for13 each13 random13 parameter13 distribution

$popCor The13 Zinal13 cycle13 correlation13 matrix13 for13 each13 random13 parameter13 distribution

$popMedian The13 Zinal13 cycle13 median13 for13 each13 random13 parameter13 distribution

$gridpts (NPAG13 only)13 The13 initial13 number13 of13 support13 points

$ab Matrix13 of13 boundaries13 for13 random13 parameter13 values13 13 For13 NPAG13 this13 is13 speciZied13 by13 the13 user13 prior13 to13 the13 run13 for13 IT2B13 it13 is13 calculated13 as13 a13 user13 speciZied13 multiple13 of13 the13 SD13 for13 the13 parameter13 value13 distribution

Userrsquos13 Guide13 13 2013 13

Objects Variables Comments

cycle13 (class13 PMcycle13 list) $names Vector13 of13 names13 of13 the13 random13 parameters

$ll Matrix13 of13 cycle13 number13 and13 -shy‐2Log-shy‐likelihood13 at13 each13 cycle

$gamlam A13 matrix13 of13 cycle13 number13 and13 gamma13 or13 lambda13 at13 each13 cycle13 (see13 item13 1613 under13 NPAG13 Runs13 below13 for13 a13 discussion13 of13 gamma13 and13 lambda)

$mean A13 matrix13 of13 cycle13 number13 and13 the13 mean13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 mean

$sd A13 matrix13 of13 cycle13 number13 and13 the13 standard13 deviation13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$median A13 matrix13 of13 cycle13 number13 and13 the13 median13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$aic A13 matrix13 of13 cycle13 number13 and13 Akaike13 Information13 Criterion13 at13 each13 cycle

$bic A13 matrix13 of13 cycle13 number13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle

cov13 (class13 PMcov13 dataframe)

$id Subject13 identiZication

$time Time13 for13 each13 covariate13 entry

covariates Covariate13 values13 for13 each13 subject13 at13 each13 time13 extracted13 from13 the13 raw13 data13 Zile

parameters Mean13 median13 or13 mode13 of13 Bayesian13 posterior13 distribution13 for13 each13 random13 parameter13 in13 the13 model13 13 Mode13 summaries13 are13 available13 for13 NPAG13 output13 only13 and13 the13 default13 is13 median13 13 Values13 are13 recycled13 for13 each13 row13 within13 a13 given13 subject13 with13 the13 number13 of13 rows13 driven13 by13 the13 number13 of13 covariate13 entries

Userrsquos13 Guide13 13 2113 13

Objects Variables Comments

pop13 (class13 PMpop13 dataframe)

post13 (class13 PMpost13 dataframe)

NPAG13 only

$id Subject13 identiZication

$pred113 Population13 prior13 (PMpop)13 or13 Bayesian13 posterior13 (PMpost)13 predictions13 for13 each13 output13 equation13 based13 on13 mean13 median13 and13 mode13 as13 speciZied13 by13 the13 user13 and13 with13 frequency13 also13 speciZied13 by13 the13 user13 in13 the13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

$block Same13 as13 for13 PMop13 objects13 above

NPdata13 (class13 NPAG13 list)13 ITdata13 (class13 IT2B13 list

Raw13 data13 used13 to13 make13 the13 above13 objects13 13 Please13 use13 NPparse13 or13 ITparse13 in13 R13 for13 discussion13 of13 the13 data13 contained13 in13 these13 objects

Since13 R13 is13 an13 object13 oriented13 language13 to13 access13 the13 observations13 in13 a13 PMop13 object13 for13 example13 use13 the13 following13 syntax13 op$post1$obsNote13 that13 you13 will13 place13 an13 integer13 within13 the13 parentheses13 of13 the13 loading13 functions13 eg13 NPload(1)13 which13 will13 sufZix13 all13 the13 above13 objects13 with13 that13 integer13 eg13 op113 Zinal113 NPdata113 13 This13 allows13 several13 models13 to13 be13 loaded13 into13 R13 simultaneously13 each13 with13 a13 unique13 sufZix13 and13 which13 can13 be13 compared13 with13 the13 PMcompare()13 command13 (see13 Model13 Diagnostics13 below)

Making New Pmetrics ObjectsOnce13 you13 have13 loaded13 the13 raw13 (NPdata13 or13 ITdata)13 or13 processed13 (op13 Uinal13 cycle13 pop13 post)13 data13 objects13 described13 above13 with13 NPload(run_num)13 or13 ITload(run_num)13 should13 you13 wish13 to13 remake13 the13 processed13 objects13 with13 parameters13 other13 than13 the13 defaults13 you13 can13 easily13 do13 so13 with13 the13 make 13 family13 of13 commands13 13 For13 example13 the13 default13 for13 PMop13 observed13 vs13 predicted13 objects13 is13 to13 use13 the13 prediction13 based13 on13 the13 median13 of13 the13 population13 or13 posterior13 distribution13 13 If13 you13 wish13 to13 use13 the13 mean13 of13 the13 distribution13 remake13 the13 PMop13 object13 using makeOP()13 13 If13 you13 wish13 to13 see13 all13 the13 cycle13 information13 in13 a13 PMcycle13 object13 not13 omitting13 the13 Zirst13 1013 of13 cycles13 by13 default13 remake13 it13 using13 makeCycle()13 13

For13 all13 of13 the13 following13 commands13 the13 data13 input13 is13 either13 NPdata13 or13 ITdata13 with13 additional13 function13 arguments13 speciZic13 to13 each13 command13 13 Accessing13 the13 help13 for13 each13 function13 in13 R13 will13 provide13 further13 details13 on13 the13 arguments13 defaults13 and13 output13 of13 each13 command

Userrsquos13 Guide13 13 2213 13

Command Description R13 help

makeAUC Make13 a13 dataframe13 of13 class13 PMauc13 containing13 subject13 ID13 and13 AUC13 from13 a13 variety13 of13 inputs13 including13 objects13 of13 PMop13 PMsim13 or13 a13 suitable13 dataframe

makeAUC

makeCov Generate13 a13 dataframe13 of13 class13 PMcov13 with13 subject-shy‐speciZic13 covariates13 extracted13 from13 the13 data13 csv13 Zile13 This13 object13 can13 be13 plotted13 and13 used13 to13 test13 for13 covariates13 which13 are13 signiZicantly13 associated13 with13 model13 parameters13 13

makeCov

makeCycle Create13 a13 PMcycle13 object13 described13 in13 the13 previous13 section makeCycle

makeFinal Create13 a13 PMZinal13 object13 described13 in13 the13 previous13 section makeFinal

makeOP Create13 a13 PMop13 object13 described13 in13 the13 previous13 section makeOP

makeNCA Create13 a13 dataframe13 (class13 PMnca)13 with13 the13 output13 of13 a13 non-shy‐compartmental13 analysis13 using13 PMpost13 and13 NPAG13 data13 objects13 as13 input13 13 The13 PMnca13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull auc13 Area13 under13 the13 time-shy‐observation13 curve13 using13 the13

trapezoidal13 approximation13 from13 time13 013 until13 the13 second13 dose13 or13 if13 only13 one13 dose13 until13 the13 last13 observation

bull aumc13 Area13 under13 the13 Zirst13 moment13 curvebull k13 Slope13 by13 least-shy‐squares13 linear13 regression13 of13 the13 Zinal13

613 log-shy‐transformed13 observations13 vs13 timebull auclast13 Area13 under13 the13 curve13 from13 the13 time13 of13 the13

last13 observation13 to13 inZinity13 calculated13 as13 [Final13 obs]kbull aumclast13 Area13 under13 the13 Zirst13 moment13 curve13 from13

the13 time13 of13 the13 last13 observation13 to13 inZinitybull aucinf13 Area13 under13 the13 curve13 from13 time13 013 to13 inZinity13

caluculated13 as13 auc13 +13 auclastbull aumcinf13 Area13 under13 the13 Zirst13 moment13 curve13 from13

time13 013 to13 inZinitybull mrt13 Mean13 residence13 time13 calculated13 as13 1kbull cmax13 Maximum13 predicted13 concentration13 after13 the13

Zirst13 dosebull tmax13 Time13 to13 cmaxbull cl13 Clearance13 calculated13 as13 doseaucinfbull vdss13 Volume13 of13 distribution13 at13 steady13 state13

calculated13 as13 clmrtbull thalf13 Half13 life13 of13 elimination13 calculated13 as13 ln(2)kbull dose13 First13 dose13 amount13 for13 each13 subject

makeNCA

Userrsquos13 Guide13 13 2313 13

Command Description R13 help

makeErrorPoly This13 function13 plots13 Zirst13 second13 and13 third13 order13 polynomial13 functions13 Zitted13 to13 pairs13 of13 observations13 and13 associated13 standard13 deviations13 for13 a13 given13 output13 assay13 In13 this13 way13 the13 standard13 deviation13 associated13 with13 any13 observation13 may13 be13 calculated13 and13 used13 to13 appropriately13 weight13 that13 observation13 in13 the13 model13 building13 process13 Observations13 are13 weighted13 by13 the13 reciprocal13 of13 the13 variance13 or13 squared13 standard13 deviation13 13 Output13 of13 the13 function13 is13 a13 plot13 of13 the13 measured13 observations13 and13 Zitted13 polynomial13 curves13 and13 a13 list13 with13 the13 Zirst13 second13 and13 third13 order13 coefZicients

makeErrorPoly

makePTA This13 function13 performs13 a13 Probability13 of13 Target13 Attainment13 analysis13 for13 a13 set13 of13 simulated13 doses13 and13 time-shy‐concentration13 proZiles13 13 Targets13 (eg13 Minimum13 Inhibitory13 Concentrations)13 the13 type13 of13 target13 attainment13 (ie13 time13 above13 target13 Cmaxtarget13 13 AUCtarget13 Cmintarget13 or13 Cxtarget13 where13 x13 is13 any13 time13 point)13 and13 the13 success13 threshold13 (eg13 time13 gt13 0713 or13 Cmaxtarget13 gt13 10)13 can13 all13 be13 speciZied13 13 Output13 is13 a13 list13 (class13 PMpta)13 with13 two13 objectsbull Results13 a13 413 dimensional13 array13 with13 dimension13 size13 of13

[number13 of13 doses13 number13 of13 targets13 number13 of13 simulated13 proZiles13 1]13 which13 gives13 the13 target13 attainment13 (eg13 Cmaxtarget)13 for13 each13 dose13 target13 and13 proZile

bull Outcome13 For13 each13 dose13 and13 target13 a13 summary13 of13 the13 target13 attainment13 for13 all13 the13 proZiles13 including13 mean13 standard13 deviation13 and13 proportion13 above13 the13 success13 threshold

PMpta13 objects13 can13 be13 summarized13 with13 summary(x)13 and13 plotted13 with13 plot(x)13

makePTA

Userrsquos13 Guide13 13 2413 13

Command Description R13 help

makePopmakePost(NPAG13 only)

These13 functions13 create13 dataframes13 of13 class13 PMpop13 and13 PMpost13 respectively13 13 The13 PMpop13 or13 PMpost13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull time13 Times13 for13 predicted13 concentrations13 13 These13

times13 are13 not13 necessarily13 at13 observed13 times13 but13 at13 a13 frequency13 speciZied13 in13 the13 NPAG13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

bull pred113 Predictions13 for13 output13 113 13 For13 PMpop13 objects13 predictions13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 population13 prior13 distribution13 13 For13 PMpost13 objects13 they13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject

bull pred213 pred313 etc13 If13 additional13 outputs13 exist13 they13 will13 each13 be13 columns13 in13 the13 dataframe13 just13 as13 for13 pred113 13

makePopmakePost

NPAG RunsIn13 the13 past13 users13 had13 to13 run13 NPAG13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 NPrun()13 13 However13 if13 NPrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable

1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 NPAG13 creates13 a13 temporary13 instruction13 Zile13 in13 case13 something13 happens13 so13 that13 instructions13 entered13 to13 date13 can13

be13 recovered13 13 Accept13 the13 default13 by13 choosing13 113 13 You13 can13 save13 with13 a13 meaningful13 Zilename13 later13 13 If13 it13 already13 exists13 you13 will13 be13 asked13 if13 you13 wish13 to13 overwrite13 the13 Zile13 which13 is13 usually13 the13 thing13 to13 do

Userrsquos13 Guide13 13 2513 13

8 If13 you13 have13 previously13 run13 IT2B13 you13 can13 automatically13 import13 the13 suggested13 parameter13 ranges13 13 Choose13 113 to13 do13 this13 and13 013 to13 run13 NPAG13 without13 a13 previous13 IT2B13 run81 If13 you13 choose13 option13 113 you13 must13 specify13 the13 name13 of13 a13 FROMxxxx13 Zile13 typically13 FROM000113 that13 you13 can13

Zind13 in13 an13 output13 directory13 after13 a13 successful13 IT2B13 run13 13 Note13 that13 the13 program13 will13 then13 assume13 that13 you13 are13 using13 the13 same13 wrk13 Ziles13 that13 IT2B13 made13 from13 your13 data13 csv13 Zile13 13 It13 is13 strongly13 recommended13 to13 override13 this13 and13 specify13 a13 data13 csv13 Zile13 13 At13 this13 point13 you13 will13 jump13 to13 1013 below13 and13 continue13 on13 however13 your13 answers13 will13 often13 be13 supplied13 by13 the13 instructions13 contained13 in13 the13 FROMxxxx13 Zile13 and13 you13 need13 merely13 conZirm13 them

9 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13 have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 NPrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis91 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13

for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

10 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 NPAG13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

11 Enter13 the13 name13 of13 your13 csv13 Zile13 now12 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile13 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset131 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects132 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry14 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset15 Enter13 the13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo 13 followed13 by13

return16 Select13 how13 you13 would13 like13 to13 model13 assay13 (observation)13 error13 for13 each13 output13 equation13 13 You13 have13 four13 choices13 13

In13 all13 four13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0161 Error13 model13 113 (SD)13 13 Choose13 this13 option13 if13 you13 have13 already13 run13 IT2B13 and13 multiplied13 your13 assay13 error13

polynomial13 by13 gamma13 (see13 next13 option13 for13 a13 description13 of13 gamma)162 Error13 model13 213 (SD13 13 gamma)13 13 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13

observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 If13 you13 choose13 this13 option13 you13 then13 can13 specify13 the13 starting13 value13 of13 gamma13 13 Good13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality

163 Error13 model13 313 (SD213 +13 lamda2)0513 13 Lamda13 is13 an13 alternative13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present

Userrsquos13 Guide13 13 2613 13

164 Error13 model13 413 SD13 =13 gamma13 13 This13 model13 is13 rarely13 used13 and13 is13 equivalent13 to13 specifying13 a13 model13 with13 C013 only13 ie13 a13 constant13 error13 regardless13 of13 concentration

17 Once13 you13 select13 the13 assay13 error13 model13 for13 each13 output13 equation13 you13 are13 then13 offered13 four13 more13 options13 on13 which13 assay13 error13 polynomial13 coefZicients13 to13 use13 13 Choices13 113 and13 213 are13 the13 most13 commonly13 used171 Choice13 113 The13 default13 13 Use13 coefZicients13 in13 the13 subject13 record13 (C013 C113 C213 C313 in13 the13 data13 csv13 Zile)13 and13 if13

missing13 use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 (item13 1813 below)172 Choice13 213 Use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 for13 all13 subjects13 regardless13 of13 what13 is13 in13 the13

data13 csv13 Zile173 Choice13 313 13 To13 multiply13 data13 csv13 values13 and13 default13 entered13 values13 by13 a13 Zixed13 gamma13 and13 use13 them13 13 174 Choice13 013 Specify13 coefZicients13 on13 a13 subject13 by13 subject13 basis13 either13 those13 in13 the13 data13 csv13 Zile13 already13 the13

default13 values13 entered13 into13 the13 program13 or13 other13 values18 For13 each13 output13 equation13 after13 you13 have13 selected13 the13 option13 in13 item13 1713 you13 will13 be13 prompted13 to13 supply13 the13

required13 information13 including13 the13 general13 default13 values13 for13 missing13 or13 overridden13 values13 in13 the13 data13 csv13 Zile19 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13

usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13

20 Enter13 the13 grid13 point13 index13 13 This13 number13 corresponds13 to13 the13 number13 of13 grid13 (support)13 points13 which13 will13 initially13 Zill13 the13 model13 parameter13 space13 13 The13 larger13 the13 number13 of13 random13 parameters13 to13 be13 estimated13 the13 more13 points13 are13 required13 13 The13 program13 will13 make13 a13 suggestion13 based13 on13 the13 number13 of13 random13 parameters13 in13 the13 model13 13 The13 more13 you13 choose13 the13 slower13 the13 run13 will13 be13 but13 results13 may13 improve13 13 It13 is13 reasonable13 to13 choose13 fewer13 points13 early13 in13 model13 exploration13 and13 increase13 in13 later13 phases13 or13 if13 poor13 model13 Zits13 or13 lack13 of13 convergence13 are13 noted13 The13 choices13 are13 113 to13 713 corresponding13 respectively13 to13 212913 500313 1000713 2001113 4000913 and13 8002113 points13 13 If13 you13 choose13 713 you13 then13 have13 an13 additional13 choice13 to13 select13 one13 or13 more13 multiples13 of13 8002113 points

21 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 013 or13 greater13 13 If13 you13 enter13 an13 integer13 greater13 than13 013 the13 engine13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13 If13 you13 enter13 013 this13 is13 the13 way13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 an13 independent13 data13 set13 and13 a13 non-shy‐uniform13 prior13 must13 be13 speciZied13 (see13 3013 below)13 13 This13 means13 that13 the13 engine13 will13 only13 calculate13 the13 individual13 Bayesian13 posteriors13 for13 the13 new13 subjects13 using13 the13 population13 joint13 density13 from13 a13 previous13 run13 as13 a13 Bayesian13 prior

22 Information13 about13 convergence13 criteria13 13 Answer13 113 or13 some13 other13 keystroke13 plus13 Return13 to13 acknowledge13 that13 you13 have13 read13 it

23 In13 order13 to13 predict13 concentrations13 from13 a13 non-shy‐parametric13 distribution13 you13 have13 the13 option13 to13 use13 the13 1)13 mean13 2)13 median13 or13 3)13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject13 13 We13 typically13 use13 the13 median13 Zirst13 and13 then13 the13 mean13 in13 a13 separate13 run13 and13 compare13 the13 differences13 13

24 Select13 the13 time13 interval13 to13 generate13 predicted13 concentrations13 13 Additionally13 there13 will13 also13 be13 predictions13 made13 at13 the13 time13 of13 each13 observation13 13 In13 general13 for13 most13 models13 predictions13 every13 1213 minutes13 provide13 sufZicient13 granularity13 13 Smaller13 values13 can13 result13 in13 very13 large13 Ziles13 for13 big13 populations

25 Select13 the13 default13 MIC13 to13 be13 used13 for13 AUCMIC13 ratio13 reporting13 13 This13 should13 generally13 be13 set13 to13 the13 default13 of13 113 by13 choosing13 113 13 You13 can13 always13 extract13 the13 AUC13 later13 and13 divide13 it13 by13 any13 MIC13 you13 choose

26 Enter13 the13 value13 in13 hours13 that13 you13 want13 for13 calculations13 of13 AUCs13 from13 predicted13 concentration13 proZiles13 13 The13 default13 is13 2413 hours13 which13 you13 can13 accept13 by13 entering13 113 or13 013 if13 you13 want13 to13 specify13 a13 different13 interval

27 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

28 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

Userrsquos13 Guide13 13 2713 13

29 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

30 For13 the13 prior13 density13 choose13 113 if13 it13 is13 to13 be13 uniform13 13 This13 means13 that13 the13 initial13 grid13 points13 will13 be13 evenly13 distributed13 with13 equal13 probability13 within13 the13 boundaries13 speciZied13 (in13 1513 above)13 13 If13 you13 choose13 013 you13 will13 be13 prompted13 for13 the13 name13 of13 a13 Zile13 that13 contains13 the13 prior13 density13 13 This13 will13 be13 DEN000113 unless13 you13 have13 changed13 its13 name13 13 It13 will13 be13 found13 in13 the13 output13 directory13 of13 a13 prior13 NPAG13 run13 13 The13 model13 used13 to13 generate13 the13 DEN000113 Zile13 must13 be13 exactly13 the13 same13 as13 the13 current13 model13 including13 parameter13 boundaries13 13 However13 this13 option13 is13 useful13 to13 specify13 a13 non-shy‐uniform13 density13 for13 two13 reasons13 13 The13 Zirst13 is13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 a13 new13 set13 of13 subjects13 13 Do13 this13 in13 combination13 with13 setting13 the13 number13 of13 cycles13 to13 013 (see13 2113 above)13 13 The13 second13 use13 for13 a13 non-shy‐uniform13 prior13 is13 to13 continue13 a13 previous13 run13 13 For13 example13 if13 you13 only13 set13 the13 number13 of13 cycles13 to13 5013 to13 get13 a13 rough13 idea13 of13 model13 Zit13 you13 may13 continue13 where13 you13 left13 off13 by13 specifying13 the13 DEN000113 Zile13 from13 the13 50-shy‐cycle13 run13 and13 continuing13 with13 as13 many13 additional13 cycles13 as13 you13 specify13 in13 item13 2113 13 So13 in13 the13 example13 if13 you13 specify13 10013 cycles13 in13 2113 the13 total13 number13 of13 cycles13 will13 be13 5013 +13 10013 =13 150

31 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 NPrun(instr=ldquoyourfilerdquo)13 option13 and13 including13 ldquoyourZilerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

32 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 NPAG13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 NPAG13 analysis

33 The13 NPAG13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

IT2B RunsIn13 the13 past13 users13 had13 to13 run13 IT2B13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 ITrun()13 13 However13 if13 ITrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13

have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 ITrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis

Userrsquos13 Guide13 13 2813 13

71 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13 for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

8 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 IT2B13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

9 Enter13 the13 name13 of13 your13 csv13 Zile13 now10 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile11 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset111 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects112 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry12 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset13 Enter13 the13 initial13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo13 followed13

by13 return14 The13 estimated13 mean13 for13 each13 parameter13 value13 distribution13 during13 the13 Zirst13 iteration13 will13 be13 the13 median13 of13 the13

range13 speciZied13 in13 1313 13 You13 now13 have13 the13 option13 to13 specify13 the13 standard13 deviation13 for13 the13 parameter13 value13 distribution13 which13 by13 default13 is13 half13 of13 the13 range13 in13 1313 13 Choose13 113 to13 accept13 this13 (the13 usual13 answer)13 or13 013 to13 change13 it13 to13 something13 else13 expressed13 as13 a13 multiple13 of13 the13 range

15 In13 IT2B13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 You13 can13 now13 choose13 113 if13 every13 subject13 has13 the13 same13 coefZicients13 or13 013 to13 use13 a13 unique13 set13 of13 coefZicients13 for13 each13 subject13 13 The13 Zirst13 case13 is13 the13 more13 usual13 when13 all13 13 samples13 from13 all13 subjects13 are13 analyzed13 in13 the13 same13 lab13 13 If13 13 samples13 are13 analyzed13 in13 different13 labs13 and13 you13 have13 the13 assay13 data13 from13 each13 lab13 then13 you13 would13 enter13 013 13 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 (see13 151313 below)13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0151 If13 you13 choose13 113 (one13 set13 of13 coefZicients13 for13 all13 subjects)13 you13 will13 then13 be13 presented13 with13 313 additional13

choices1511 Choice13 113 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13 observation13

including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 and13 to13 Zix13 gamma13 to13 1

1512 Choice13 213 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 but13 to13 estimate13 gamma13 based13 on13 the13 data13 13 This13 is13 the13 usual13 option

1513 Choice13 313 Choose13 this13 option13 if13 you13 wish13 to13 estimate13 the13 assay13 error13 coefZicients13 based13 on13 your13 data13 for13 use13 in13 future13 runs13 13 Although13 you13 can13 access13 this13 option13 by13 using13 either13 ITrun()13 or13 ERRrun()13 in13 R13 the13 instruction13 Ziles13 that13 you13 save13 and13 the13 generated13 output13 Ziles13 will13 be13 different13 13 Therefore13 we13 recommend13 that13 if13 you13 intend13 to13 choose13 this13 option13 use13 ERRrun()13 in13 R13 which13 will13 generate13 an13 ASS000113 Zile13 that13 contains13 the13 estimates13 for13 C013 C113 C213 and13 C313 13 You13 can13 then13 include13 this13 Zile13 in13 the13 working13 directory13 (along13 with13 a13 model13 txt13 Zile13 and13 a13 data13 csv13 Zile)13 to13 do13 an13 IT2B13 run13 supplying13 the13 Zile13 name13 in13 16113 below

Userrsquos13 Guide13 13 2913 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

x array13 of13 compartment13 amounts

xp array13 of13 Zirst13 derivative13 of13 compartment13 amounts

rpar internal

ipar internal

p array13 of13 primary13 parameters

r input13 rates

b input13 boluses

npl internal

numeqt output13 equation13 number

ndrug input13 number

nadd covariate13 number

rateiv intravenous13 input13 for13 inputs13 when13 DURgt013 in13 data13 Ziles

cv covariate13 values13 array

n number13 of13 compartments

nd internal

ni internal

nup internal

nuic internal

np number13 of13 primary13 parameters

nbcomp bolus13 compartment13 array

psym names13 of13 primary13 parameters

fa biovailability

tlag lag13 time

tin internal

tout internal

Complete13 Example

Here13 is13 a13 complete13 example13 of13 a13 model13 Zile13 as13 of13 Pmetrics13 version13 04013 and13 higher

Userrsquos13 Guide13 13 1513 13

NotesBy13 omitting13 a13 Diffeq13 block13 with13 ODEs13 Pmetrics13 understands13 that13 you13 are13 specifying13 the13 model13 to13 be13 solved13 algebraically13 In13 this13 case13 at13 least13 KE13 and13 V13 must13 be13 in13 the13 Primary13 or13 Secondary13 variables13 KA13 KCP13 and13 KPC13 are13 optional13 and13 specify13 absorption13 and13 transfer13 to13 and13 from13 the13 central13 to13 a13 peripheral13 compartment13 respectively

PriKE13 013 5V013 0113 100KA13 013 5Tlag113 013 3Cov13 wt

SecV13 =13 V0wt

LagTLAG(1)13 =13 Tlag1

OutY(1)13 =13 X(2)V

ErrL=04010100

Userrsquos13 Guide13 13 1613 13

Brief13 Fortran13 Tutorial

Much13 more13 detailed13 help13 is13 available13 from13 httpwwwcsmtuedu~sheneCOURSEScs201NOTESfortranhtml

Arithmetic Operator Meaning

+ addition

- subtraction

multiplication

division

exponentiation

Relational Operator Alternative Operator Meaning

lt LT less than

lt= LE less than or equal

gt GT greater than

gt= GE greater than or equal

== EQ equal

= NE not equal

Selective Execution Example

IF (logical-expression) one-statement IF (T gt= 100) CL = 10

IF (logical-expression) THEN statementsEND IF

IF (T gt= 100) THEN CL = 10 V = 10END IF

IF (logical-expression) THEN statements-1ELSE statements-2END IF

IF (T gt= 100) THEN CL = 10ELSE CL = CLEND IF

Userrsquos13 Guide13 13 1713 13

How to use R and PmetricsSeCng13 up13 a13 Pmetrics13 project

When13 beginning13 a13 new13 modeling13 project13 it13 is13 convenient13 to13 use13 the13 command13 PMtree(ldquoproject namerdquo)13 13 This13 command13 will13 set13 up13 a13 new13 directory13 in13 the13 current13 working13 directory13 named13 whatever13 you13 have13 included13 as13 the13 ldquoproject13 namerdquo13 13 For13 example13 a13 directory13 called13 ldquoDrugXrdquo13 will13 be13 created13 by13 PMtree(ldquoDrugXrdquo)13 13 Beneath13 this13 directory13 several13 subdirectories13 will13 be13 also13 created13 Rscript13 Runs13 Sim13 and13 src13 13 The13 Rscript13 subdirectory13 will13 contain13 a13 skeleton13 R13 script13 to13 begin13 Pmetrics13 runs13 in13 the13 new13 project13 13 The13 Runs13 subdirectory13 should13 contain13 all13 Ziles13 required13 for13 a13 run13 (described13 next)13 and13 it13 will13 also13 contain13 the13 resulting13 numerically13 ordered13 run13 directories13 created13 after13 each13 Pmetrics13 NPAG13 or13 IT2B13 run13 13 The13 Sim13 subdirectory13 can13 contain13 any13 Ziles13 related13 to13 simulations13 and13 the13 src13 subdirectory13 should13 contain13 original13 and13 manipulated13 source13 data13 Ziles13 13 Of13 course13 you13 are13 free13 to13 edit13 this13 directory13 tree13 structure13 as13 you13 please13 or13 make13 your13 own13 entirely

GeCng13 the13 required13 files13 to13 run13 Pmetrics

When13 you13 wish13 to13 execute13 a13 Pmetrics13 run13 you13 must13 ensure13 that13 appropriate13 Pmetrics13 model13 txt13 and13 data13 csv13 Ziles13 are13 in13 the13 working13 directory13 ie13 the13 Runs13 subdirectory13 of13 the13 project13 directory13 13 13 13 R13 can13 be13 used13 to13 help13 prepare13 the13 data13 csv13 Zile13 by13 importing13 and13 manipulating13 spreadsheets13 (eg13 readcsv())13 13 The13 Pmetrics13 function13 PMcheck()13 can13 be13 used13 to13 check13 a13 csv13 Zile13 or13 an13 R13 dataframe13 that13 is13 to13 be13 saved13 as13 a13 Pmetrics13 data13 13 csv13 Zile13 for13 errors13 13 13 13 13 13 It13 can13 also13 check13 a13 model13 Zile13 for13 errors13 in13 the13 context13 of13 a13 dataZile13 eg13 covariates13 that13 do13 not13 match13 13 PMfixMatrix()13 attempts13 to13 automatically13 rid13 data13 Ziles13 of13 errors13 13 The13 function13 PMwriteMatrix() 13 can13 be13 used13 to13 write13 the13 R13 data13 object13 in13 the13 correct13 format13 for13 use13 by13 IT2B13 NPAG13 or13 the13 Simulator13 13 You13 can13 also13 download13 sample13 data13 and13 scripts13 from13 the13 Pmetrics13 downloads13 section13 of13 our13 website13 once13 you13 sign13 in13 with13 your13 LAPK13 user13 email13 address13 and13 password13 13 Edit13 prior13 versions13 of13 model13 Ziles13 to13 make13 new13 model13 Ziles

Using13 scripts13 to13 control13 Pmetrics

As13 you13 will13 see13 in13 the13 skeleton13 R13 script13 made13 by13 PMtree() and13 placed13 in13 the13 Rscript13 subdirectory13 if13 this13 is13 a13 Zirst-shy‐time13 run13 the13 R13 commands13 to13 run13 IT2B13 or13 NPAG13 are13 as13 follows13 13 Recall13 that13 the13 ldquordquo13 character13 is13 a13 comment13 character

library(Pmetrics)Run 1 - add your run description heresetwd(ldquoworking directoryrdquo)NPrun() for NPAG or ITrun() for IT2B

The13 Zirst13 line13 will13 load13 the13 Pmetrics13 library13 of13 functions13 13 The13 second13 line13 sets13 the13 working13 directory13 to13 the13 speciZied13 path13 13 The13 third13 line13 generates13 the13 batch13 Zile13 to13 run13 NPAG13 or13 IT2B13 and13 saves13 it13 to13 the13 working13 directory13

NOTE13 13 On13 Mac13 systems13 the13 batch13 Zile13 will13 be13 automatically13 launched13 in13 a13 Terminal13 window13 13 On13 Windows13 systems13 the13 batch13 Zile13 must13 be13 launched13 manually13 by13 double13 clicking13 the13 np_runbat13 or13 it_runbat13 Zile13 in13 the13 working13 directory

ITrun() 13 and13 NPrun()13 both13 return13 the13 full13 path13 of13 the13 output13 directory13 to13 the13 clipboard13 13 By13 default13 runs13 are13 placed13 in13 folders13 numbered13 sequentially13 beginning13 with13 ldquo1rdquoNow13 the13 output13 of13 IT2B13 or13 NPAG13 needs13 to13 be13 loaded13 into13 R13 so13 the13 next13 command13 does13 this

NPload(run_number) or ITload(run_number)

Details13 of13 these13 commands13 and13 what13 is13 loaded13 are13 described13 in13 the13 R13 documentation13 (NPload 13 or13 ITload)13 and13 in13 the13 following13 section13 13 The13 run_number13 should13 be13 included13 within13 the13 parentheses13 to13 be13 appended13 to13 the13 names13

Userrsquos13 Guide13 13 1813 13

of13 loaded13 R13 objects13 allowing13 for13 comparison13 between13 runs13 eg13 NPload(1)13 13 Finally13 at13 this13 point13 other13 Pmetrics13 commands13 can13 be13 added13 to13 the13 script13 to13 process13 the13 data13 such13 as13 the13 following

plot(final1)plot(cycle1)plot(op1type=rdquopoprdquo) or plot(op1$pop1)plot(op1) default is to plot posterior predictions for output 1plot(op1type=rdquopoprdquoresid=T)

Of13 course13 the13 full13 power13 of13 R13 can13 be13 used13 in13 scripts13 to13 analyze13 data13 but13 these13 simple13 statements13 serve13 as13 examplesIf13 you13 do13 not13 use13 the13 PMtree() structure13 we13 suggest13 that13 the13 R13 script13 for13 a13 particular13 project13 be13 saved13 into13 a13 folder13 called13 ldquoRscriptrdquo13 or13 some13 other13 meaningful13 name13 in13 the13 working13 directory13 13 Folders13 are13 not13 be13 moved13 by13 the13 batch13 Zile13 13 Within13 the13 script13 number13 runs13 sequentially13 and13 use13 comments13 liberally13 to13 13 distinguish13 runs13 as13 shown13 below

library(Pmetrics)

Run 1 - Ka Kel V all subjectssetwd(ldquoworking directoryrdquo)NPrun() assumes model=rdquomodeltxtrdquo and data=rdquodatacsvrdquoNPload(1)

Remember13 in13 R13 that13 the13 command13 example(function) will13 provide13 examples13 for13 the13 speciZied13 function13 13 Most13 Pmetrics13 functions13 have13 examples

Pmetrics Data ObjectsAfter13 a13 successful13 IT2B13 or13 NPAG13 run13 an13 R13 dataZile13 is13 saved13 in13 the13 output13 subdirectory13 of13 the13 newly13 created13 numerically13 ordered13 folder13 in13 the13 working13 directory13 13 After13 IT2B13 this13 Zile13 is13 called13 ldquoIT2BoutRdatardquo13 and13 after13 NPAG13 it13 is13 called13 ldquoNPAGoutRdatardquo13 13 As13 mentioned13 in13 the13 previous13 section13 these13 data13 Ziles13 can13 be13 loaded13 by13 ensuring13 that13 the13 Runs13 folder13 is13 set13 as13 the13 working13 directory13 and13 then13 using13 the13 Pmetrics13 commands13 ITload(run_num)13 or13 NPload(run_num)

Both13 commands13 load13 their13 respective13 Rdata13 Ziles13 into13 R13 making13 the13 contained13 objects13 available13 for13 plotting13 and13 other13 analysisObjects13 loaded13 by13 ITload(run_num) and NPload(run_num)

Objects Variables Comments

op13 (class13 PMop13 list) $pop113 $post113 Population13 and13 posterior13 predictions13 for13 each13 output13 equation13 ie13 113 213

13 $id Subject13 identiZication

13 $time Observation13 time13 in13 relative13 decimal13 hours

13 $obs Observation

13 $pred Prediction13 based13 on13 median13 of13 population13 or13 posterior13 parameter13 value13 distributions

Userrsquos13 Guide13 13 1913 13

Objects Variables Comments

13 $block Dosing13 block13 usually13 113 unless13 data13 Zile13 contains13 EVID=413 dose13 reset13 events13 in13 which13 case13 each13 such13 reset13 within13 a13 given13 ID13 will13 increment13 the13 dosing13 block13 by13 113 for13 that13 ID

13 $obsSD Calculated13 standard13 deviation13 (error)13 of13 the13 observation13 based13 on13 the13 assay13 error13 polynomial

13 $d Difference13 between13 pred13 and13 obs

13 $ds Squared13 difference13 between13 pred13 and13 obs

13 $wd $d13 weighted13 by13 the13 $obsSD

13 $wds $ds13 weighted13 by13 the13 $obsSD

Zinal13 (class13 PMZinal13 list) $popPoints (NPAG13 only)13 Dataframe13 of13 the13 Zinal13 cycle13 joint13 population13 density13 of13 grid13 points13 with13 column13 names13 equal13 to13 the13 name13 of13 each13 random13 parameter13 plus13 $prob13 for13 the13 associated13 probability13 of13 that13 point13

$popMean The13 Zinal13 cycle13 mean13 for13 each13 random13 parameter13 distribution

$popSD The13 Zinal13 cycle13 standard13 deviation13 for13 each13 random13 parameter13 distribution

$popCV The13 Zinal13 cycle13 coefZicient13 of13 variation13 for13 each13 random13 parameter13 distribution

$popVar The13 Zinal13 cycle13 variance13 for13 each13 random13 parameter13 distribution

$popCov The13 Zinal13 cycle13 covariance13 matrix13 for13 each13 random13 parameter13 distribution

$popCor The13 Zinal13 cycle13 correlation13 matrix13 for13 each13 random13 parameter13 distribution

$popMedian The13 Zinal13 cycle13 median13 for13 each13 random13 parameter13 distribution

$gridpts (NPAG13 only)13 The13 initial13 number13 of13 support13 points

$ab Matrix13 of13 boundaries13 for13 random13 parameter13 values13 13 For13 NPAG13 this13 is13 speciZied13 by13 the13 user13 prior13 to13 the13 run13 for13 IT2B13 it13 is13 calculated13 as13 a13 user13 speciZied13 multiple13 of13 the13 SD13 for13 the13 parameter13 value13 distribution

Userrsquos13 Guide13 13 2013 13

Objects Variables Comments

cycle13 (class13 PMcycle13 list) $names Vector13 of13 names13 of13 the13 random13 parameters

$ll Matrix13 of13 cycle13 number13 and13 -shy‐2Log-shy‐likelihood13 at13 each13 cycle

$gamlam A13 matrix13 of13 cycle13 number13 and13 gamma13 or13 lambda13 at13 each13 cycle13 (see13 item13 1613 under13 NPAG13 Runs13 below13 for13 a13 discussion13 of13 gamma13 and13 lambda)

$mean A13 matrix13 of13 cycle13 number13 and13 the13 mean13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 mean

$sd A13 matrix13 of13 cycle13 number13 and13 the13 standard13 deviation13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$median A13 matrix13 of13 cycle13 number13 and13 the13 median13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$aic A13 matrix13 of13 cycle13 number13 and13 Akaike13 Information13 Criterion13 at13 each13 cycle

$bic A13 matrix13 of13 cycle13 number13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle

cov13 (class13 PMcov13 dataframe)

$id Subject13 identiZication

$time Time13 for13 each13 covariate13 entry

covariates Covariate13 values13 for13 each13 subject13 at13 each13 time13 extracted13 from13 the13 raw13 data13 Zile

parameters Mean13 median13 or13 mode13 of13 Bayesian13 posterior13 distribution13 for13 each13 random13 parameter13 in13 the13 model13 13 Mode13 summaries13 are13 available13 for13 NPAG13 output13 only13 and13 the13 default13 is13 median13 13 Values13 are13 recycled13 for13 each13 row13 within13 a13 given13 subject13 with13 the13 number13 of13 rows13 driven13 by13 the13 number13 of13 covariate13 entries

Userrsquos13 Guide13 13 2113 13

Objects Variables Comments

pop13 (class13 PMpop13 dataframe)

post13 (class13 PMpost13 dataframe)

NPAG13 only

$id Subject13 identiZication

$pred113 Population13 prior13 (PMpop)13 or13 Bayesian13 posterior13 (PMpost)13 predictions13 for13 each13 output13 equation13 based13 on13 mean13 median13 and13 mode13 as13 speciZied13 by13 the13 user13 and13 with13 frequency13 also13 speciZied13 by13 the13 user13 in13 the13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

$block Same13 as13 for13 PMop13 objects13 above

NPdata13 (class13 NPAG13 list)13 ITdata13 (class13 IT2B13 list

Raw13 data13 used13 to13 make13 the13 above13 objects13 13 Please13 use13 NPparse13 or13 ITparse13 in13 R13 for13 discussion13 of13 the13 data13 contained13 in13 these13 objects

Since13 R13 is13 an13 object13 oriented13 language13 to13 access13 the13 observations13 in13 a13 PMop13 object13 for13 example13 use13 the13 following13 syntax13 op$post1$obsNote13 that13 you13 will13 place13 an13 integer13 within13 the13 parentheses13 of13 the13 loading13 functions13 eg13 NPload(1)13 which13 will13 sufZix13 all13 the13 above13 objects13 with13 that13 integer13 eg13 op113 Zinal113 NPdata113 13 This13 allows13 several13 models13 to13 be13 loaded13 into13 R13 simultaneously13 each13 with13 a13 unique13 sufZix13 and13 which13 can13 be13 compared13 with13 the13 PMcompare()13 command13 (see13 Model13 Diagnostics13 below)

Making New Pmetrics ObjectsOnce13 you13 have13 loaded13 the13 raw13 (NPdata13 or13 ITdata)13 or13 processed13 (op13 Uinal13 cycle13 pop13 post)13 data13 objects13 described13 above13 with13 NPload(run_num)13 or13 ITload(run_num)13 should13 you13 wish13 to13 remake13 the13 processed13 objects13 with13 parameters13 other13 than13 the13 defaults13 you13 can13 easily13 do13 so13 with13 the13 make 13 family13 of13 commands13 13 For13 example13 the13 default13 for13 PMop13 observed13 vs13 predicted13 objects13 is13 to13 use13 the13 prediction13 based13 on13 the13 median13 of13 the13 population13 or13 posterior13 distribution13 13 If13 you13 wish13 to13 use13 the13 mean13 of13 the13 distribution13 remake13 the13 PMop13 object13 using makeOP()13 13 If13 you13 wish13 to13 see13 all13 the13 cycle13 information13 in13 a13 PMcycle13 object13 not13 omitting13 the13 Zirst13 1013 of13 cycles13 by13 default13 remake13 it13 using13 makeCycle()13 13

For13 all13 of13 the13 following13 commands13 the13 data13 input13 is13 either13 NPdata13 or13 ITdata13 with13 additional13 function13 arguments13 speciZic13 to13 each13 command13 13 Accessing13 the13 help13 for13 each13 function13 in13 R13 will13 provide13 further13 details13 on13 the13 arguments13 defaults13 and13 output13 of13 each13 command

Userrsquos13 Guide13 13 2213 13

Command Description R13 help

makeAUC Make13 a13 dataframe13 of13 class13 PMauc13 containing13 subject13 ID13 and13 AUC13 from13 a13 variety13 of13 inputs13 including13 objects13 of13 PMop13 PMsim13 or13 a13 suitable13 dataframe

makeAUC

makeCov Generate13 a13 dataframe13 of13 class13 PMcov13 with13 subject-shy‐speciZic13 covariates13 extracted13 from13 the13 data13 csv13 Zile13 This13 object13 can13 be13 plotted13 and13 used13 to13 test13 for13 covariates13 which13 are13 signiZicantly13 associated13 with13 model13 parameters13 13

makeCov

makeCycle Create13 a13 PMcycle13 object13 described13 in13 the13 previous13 section makeCycle

makeFinal Create13 a13 PMZinal13 object13 described13 in13 the13 previous13 section makeFinal

makeOP Create13 a13 PMop13 object13 described13 in13 the13 previous13 section makeOP

makeNCA Create13 a13 dataframe13 (class13 PMnca)13 with13 the13 output13 of13 a13 non-shy‐compartmental13 analysis13 using13 PMpost13 and13 NPAG13 data13 objects13 as13 input13 13 The13 PMnca13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull auc13 Area13 under13 the13 time-shy‐observation13 curve13 using13 the13

trapezoidal13 approximation13 from13 time13 013 until13 the13 second13 dose13 or13 if13 only13 one13 dose13 until13 the13 last13 observation

bull aumc13 Area13 under13 the13 Zirst13 moment13 curvebull k13 Slope13 by13 least-shy‐squares13 linear13 regression13 of13 the13 Zinal13

613 log-shy‐transformed13 observations13 vs13 timebull auclast13 Area13 under13 the13 curve13 from13 the13 time13 of13 the13

last13 observation13 to13 inZinity13 calculated13 as13 [Final13 obs]kbull aumclast13 Area13 under13 the13 Zirst13 moment13 curve13 from13

the13 time13 of13 the13 last13 observation13 to13 inZinitybull aucinf13 Area13 under13 the13 curve13 from13 time13 013 to13 inZinity13

caluculated13 as13 auc13 +13 auclastbull aumcinf13 Area13 under13 the13 Zirst13 moment13 curve13 from13

time13 013 to13 inZinitybull mrt13 Mean13 residence13 time13 calculated13 as13 1kbull cmax13 Maximum13 predicted13 concentration13 after13 the13

Zirst13 dosebull tmax13 Time13 to13 cmaxbull cl13 Clearance13 calculated13 as13 doseaucinfbull vdss13 Volume13 of13 distribution13 at13 steady13 state13

calculated13 as13 clmrtbull thalf13 Half13 life13 of13 elimination13 calculated13 as13 ln(2)kbull dose13 First13 dose13 amount13 for13 each13 subject

makeNCA

Userrsquos13 Guide13 13 2313 13

Command Description R13 help

makeErrorPoly This13 function13 plots13 Zirst13 second13 and13 third13 order13 polynomial13 functions13 Zitted13 to13 pairs13 of13 observations13 and13 associated13 standard13 deviations13 for13 a13 given13 output13 assay13 In13 this13 way13 the13 standard13 deviation13 associated13 with13 any13 observation13 may13 be13 calculated13 and13 used13 to13 appropriately13 weight13 that13 observation13 in13 the13 model13 building13 process13 Observations13 are13 weighted13 by13 the13 reciprocal13 of13 the13 variance13 or13 squared13 standard13 deviation13 13 Output13 of13 the13 function13 is13 a13 plot13 of13 the13 measured13 observations13 and13 Zitted13 polynomial13 curves13 and13 a13 list13 with13 the13 Zirst13 second13 and13 third13 order13 coefZicients

makeErrorPoly

makePTA This13 function13 performs13 a13 Probability13 of13 Target13 Attainment13 analysis13 for13 a13 set13 of13 simulated13 doses13 and13 time-shy‐concentration13 proZiles13 13 Targets13 (eg13 Minimum13 Inhibitory13 Concentrations)13 the13 type13 of13 target13 attainment13 (ie13 time13 above13 target13 Cmaxtarget13 13 AUCtarget13 Cmintarget13 or13 Cxtarget13 where13 x13 is13 any13 time13 point)13 and13 the13 success13 threshold13 (eg13 time13 gt13 0713 or13 Cmaxtarget13 gt13 10)13 can13 all13 be13 speciZied13 13 Output13 is13 a13 list13 (class13 PMpta)13 with13 two13 objectsbull Results13 a13 413 dimensional13 array13 with13 dimension13 size13 of13

[number13 of13 doses13 number13 of13 targets13 number13 of13 simulated13 proZiles13 1]13 which13 gives13 the13 target13 attainment13 (eg13 Cmaxtarget)13 for13 each13 dose13 target13 and13 proZile

bull Outcome13 For13 each13 dose13 and13 target13 a13 summary13 of13 the13 target13 attainment13 for13 all13 the13 proZiles13 including13 mean13 standard13 deviation13 and13 proportion13 above13 the13 success13 threshold

PMpta13 objects13 can13 be13 summarized13 with13 summary(x)13 and13 plotted13 with13 plot(x)13

makePTA

Userrsquos13 Guide13 13 2413 13

Command Description R13 help

makePopmakePost(NPAG13 only)

These13 functions13 create13 dataframes13 of13 class13 PMpop13 and13 PMpost13 respectively13 13 The13 PMpop13 or13 PMpost13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull time13 Times13 for13 predicted13 concentrations13 13 These13

times13 are13 not13 necessarily13 at13 observed13 times13 but13 at13 a13 frequency13 speciZied13 in13 the13 NPAG13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

bull pred113 Predictions13 for13 output13 113 13 For13 PMpop13 objects13 predictions13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 population13 prior13 distribution13 13 For13 PMpost13 objects13 they13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject

bull pred213 pred313 etc13 If13 additional13 outputs13 exist13 they13 will13 each13 be13 columns13 in13 the13 dataframe13 just13 as13 for13 pred113 13

makePopmakePost

NPAG RunsIn13 the13 past13 users13 had13 to13 run13 NPAG13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 NPrun()13 13 However13 if13 NPrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable

1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 NPAG13 creates13 a13 temporary13 instruction13 Zile13 in13 case13 something13 happens13 so13 that13 instructions13 entered13 to13 date13 can13

be13 recovered13 13 Accept13 the13 default13 by13 choosing13 113 13 You13 can13 save13 with13 a13 meaningful13 Zilename13 later13 13 If13 it13 already13 exists13 you13 will13 be13 asked13 if13 you13 wish13 to13 overwrite13 the13 Zile13 which13 is13 usually13 the13 thing13 to13 do

Userrsquos13 Guide13 13 2513 13

8 If13 you13 have13 previously13 run13 IT2B13 you13 can13 automatically13 import13 the13 suggested13 parameter13 ranges13 13 Choose13 113 to13 do13 this13 and13 013 to13 run13 NPAG13 without13 a13 previous13 IT2B13 run81 If13 you13 choose13 option13 113 you13 must13 specify13 the13 name13 of13 a13 FROMxxxx13 Zile13 typically13 FROM000113 that13 you13 can13

Zind13 in13 an13 output13 directory13 after13 a13 successful13 IT2B13 run13 13 Note13 that13 the13 program13 will13 then13 assume13 that13 you13 are13 using13 the13 same13 wrk13 Ziles13 that13 IT2B13 made13 from13 your13 data13 csv13 Zile13 13 It13 is13 strongly13 recommended13 to13 override13 this13 and13 specify13 a13 data13 csv13 Zile13 13 At13 this13 point13 you13 will13 jump13 to13 1013 below13 and13 continue13 on13 however13 your13 answers13 will13 often13 be13 supplied13 by13 the13 instructions13 contained13 in13 the13 FROMxxxx13 Zile13 and13 you13 need13 merely13 conZirm13 them

9 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13 have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 NPrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis91 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13

for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

10 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 NPAG13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

11 Enter13 the13 name13 of13 your13 csv13 Zile13 now12 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile13 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset131 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects132 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry14 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset15 Enter13 the13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo 13 followed13 by13

return16 Select13 how13 you13 would13 like13 to13 model13 assay13 (observation)13 error13 for13 each13 output13 equation13 13 You13 have13 four13 choices13 13

In13 all13 four13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0161 Error13 model13 113 (SD)13 13 Choose13 this13 option13 if13 you13 have13 already13 run13 IT2B13 and13 multiplied13 your13 assay13 error13

polynomial13 by13 gamma13 (see13 next13 option13 for13 a13 description13 of13 gamma)162 Error13 model13 213 (SD13 13 gamma)13 13 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13

observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 If13 you13 choose13 this13 option13 you13 then13 can13 specify13 the13 starting13 value13 of13 gamma13 13 Good13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality

163 Error13 model13 313 (SD213 +13 lamda2)0513 13 Lamda13 is13 an13 alternative13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present

Userrsquos13 Guide13 13 2613 13

164 Error13 model13 413 SD13 =13 gamma13 13 This13 model13 is13 rarely13 used13 and13 is13 equivalent13 to13 specifying13 a13 model13 with13 C013 only13 ie13 a13 constant13 error13 regardless13 of13 concentration

17 Once13 you13 select13 the13 assay13 error13 model13 for13 each13 output13 equation13 you13 are13 then13 offered13 four13 more13 options13 on13 which13 assay13 error13 polynomial13 coefZicients13 to13 use13 13 Choices13 113 and13 213 are13 the13 most13 commonly13 used171 Choice13 113 The13 default13 13 Use13 coefZicients13 in13 the13 subject13 record13 (C013 C113 C213 C313 in13 the13 data13 csv13 Zile)13 and13 if13

missing13 use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 (item13 1813 below)172 Choice13 213 Use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 for13 all13 subjects13 regardless13 of13 what13 is13 in13 the13

data13 csv13 Zile173 Choice13 313 13 To13 multiply13 data13 csv13 values13 and13 default13 entered13 values13 by13 a13 Zixed13 gamma13 and13 use13 them13 13 174 Choice13 013 Specify13 coefZicients13 on13 a13 subject13 by13 subject13 basis13 either13 those13 in13 the13 data13 csv13 Zile13 already13 the13

default13 values13 entered13 into13 the13 program13 or13 other13 values18 For13 each13 output13 equation13 after13 you13 have13 selected13 the13 option13 in13 item13 1713 you13 will13 be13 prompted13 to13 supply13 the13

required13 information13 including13 the13 general13 default13 values13 for13 missing13 or13 overridden13 values13 in13 the13 data13 csv13 Zile19 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13

usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13

20 Enter13 the13 grid13 point13 index13 13 This13 number13 corresponds13 to13 the13 number13 of13 grid13 (support)13 points13 which13 will13 initially13 Zill13 the13 model13 parameter13 space13 13 The13 larger13 the13 number13 of13 random13 parameters13 to13 be13 estimated13 the13 more13 points13 are13 required13 13 The13 program13 will13 make13 a13 suggestion13 based13 on13 the13 number13 of13 random13 parameters13 in13 the13 model13 13 The13 more13 you13 choose13 the13 slower13 the13 run13 will13 be13 but13 results13 may13 improve13 13 It13 is13 reasonable13 to13 choose13 fewer13 points13 early13 in13 model13 exploration13 and13 increase13 in13 later13 phases13 or13 if13 poor13 model13 Zits13 or13 lack13 of13 convergence13 are13 noted13 The13 choices13 are13 113 to13 713 corresponding13 respectively13 to13 212913 500313 1000713 2001113 4000913 and13 8002113 points13 13 If13 you13 choose13 713 you13 then13 have13 an13 additional13 choice13 to13 select13 one13 or13 more13 multiples13 of13 8002113 points

21 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 013 or13 greater13 13 If13 you13 enter13 an13 integer13 greater13 than13 013 the13 engine13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13 If13 you13 enter13 013 this13 is13 the13 way13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 an13 independent13 data13 set13 and13 a13 non-shy‐uniform13 prior13 must13 be13 speciZied13 (see13 3013 below)13 13 This13 means13 that13 the13 engine13 will13 only13 calculate13 the13 individual13 Bayesian13 posteriors13 for13 the13 new13 subjects13 using13 the13 population13 joint13 density13 from13 a13 previous13 run13 as13 a13 Bayesian13 prior

22 Information13 about13 convergence13 criteria13 13 Answer13 113 or13 some13 other13 keystroke13 plus13 Return13 to13 acknowledge13 that13 you13 have13 read13 it

23 In13 order13 to13 predict13 concentrations13 from13 a13 non-shy‐parametric13 distribution13 you13 have13 the13 option13 to13 use13 the13 1)13 mean13 2)13 median13 or13 3)13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject13 13 We13 typically13 use13 the13 median13 Zirst13 and13 then13 the13 mean13 in13 a13 separate13 run13 and13 compare13 the13 differences13 13

24 Select13 the13 time13 interval13 to13 generate13 predicted13 concentrations13 13 Additionally13 there13 will13 also13 be13 predictions13 made13 at13 the13 time13 of13 each13 observation13 13 In13 general13 for13 most13 models13 predictions13 every13 1213 minutes13 provide13 sufZicient13 granularity13 13 Smaller13 values13 can13 result13 in13 very13 large13 Ziles13 for13 big13 populations

25 Select13 the13 default13 MIC13 to13 be13 used13 for13 AUCMIC13 ratio13 reporting13 13 This13 should13 generally13 be13 set13 to13 the13 default13 of13 113 by13 choosing13 113 13 You13 can13 always13 extract13 the13 AUC13 later13 and13 divide13 it13 by13 any13 MIC13 you13 choose

26 Enter13 the13 value13 in13 hours13 that13 you13 want13 for13 calculations13 of13 AUCs13 from13 predicted13 concentration13 proZiles13 13 The13 default13 is13 2413 hours13 which13 you13 can13 accept13 by13 entering13 113 or13 013 if13 you13 want13 to13 specify13 a13 different13 interval

27 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

28 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

Userrsquos13 Guide13 13 2713 13

29 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

30 For13 the13 prior13 density13 choose13 113 if13 it13 is13 to13 be13 uniform13 13 This13 means13 that13 the13 initial13 grid13 points13 will13 be13 evenly13 distributed13 with13 equal13 probability13 within13 the13 boundaries13 speciZied13 (in13 1513 above)13 13 If13 you13 choose13 013 you13 will13 be13 prompted13 for13 the13 name13 of13 a13 Zile13 that13 contains13 the13 prior13 density13 13 This13 will13 be13 DEN000113 unless13 you13 have13 changed13 its13 name13 13 It13 will13 be13 found13 in13 the13 output13 directory13 of13 a13 prior13 NPAG13 run13 13 The13 model13 used13 to13 generate13 the13 DEN000113 Zile13 must13 be13 exactly13 the13 same13 as13 the13 current13 model13 including13 parameter13 boundaries13 13 However13 this13 option13 is13 useful13 to13 specify13 a13 non-shy‐uniform13 density13 for13 two13 reasons13 13 The13 Zirst13 is13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 a13 new13 set13 of13 subjects13 13 Do13 this13 in13 combination13 with13 setting13 the13 number13 of13 cycles13 to13 013 (see13 2113 above)13 13 The13 second13 use13 for13 a13 non-shy‐uniform13 prior13 is13 to13 continue13 a13 previous13 run13 13 For13 example13 if13 you13 only13 set13 the13 number13 of13 cycles13 to13 5013 to13 get13 a13 rough13 idea13 of13 model13 Zit13 you13 may13 continue13 where13 you13 left13 off13 by13 specifying13 the13 DEN000113 Zile13 from13 the13 50-shy‐cycle13 run13 and13 continuing13 with13 as13 many13 additional13 cycles13 as13 you13 specify13 in13 item13 2113 13 So13 in13 the13 example13 if13 you13 specify13 10013 cycles13 in13 2113 the13 total13 number13 of13 cycles13 will13 be13 5013 +13 10013 =13 150

31 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 NPrun(instr=ldquoyourfilerdquo)13 option13 and13 including13 ldquoyourZilerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

32 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 NPAG13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 NPAG13 analysis

33 The13 NPAG13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

IT2B RunsIn13 the13 past13 users13 had13 to13 run13 IT2B13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 ITrun()13 13 However13 if13 ITrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13

have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 ITrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis

Userrsquos13 Guide13 13 2813 13

71 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13 for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

8 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 IT2B13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

9 Enter13 the13 name13 of13 your13 csv13 Zile13 now10 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile11 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset111 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects112 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry12 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset13 Enter13 the13 initial13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo13 followed13

by13 return14 The13 estimated13 mean13 for13 each13 parameter13 value13 distribution13 during13 the13 Zirst13 iteration13 will13 be13 the13 median13 of13 the13

range13 speciZied13 in13 1313 13 You13 now13 have13 the13 option13 to13 specify13 the13 standard13 deviation13 for13 the13 parameter13 value13 distribution13 which13 by13 default13 is13 half13 of13 the13 range13 in13 1313 13 Choose13 113 to13 accept13 this13 (the13 usual13 answer)13 or13 013 to13 change13 it13 to13 something13 else13 expressed13 as13 a13 multiple13 of13 the13 range

15 In13 IT2B13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 You13 can13 now13 choose13 113 if13 every13 subject13 has13 the13 same13 coefZicients13 or13 013 to13 use13 a13 unique13 set13 of13 coefZicients13 for13 each13 subject13 13 The13 Zirst13 case13 is13 the13 more13 usual13 when13 all13 13 samples13 from13 all13 subjects13 are13 analyzed13 in13 the13 same13 lab13 13 If13 13 samples13 are13 analyzed13 in13 different13 labs13 and13 you13 have13 the13 assay13 data13 from13 each13 lab13 then13 you13 would13 enter13 013 13 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 (see13 151313 below)13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0151 If13 you13 choose13 113 (one13 set13 of13 coefZicients13 for13 all13 subjects)13 you13 will13 then13 be13 presented13 with13 313 additional13

choices1511 Choice13 113 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13 observation13

including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 and13 to13 Zix13 gamma13 to13 1

1512 Choice13 213 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 but13 to13 estimate13 gamma13 based13 on13 the13 data13 13 This13 is13 the13 usual13 option

1513 Choice13 313 Choose13 this13 option13 if13 you13 wish13 to13 estimate13 the13 assay13 error13 coefZicients13 based13 on13 your13 data13 for13 use13 in13 future13 runs13 13 Although13 you13 can13 access13 this13 option13 by13 using13 either13 ITrun()13 or13 ERRrun()13 in13 R13 the13 instruction13 Ziles13 that13 you13 save13 and13 the13 generated13 output13 Ziles13 will13 be13 different13 13 Therefore13 we13 recommend13 that13 if13 you13 intend13 to13 choose13 this13 option13 use13 ERRrun()13 in13 R13 which13 will13 generate13 an13 ASS000113 Zile13 that13 contains13 the13 estimates13 for13 C013 C113 C213 and13 C313 13 You13 can13 then13 include13 this13 Zile13 in13 the13 working13 directory13 (along13 with13 a13 model13 txt13 Zile13 and13 a13 data13 csv13 Zile)13 to13 do13 an13 IT2B13 run13 supplying13 the13 Zile13 name13 in13 16113 below

Userrsquos13 Guide13 13 2913 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

NotesBy13 omitting13 a13 Diffeq13 block13 with13 ODEs13 Pmetrics13 understands13 that13 you13 are13 specifying13 the13 model13 to13 be13 solved13 algebraically13 In13 this13 case13 at13 least13 KE13 and13 V13 must13 be13 in13 the13 Primary13 or13 Secondary13 variables13 KA13 KCP13 and13 KPC13 are13 optional13 and13 specify13 absorption13 and13 transfer13 to13 and13 from13 the13 central13 to13 a13 peripheral13 compartment13 respectively

PriKE13 013 5V013 0113 100KA13 013 5Tlag113 013 3Cov13 wt

SecV13 =13 V0wt

LagTLAG(1)13 =13 Tlag1

OutY(1)13 =13 X(2)V

ErrL=04010100

Userrsquos13 Guide13 13 1613 13

Brief13 Fortran13 Tutorial

Much13 more13 detailed13 help13 is13 available13 from13 httpwwwcsmtuedu~sheneCOURSEScs201NOTESfortranhtml

Arithmetic Operator Meaning

+ addition

- subtraction

multiplication

division

exponentiation

Relational Operator Alternative Operator Meaning

lt LT less than

lt= LE less than or equal

gt GT greater than

gt= GE greater than or equal

== EQ equal

= NE not equal

Selective Execution Example

IF (logical-expression) one-statement IF (T gt= 100) CL = 10

IF (logical-expression) THEN statementsEND IF

IF (T gt= 100) THEN CL = 10 V = 10END IF

IF (logical-expression) THEN statements-1ELSE statements-2END IF

IF (T gt= 100) THEN CL = 10ELSE CL = CLEND IF

Userrsquos13 Guide13 13 1713 13

How to use R and PmetricsSeCng13 up13 a13 Pmetrics13 project

When13 beginning13 a13 new13 modeling13 project13 it13 is13 convenient13 to13 use13 the13 command13 PMtree(ldquoproject namerdquo)13 13 This13 command13 will13 set13 up13 a13 new13 directory13 in13 the13 current13 working13 directory13 named13 whatever13 you13 have13 included13 as13 the13 ldquoproject13 namerdquo13 13 For13 example13 a13 directory13 called13 ldquoDrugXrdquo13 will13 be13 created13 by13 PMtree(ldquoDrugXrdquo)13 13 Beneath13 this13 directory13 several13 subdirectories13 will13 be13 also13 created13 Rscript13 Runs13 Sim13 and13 src13 13 The13 Rscript13 subdirectory13 will13 contain13 a13 skeleton13 R13 script13 to13 begin13 Pmetrics13 runs13 in13 the13 new13 project13 13 The13 Runs13 subdirectory13 should13 contain13 all13 Ziles13 required13 for13 a13 run13 (described13 next)13 and13 it13 will13 also13 contain13 the13 resulting13 numerically13 ordered13 run13 directories13 created13 after13 each13 Pmetrics13 NPAG13 or13 IT2B13 run13 13 The13 Sim13 subdirectory13 can13 contain13 any13 Ziles13 related13 to13 simulations13 and13 the13 src13 subdirectory13 should13 contain13 original13 and13 manipulated13 source13 data13 Ziles13 13 Of13 course13 you13 are13 free13 to13 edit13 this13 directory13 tree13 structure13 as13 you13 please13 or13 make13 your13 own13 entirely

GeCng13 the13 required13 files13 to13 run13 Pmetrics

When13 you13 wish13 to13 execute13 a13 Pmetrics13 run13 you13 must13 ensure13 that13 appropriate13 Pmetrics13 model13 txt13 and13 data13 csv13 Ziles13 are13 in13 the13 working13 directory13 ie13 the13 Runs13 subdirectory13 of13 the13 project13 directory13 13 13 13 R13 can13 be13 used13 to13 help13 prepare13 the13 data13 csv13 Zile13 by13 importing13 and13 manipulating13 spreadsheets13 (eg13 readcsv())13 13 The13 Pmetrics13 function13 PMcheck()13 can13 be13 used13 to13 check13 a13 csv13 Zile13 or13 an13 R13 dataframe13 that13 is13 to13 be13 saved13 as13 a13 Pmetrics13 data13 13 csv13 Zile13 for13 errors13 13 13 13 13 13 It13 can13 also13 check13 a13 model13 Zile13 for13 errors13 in13 the13 context13 of13 a13 dataZile13 eg13 covariates13 that13 do13 not13 match13 13 PMfixMatrix()13 attempts13 to13 automatically13 rid13 data13 Ziles13 of13 errors13 13 The13 function13 PMwriteMatrix() 13 can13 be13 used13 to13 write13 the13 R13 data13 object13 in13 the13 correct13 format13 for13 use13 by13 IT2B13 NPAG13 or13 the13 Simulator13 13 You13 can13 also13 download13 sample13 data13 and13 scripts13 from13 the13 Pmetrics13 downloads13 section13 of13 our13 website13 once13 you13 sign13 in13 with13 your13 LAPK13 user13 email13 address13 and13 password13 13 Edit13 prior13 versions13 of13 model13 Ziles13 to13 make13 new13 model13 Ziles

Using13 scripts13 to13 control13 Pmetrics

As13 you13 will13 see13 in13 the13 skeleton13 R13 script13 made13 by13 PMtree() and13 placed13 in13 the13 Rscript13 subdirectory13 if13 this13 is13 a13 Zirst-shy‐time13 run13 the13 R13 commands13 to13 run13 IT2B13 or13 NPAG13 are13 as13 follows13 13 Recall13 that13 the13 ldquordquo13 character13 is13 a13 comment13 character

library(Pmetrics)Run 1 - add your run description heresetwd(ldquoworking directoryrdquo)NPrun() for NPAG or ITrun() for IT2B

The13 Zirst13 line13 will13 load13 the13 Pmetrics13 library13 of13 functions13 13 The13 second13 line13 sets13 the13 working13 directory13 to13 the13 speciZied13 path13 13 The13 third13 line13 generates13 the13 batch13 Zile13 to13 run13 NPAG13 or13 IT2B13 and13 saves13 it13 to13 the13 working13 directory13

NOTE13 13 On13 Mac13 systems13 the13 batch13 Zile13 will13 be13 automatically13 launched13 in13 a13 Terminal13 window13 13 On13 Windows13 systems13 the13 batch13 Zile13 must13 be13 launched13 manually13 by13 double13 clicking13 the13 np_runbat13 or13 it_runbat13 Zile13 in13 the13 working13 directory

ITrun() 13 and13 NPrun()13 both13 return13 the13 full13 path13 of13 the13 output13 directory13 to13 the13 clipboard13 13 By13 default13 runs13 are13 placed13 in13 folders13 numbered13 sequentially13 beginning13 with13 ldquo1rdquoNow13 the13 output13 of13 IT2B13 or13 NPAG13 needs13 to13 be13 loaded13 into13 R13 so13 the13 next13 command13 does13 this

NPload(run_number) or ITload(run_number)

Details13 of13 these13 commands13 and13 what13 is13 loaded13 are13 described13 in13 the13 R13 documentation13 (NPload 13 or13 ITload)13 and13 in13 the13 following13 section13 13 The13 run_number13 should13 be13 included13 within13 the13 parentheses13 to13 be13 appended13 to13 the13 names13

Userrsquos13 Guide13 13 1813 13

of13 loaded13 R13 objects13 allowing13 for13 comparison13 between13 runs13 eg13 NPload(1)13 13 Finally13 at13 this13 point13 other13 Pmetrics13 commands13 can13 be13 added13 to13 the13 script13 to13 process13 the13 data13 such13 as13 the13 following

plot(final1)plot(cycle1)plot(op1type=rdquopoprdquo) or plot(op1$pop1)plot(op1) default is to plot posterior predictions for output 1plot(op1type=rdquopoprdquoresid=T)

Of13 course13 the13 full13 power13 of13 R13 can13 be13 used13 in13 scripts13 to13 analyze13 data13 but13 these13 simple13 statements13 serve13 as13 examplesIf13 you13 do13 not13 use13 the13 PMtree() structure13 we13 suggest13 that13 the13 R13 script13 for13 a13 particular13 project13 be13 saved13 into13 a13 folder13 called13 ldquoRscriptrdquo13 or13 some13 other13 meaningful13 name13 in13 the13 working13 directory13 13 Folders13 are13 not13 be13 moved13 by13 the13 batch13 Zile13 13 Within13 the13 script13 number13 runs13 sequentially13 and13 use13 comments13 liberally13 to13 13 distinguish13 runs13 as13 shown13 below

library(Pmetrics)

Run 1 - Ka Kel V all subjectssetwd(ldquoworking directoryrdquo)NPrun() assumes model=rdquomodeltxtrdquo and data=rdquodatacsvrdquoNPload(1)

Remember13 in13 R13 that13 the13 command13 example(function) will13 provide13 examples13 for13 the13 speciZied13 function13 13 Most13 Pmetrics13 functions13 have13 examples

Pmetrics Data ObjectsAfter13 a13 successful13 IT2B13 or13 NPAG13 run13 an13 R13 dataZile13 is13 saved13 in13 the13 output13 subdirectory13 of13 the13 newly13 created13 numerically13 ordered13 folder13 in13 the13 working13 directory13 13 After13 IT2B13 this13 Zile13 is13 called13 ldquoIT2BoutRdatardquo13 and13 after13 NPAG13 it13 is13 called13 ldquoNPAGoutRdatardquo13 13 As13 mentioned13 in13 the13 previous13 section13 these13 data13 Ziles13 can13 be13 loaded13 by13 ensuring13 that13 the13 Runs13 folder13 is13 set13 as13 the13 working13 directory13 and13 then13 using13 the13 Pmetrics13 commands13 ITload(run_num)13 or13 NPload(run_num)

Both13 commands13 load13 their13 respective13 Rdata13 Ziles13 into13 R13 making13 the13 contained13 objects13 available13 for13 plotting13 and13 other13 analysisObjects13 loaded13 by13 ITload(run_num) and NPload(run_num)

Objects Variables Comments

op13 (class13 PMop13 list) $pop113 $post113 Population13 and13 posterior13 predictions13 for13 each13 output13 equation13 ie13 113 213

13 $id Subject13 identiZication

13 $time Observation13 time13 in13 relative13 decimal13 hours

13 $obs Observation

13 $pred Prediction13 based13 on13 median13 of13 population13 or13 posterior13 parameter13 value13 distributions

Userrsquos13 Guide13 13 1913 13

Objects Variables Comments

13 $block Dosing13 block13 usually13 113 unless13 data13 Zile13 contains13 EVID=413 dose13 reset13 events13 in13 which13 case13 each13 such13 reset13 within13 a13 given13 ID13 will13 increment13 the13 dosing13 block13 by13 113 for13 that13 ID

13 $obsSD Calculated13 standard13 deviation13 (error)13 of13 the13 observation13 based13 on13 the13 assay13 error13 polynomial

13 $d Difference13 between13 pred13 and13 obs

13 $ds Squared13 difference13 between13 pred13 and13 obs

13 $wd $d13 weighted13 by13 the13 $obsSD

13 $wds $ds13 weighted13 by13 the13 $obsSD

Zinal13 (class13 PMZinal13 list) $popPoints (NPAG13 only)13 Dataframe13 of13 the13 Zinal13 cycle13 joint13 population13 density13 of13 grid13 points13 with13 column13 names13 equal13 to13 the13 name13 of13 each13 random13 parameter13 plus13 $prob13 for13 the13 associated13 probability13 of13 that13 point13

$popMean The13 Zinal13 cycle13 mean13 for13 each13 random13 parameter13 distribution

$popSD The13 Zinal13 cycle13 standard13 deviation13 for13 each13 random13 parameter13 distribution

$popCV The13 Zinal13 cycle13 coefZicient13 of13 variation13 for13 each13 random13 parameter13 distribution

$popVar The13 Zinal13 cycle13 variance13 for13 each13 random13 parameter13 distribution

$popCov The13 Zinal13 cycle13 covariance13 matrix13 for13 each13 random13 parameter13 distribution

$popCor The13 Zinal13 cycle13 correlation13 matrix13 for13 each13 random13 parameter13 distribution

$popMedian The13 Zinal13 cycle13 median13 for13 each13 random13 parameter13 distribution

$gridpts (NPAG13 only)13 The13 initial13 number13 of13 support13 points

$ab Matrix13 of13 boundaries13 for13 random13 parameter13 values13 13 For13 NPAG13 this13 is13 speciZied13 by13 the13 user13 prior13 to13 the13 run13 for13 IT2B13 it13 is13 calculated13 as13 a13 user13 speciZied13 multiple13 of13 the13 SD13 for13 the13 parameter13 value13 distribution

Userrsquos13 Guide13 13 2013 13

Objects Variables Comments

cycle13 (class13 PMcycle13 list) $names Vector13 of13 names13 of13 the13 random13 parameters

$ll Matrix13 of13 cycle13 number13 and13 -shy‐2Log-shy‐likelihood13 at13 each13 cycle

$gamlam A13 matrix13 of13 cycle13 number13 and13 gamma13 or13 lambda13 at13 each13 cycle13 (see13 item13 1613 under13 NPAG13 Runs13 below13 for13 a13 discussion13 of13 gamma13 and13 lambda)

$mean A13 matrix13 of13 cycle13 number13 and13 the13 mean13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 mean

$sd A13 matrix13 of13 cycle13 number13 and13 the13 standard13 deviation13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$median A13 matrix13 of13 cycle13 number13 and13 the13 median13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$aic A13 matrix13 of13 cycle13 number13 and13 Akaike13 Information13 Criterion13 at13 each13 cycle

$bic A13 matrix13 of13 cycle13 number13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle

cov13 (class13 PMcov13 dataframe)

$id Subject13 identiZication

$time Time13 for13 each13 covariate13 entry

covariates Covariate13 values13 for13 each13 subject13 at13 each13 time13 extracted13 from13 the13 raw13 data13 Zile

parameters Mean13 median13 or13 mode13 of13 Bayesian13 posterior13 distribution13 for13 each13 random13 parameter13 in13 the13 model13 13 Mode13 summaries13 are13 available13 for13 NPAG13 output13 only13 and13 the13 default13 is13 median13 13 Values13 are13 recycled13 for13 each13 row13 within13 a13 given13 subject13 with13 the13 number13 of13 rows13 driven13 by13 the13 number13 of13 covariate13 entries

Userrsquos13 Guide13 13 2113 13

Objects Variables Comments

pop13 (class13 PMpop13 dataframe)

post13 (class13 PMpost13 dataframe)

NPAG13 only

$id Subject13 identiZication

$pred113 Population13 prior13 (PMpop)13 or13 Bayesian13 posterior13 (PMpost)13 predictions13 for13 each13 output13 equation13 based13 on13 mean13 median13 and13 mode13 as13 speciZied13 by13 the13 user13 and13 with13 frequency13 also13 speciZied13 by13 the13 user13 in13 the13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

$block Same13 as13 for13 PMop13 objects13 above

NPdata13 (class13 NPAG13 list)13 ITdata13 (class13 IT2B13 list

Raw13 data13 used13 to13 make13 the13 above13 objects13 13 Please13 use13 NPparse13 or13 ITparse13 in13 R13 for13 discussion13 of13 the13 data13 contained13 in13 these13 objects

Since13 R13 is13 an13 object13 oriented13 language13 to13 access13 the13 observations13 in13 a13 PMop13 object13 for13 example13 use13 the13 following13 syntax13 op$post1$obsNote13 that13 you13 will13 place13 an13 integer13 within13 the13 parentheses13 of13 the13 loading13 functions13 eg13 NPload(1)13 which13 will13 sufZix13 all13 the13 above13 objects13 with13 that13 integer13 eg13 op113 Zinal113 NPdata113 13 This13 allows13 several13 models13 to13 be13 loaded13 into13 R13 simultaneously13 each13 with13 a13 unique13 sufZix13 and13 which13 can13 be13 compared13 with13 the13 PMcompare()13 command13 (see13 Model13 Diagnostics13 below)

Making New Pmetrics ObjectsOnce13 you13 have13 loaded13 the13 raw13 (NPdata13 or13 ITdata)13 or13 processed13 (op13 Uinal13 cycle13 pop13 post)13 data13 objects13 described13 above13 with13 NPload(run_num)13 or13 ITload(run_num)13 should13 you13 wish13 to13 remake13 the13 processed13 objects13 with13 parameters13 other13 than13 the13 defaults13 you13 can13 easily13 do13 so13 with13 the13 make 13 family13 of13 commands13 13 For13 example13 the13 default13 for13 PMop13 observed13 vs13 predicted13 objects13 is13 to13 use13 the13 prediction13 based13 on13 the13 median13 of13 the13 population13 or13 posterior13 distribution13 13 If13 you13 wish13 to13 use13 the13 mean13 of13 the13 distribution13 remake13 the13 PMop13 object13 using makeOP()13 13 If13 you13 wish13 to13 see13 all13 the13 cycle13 information13 in13 a13 PMcycle13 object13 not13 omitting13 the13 Zirst13 1013 of13 cycles13 by13 default13 remake13 it13 using13 makeCycle()13 13

For13 all13 of13 the13 following13 commands13 the13 data13 input13 is13 either13 NPdata13 or13 ITdata13 with13 additional13 function13 arguments13 speciZic13 to13 each13 command13 13 Accessing13 the13 help13 for13 each13 function13 in13 R13 will13 provide13 further13 details13 on13 the13 arguments13 defaults13 and13 output13 of13 each13 command

Userrsquos13 Guide13 13 2213 13

Command Description R13 help

makeAUC Make13 a13 dataframe13 of13 class13 PMauc13 containing13 subject13 ID13 and13 AUC13 from13 a13 variety13 of13 inputs13 including13 objects13 of13 PMop13 PMsim13 or13 a13 suitable13 dataframe

makeAUC

makeCov Generate13 a13 dataframe13 of13 class13 PMcov13 with13 subject-shy‐speciZic13 covariates13 extracted13 from13 the13 data13 csv13 Zile13 This13 object13 can13 be13 plotted13 and13 used13 to13 test13 for13 covariates13 which13 are13 signiZicantly13 associated13 with13 model13 parameters13 13

makeCov

makeCycle Create13 a13 PMcycle13 object13 described13 in13 the13 previous13 section makeCycle

makeFinal Create13 a13 PMZinal13 object13 described13 in13 the13 previous13 section makeFinal

makeOP Create13 a13 PMop13 object13 described13 in13 the13 previous13 section makeOP

makeNCA Create13 a13 dataframe13 (class13 PMnca)13 with13 the13 output13 of13 a13 non-shy‐compartmental13 analysis13 using13 PMpost13 and13 NPAG13 data13 objects13 as13 input13 13 The13 PMnca13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull auc13 Area13 under13 the13 time-shy‐observation13 curve13 using13 the13

trapezoidal13 approximation13 from13 time13 013 until13 the13 second13 dose13 or13 if13 only13 one13 dose13 until13 the13 last13 observation

bull aumc13 Area13 under13 the13 Zirst13 moment13 curvebull k13 Slope13 by13 least-shy‐squares13 linear13 regression13 of13 the13 Zinal13

613 log-shy‐transformed13 observations13 vs13 timebull auclast13 Area13 under13 the13 curve13 from13 the13 time13 of13 the13

last13 observation13 to13 inZinity13 calculated13 as13 [Final13 obs]kbull aumclast13 Area13 under13 the13 Zirst13 moment13 curve13 from13

the13 time13 of13 the13 last13 observation13 to13 inZinitybull aucinf13 Area13 under13 the13 curve13 from13 time13 013 to13 inZinity13

caluculated13 as13 auc13 +13 auclastbull aumcinf13 Area13 under13 the13 Zirst13 moment13 curve13 from13

time13 013 to13 inZinitybull mrt13 Mean13 residence13 time13 calculated13 as13 1kbull cmax13 Maximum13 predicted13 concentration13 after13 the13

Zirst13 dosebull tmax13 Time13 to13 cmaxbull cl13 Clearance13 calculated13 as13 doseaucinfbull vdss13 Volume13 of13 distribution13 at13 steady13 state13

calculated13 as13 clmrtbull thalf13 Half13 life13 of13 elimination13 calculated13 as13 ln(2)kbull dose13 First13 dose13 amount13 for13 each13 subject

makeNCA

Userrsquos13 Guide13 13 2313 13

Command Description R13 help

makeErrorPoly This13 function13 plots13 Zirst13 second13 and13 third13 order13 polynomial13 functions13 Zitted13 to13 pairs13 of13 observations13 and13 associated13 standard13 deviations13 for13 a13 given13 output13 assay13 In13 this13 way13 the13 standard13 deviation13 associated13 with13 any13 observation13 may13 be13 calculated13 and13 used13 to13 appropriately13 weight13 that13 observation13 in13 the13 model13 building13 process13 Observations13 are13 weighted13 by13 the13 reciprocal13 of13 the13 variance13 or13 squared13 standard13 deviation13 13 Output13 of13 the13 function13 is13 a13 plot13 of13 the13 measured13 observations13 and13 Zitted13 polynomial13 curves13 and13 a13 list13 with13 the13 Zirst13 second13 and13 third13 order13 coefZicients

makeErrorPoly

makePTA This13 function13 performs13 a13 Probability13 of13 Target13 Attainment13 analysis13 for13 a13 set13 of13 simulated13 doses13 and13 time-shy‐concentration13 proZiles13 13 Targets13 (eg13 Minimum13 Inhibitory13 Concentrations)13 the13 type13 of13 target13 attainment13 (ie13 time13 above13 target13 Cmaxtarget13 13 AUCtarget13 Cmintarget13 or13 Cxtarget13 where13 x13 is13 any13 time13 point)13 and13 the13 success13 threshold13 (eg13 time13 gt13 0713 or13 Cmaxtarget13 gt13 10)13 can13 all13 be13 speciZied13 13 Output13 is13 a13 list13 (class13 PMpta)13 with13 two13 objectsbull Results13 a13 413 dimensional13 array13 with13 dimension13 size13 of13

[number13 of13 doses13 number13 of13 targets13 number13 of13 simulated13 proZiles13 1]13 which13 gives13 the13 target13 attainment13 (eg13 Cmaxtarget)13 for13 each13 dose13 target13 and13 proZile

bull Outcome13 For13 each13 dose13 and13 target13 a13 summary13 of13 the13 target13 attainment13 for13 all13 the13 proZiles13 including13 mean13 standard13 deviation13 and13 proportion13 above13 the13 success13 threshold

PMpta13 objects13 can13 be13 summarized13 with13 summary(x)13 and13 plotted13 with13 plot(x)13

makePTA

Userrsquos13 Guide13 13 2413 13

Command Description R13 help

makePopmakePost(NPAG13 only)

These13 functions13 create13 dataframes13 of13 class13 PMpop13 and13 PMpost13 respectively13 13 The13 PMpop13 or13 PMpost13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull time13 Times13 for13 predicted13 concentrations13 13 These13

times13 are13 not13 necessarily13 at13 observed13 times13 but13 at13 a13 frequency13 speciZied13 in13 the13 NPAG13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

bull pred113 Predictions13 for13 output13 113 13 For13 PMpop13 objects13 predictions13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 population13 prior13 distribution13 13 For13 PMpost13 objects13 they13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject

bull pred213 pred313 etc13 If13 additional13 outputs13 exist13 they13 will13 each13 be13 columns13 in13 the13 dataframe13 just13 as13 for13 pred113 13

makePopmakePost

NPAG RunsIn13 the13 past13 users13 had13 to13 run13 NPAG13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 NPrun()13 13 However13 if13 NPrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable

1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 NPAG13 creates13 a13 temporary13 instruction13 Zile13 in13 case13 something13 happens13 so13 that13 instructions13 entered13 to13 date13 can13

be13 recovered13 13 Accept13 the13 default13 by13 choosing13 113 13 You13 can13 save13 with13 a13 meaningful13 Zilename13 later13 13 If13 it13 already13 exists13 you13 will13 be13 asked13 if13 you13 wish13 to13 overwrite13 the13 Zile13 which13 is13 usually13 the13 thing13 to13 do

Userrsquos13 Guide13 13 2513 13

8 If13 you13 have13 previously13 run13 IT2B13 you13 can13 automatically13 import13 the13 suggested13 parameter13 ranges13 13 Choose13 113 to13 do13 this13 and13 013 to13 run13 NPAG13 without13 a13 previous13 IT2B13 run81 If13 you13 choose13 option13 113 you13 must13 specify13 the13 name13 of13 a13 FROMxxxx13 Zile13 typically13 FROM000113 that13 you13 can13

Zind13 in13 an13 output13 directory13 after13 a13 successful13 IT2B13 run13 13 Note13 that13 the13 program13 will13 then13 assume13 that13 you13 are13 using13 the13 same13 wrk13 Ziles13 that13 IT2B13 made13 from13 your13 data13 csv13 Zile13 13 It13 is13 strongly13 recommended13 to13 override13 this13 and13 specify13 a13 data13 csv13 Zile13 13 At13 this13 point13 you13 will13 jump13 to13 1013 below13 and13 continue13 on13 however13 your13 answers13 will13 often13 be13 supplied13 by13 the13 instructions13 contained13 in13 the13 FROMxxxx13 Zile13 and13 you13 need13 merely13 conZirm13 them

9 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13 have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 NPrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis91 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13

for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

10 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 NPAG13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

11 Enter13 the13 name13 of13 your13 csv13 Zile13 now12 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile13 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset131 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects132 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry14 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset15 Enter13 the13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo 13 followed13 by13

return16 Select13 how13 you13 would13 like13 to13 model13 assay13 (observation)13 error13 for13 each13 output13 equation13 13 You13 have13 four13 choices13 13

In13 all13 four13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0161 Error13 model13 113 (SD)13 13 Choose13 this13 option13 if13 you13 have13 already13 run13 IT2B13 and13 multiplied13 your13 assay13 error13

polynomial13 by13 gamma13 (see13 next13 option13 for13 a13 description13 of13 gamma)162 Error13 model13 213 (SD13 13 gamma)13 13 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13

observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 If13 you13 choose13 this13 option13 you13 then13 can13 specify13 the13 starting13 value13 of13 gamma13 13 Good13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality

163 Error13 model13 313 (SD213 +13 lamda2)0513 13 Lamda13 is13 an13 alternative13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present

Userrsquos13 Guide13 13 2613 13

164 Error13 model13 413 SD13 =13 gamma13 13 This13 model13 is13 rarely13 used13 and13 is13 equivalent13 to13 specifying13 a13 model13 with13 C013 only13 ie13 a13 constant13 error13 regardless13 of13 concentration

17 Once13 you13 select13 the13 assay13 error13 model13 for13 each13 output13 equation13 you13 are13 then13 offered13 four13 more13 options13 on13 which13 assay13 error13 polynomial13 coefZicients13 to13 use13 13 Choices13 113 and13 213 are13 the13 most13 commonly13 used171 Choice13 113 The13 default13 13 Use13 coefZicients13 in13 the13 subject13 record13 (C013 C113 C213 C313 in13 the13 data13 csv13 Zile)13 and13 if13

missing13 use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 (item13 1813 below)172 Choice13 213 Use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 for13 all13 subjects13 regardless13 of13 what13 is13 in13 the13

data13 csv13 Zile173 Choice13 313 13 To13 multiply13 data13 csv13 values13 and13 default13 entered13 values13 by13 a13 Zixed13 gamma13 and13 use13 them13 13 174 Choice13 013 Specify13 coefZicients13 on13 a13 subject13 by13 subject13 basis13 either13 those13 in13 the13 data13 csv13 Zile13 already13 the13

default13 values13 entered13 into13 the13 program13 or13 other13 values18 For13 each13 output13 equation13 after13 you13 have13 selected13 the13 option13 in13 item13 1713 you13 will13 be13 prompted13 to13 supply13 the13

required13 information13 including13 the13 general13 default13 values13 for13 missing13 or13 overridden13 values13 in13 the13 data13 csv13 Zile19 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13

usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13

20 Enter13 the13 grid13 point13 index13 13 This13 number13 corresponds13 to13 the13 number13 of13 grid13 (support)13 points13 which13 will13 initially13 Zill13 the13 model13 parameter13 space13 13 The13 larger13 the13 number13 of13 random13 parameters13 to13 be13 estimated13 the13 more13 points13 are13 required13 13 The13 program13 will13 make13 a13 suggestion13 based13 on13 the13 number13 of13 random13 parameters13 in13 the13 model13 13 The13 more13 you13 choose13 the13 slower13 the13 run13 will13 be13 but13 results13 may13 improve13 13 It13 is13 reasonable13 to13 choose13 fewer13 points13 early13 in13 model13 exploration13 and13 increase13 in13 later13 phases13 or13 if13 poor13 model13 Zits13 or13 lack13 of13 convergence13 are13 noted13 The13 choices13 are13 113 to13 713 corresponding13 respectively13 to13 212913 500313 1000713 2001113 4000913 and13 8002113 points13 13 If13 you13 choose13 713 you13 then13 have13 an13 additional13 choice13 to13 select13 one13 or13 more13 multiples13 of13 8002113 points

21 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 013 or13 greater13 13 If13 you13 enter13 an13 integer13 greater13 than13 013 the13 engine13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13 If13 you13 enter13 013 this13 is13 the13 way13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 an13 independent13 data13 set13 and13 a13 non-shy‐uniform13 prior13 must13 be13 speciZied13 (see13 3013 below)13 13 This13 means13 that13 the13 engine13 will13 only13 calculate13 the13 individual13 Bayesian13 posteriors13 for13 the13 new13 subjects13 using13 the13 population13 joint13 density13 from13 a13 previous13 run13 as13 a13 Bayesian13 prior

22 Information13 about13 convergence13 criteria13 13 Answer13 113 or13 some13 other13 keystroke13 plus13 Return13 to13 acknowledge13 that13 you13 have13 read13 it

23 In13 order13 to13 predict13 concentrations13 from13 a13 non-shy‐parametric13 distribution13 you13 have13 the13 option13 to13 use13 the13 1)13 mean13 2)13 median13 or13 3)13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject13 13 We13 typically13 use13 the13 median13 Zirst13 and13 then13 the13 mean13 in13 a13 separate13 run13 and13 compare13 the13 differences13 13

24 Select13 the13 time13 interval13 to13 generate13 predicted13 concentrations13 13 Additionally13 there13 will13 also13 be13 predictions13 made13 at13 the13 time13 of13 each13 observation13 13 In13 general13 for13 most13 models13 predictions13 every13 1213 minutes13 provide13 sufZicient13 granularity13 13 Smaller13 values13 can13 result13 in13 very13 large13 Ziles13 for13 big13 populations

25 Select13 the13 default13 MIC13 to13 be13 used13 for13 AUCMIC13 ratio13 reporting13 13 This13 should13 generally13 be13 set13 to13 the13 default13 of13 113 by13 choosing13 113 13 You13 can13 always13 extract13 the13 AUC13 later13 and13 divide13 it13 by13 any13 MIC13 you13 choose

26 Enter13 the13 value13 in13 hours13 that13 you13 want13 for13 calculations13 of13 AUCs13 from13 predicted13 concentration13 proZiles13 13 The13 default13 is13 2413 hours13 which13 you13 can13 accept13 by13 entering13 113 or13 013 if13 you13 want13 to13 specify13 a13 different13 interval

27 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

28 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

Userrsquos13 Guide13 13 2713 13

29 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

30 For13 the13 prior13 density13 choose13 113 if13 it13 is13 to13 be13 uniform13 13 This13 means13 that13 the13 initial13 grid13 points13 will13 be13 evenly13 distributed13 with13 equal13 probability13 within13 the13 boundaries13 speciZied13 (in13 1513 above)13 13 If13 you13 choose13 013 you13 will13 be13 prompted13 for13 the13 name13 of13 a13 Zile13 that13 contains13 the13 prior13 density13 13 This13 will13 be13 DEN000113 unless13 you13 have13 changed13 its13 name13 13 It13 will13 be13 found13 in13 the13 output13 directory13 of13 a13 prior13 NPAG13 run13 13 The13 model13 used13 to13 generate13 the13 DEN000113 Zile13 must13 be13 exactly13 the13 same13 as13 the13 current13 model13 including13 parameter13 boundaries13 13 However13 this13 option13 is13 useful13 to13 specify13 a13 non-shy‐uniform13 density13 for13 two13 reasons13 13 The13 Zirst13 is13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 a13 new13 set13 of13 subjects13 13 Do13 this13 in13 combination13 with13 setting13 the13 number13 of13 cycles13 to13 013 (see13 2113 above)13 13 The13 second13 use13 for13 a13 non-shy‐uniform13 prior13 is13 to13 continue13 a13 previous13 run13 13 For13 example13 if13 you13 only13 set13 the13 number13 of13 cycles13 to13 5013 to13 get13 a13 rough13 idea13 of13 model13 Zit13 you13 may13 continue13 where13 you13 left13 off13 by13 specifying13 the13 DEN000113 Zile13 from13 the13 50-shy‐cycle13 run13 and13 continuing13 with13 as13 many13 additional13 cycles13 as13 you13 specify13 in13 item13 2113 13 So13 in13 the13 example13 if13 you13 specify13 10013 cycles13 in13 2113 the13 total13 number13 of13 cycles13 will13 be13 5013 +13 10013 =13 150

31 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 NPrun(instr=ldquoyourfilerdquo)13 option13 and13 including13 ldquoyourZilerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

32 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 NPAG13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 NPAG13 analysis

33 The13 NPAG13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

IT2B RunsIn13 the13 past13 users13 had13 to13 run13 IT2B13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 ITrun()13 13 However13 if13 ITrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13

have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 ITrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis

Userrsquos13 Guide13 13 2813 13

71 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13 for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

8 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 IT2B13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

9 Enter13 the13 name13 of13 your13 csv13 Zile13 now10 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile11 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset111 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects112 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry12 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset13 Enter13 the13 initial13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo13 followed13

by13 return14 The13 estimated13 mean13 for13 each13 parameter13 value13 distribution13 during13 the13 Zirst13 iteration13 will13 be13 the13 median13 of13 the13

range13 speciZied13 in13 1313 13 You13 now13 have13 the13 option13 to13 specify13 the13 standard13 deviation13 for13 the13 parameter13 value13 distribution13 which13 by13 default13 is13 half13 of13 the13 range13 in13 1313 13 Choose13 113 to13 accept13 this13 (the13 usual13 answer)13 or13 013 to13 change13 it13 to13 something13 else13 expressed13 as13 a13 multiple13 of13 the13 range

15 In13 IT2B13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 You13 can13 now13 choose13 113 if13 every13 subject13 has13 the13 same13 coefZicients13 or13 013 to13 use13 a13 unique13 set13 of13 coefZicients13 for13 each13 subject13 13 The13 Zirst13 case13 is13 the13 more13 usual13 when13 all13 13 samples13 from13 all13 subjects13 are13 analyzed13 in13 the13 same13 lab13 13 If13 13 samples13 are13 analyzed13 in13 different13 labs13 and13 you13 have13 the13 assay13 data13 from13 each13 lab13 then13 you13 would13 enter13 013 13 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 (see13 151313 below)13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0151 If13 you13 choose13 113 (one13 set13 of13 coefZicients13 for13 all13 subjects)13 you13 will13 then13 be13 presented13 with13 313 additional13

choices1511 Choice13 113 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13 observation13

including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 and13 to13 Zix13 gamma13 to13 1

1512 Choice13 213 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 but13 to13 estimate13 gamma13 based13 on13 the13 data13 13 This13 is13 the13 usual13 option

1513 Choice13 313 Choose13 this13 option13 if13 you13 wish13 to13 estimate13 the13 assay13 error13 coefZicients13 based13 on13 your13 data13 for13 use13 in13 future13 runs13 13 Although13 you13 can13 access13 this13 option13 by13 using13 either13 ITrun()13 or13 ERRrun()13 in13 R13 the13 instruction13 Ziles13 that13 you13 save13 and13 the13 generated13 output13 Ziles13 will13 be13 different13 13 Therefore13 we13 recommend13 that13 if13 you13 intend13 to13 choose13 this13 option13 use13 ERRrun()13 in13 R13 which13 will13 generate13 an13 ASS000113 Zile13 that13 contains13 the13 estimates13 for13 C013 C113 C213 and13 C313 13 You13 can13 then13 include13 this13 Zile13 in13 the13 working13 directory13 (along13 with13 a13 model13 txt13 Zile13 and13 a13 data13 csv13 Zile)13 to13 do13 an13 IT2B13 run13 supplying13 the13 Zile13 name13 in13 16113 below

Userrsquos13 Guide13 13 2913 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

Brief13 Fortran13 Tutorial

Much13 more13 detailed13 help13 is13 available13 from13 httpwwwcsmtuedu~sheneCOURSEScs201NOTESfortranhtml

Arithmetic Operator Meaning

+ addition

- subtraction

multiplication

division

exponentiation

Relational Operator Alternative Operator Meaning

lt LT less than

lt= LE less than or equal

gt GT greater than

gt= GE greater than or equal

== EQ equal

= NE not equal

Selective Execution Example

IF (logical-expression) one-statement IF (T gt= 100) CL = 10

IF (logical-expression) THEN statementsEND IF

IF (T gt= 100) THEN CL = 10 V = 10END IF

IF (logical-expression) THEN statements-1ELSE statements-2END IF

IF (T gt= 100) THEN CL = 10ELSE CL = CLEND IF

Userrsquos13 Guide13 13 1713 13

How to use R and PmetricsSeCng13 up13 a13 Pmetrics13 project

When13 beginning13 a13 new13 modeling13 project13 it13 is13 convenient13 to13 use13 the13 command13 PMtree(ldquoproject namerdquo)13 13 This13 command13 will13 set13 up13 a13 new13 directory13 in13 the13 current13 working13 directory13 named13 whatever13 you13 have13 included13 as13 the13 ldquoproject13 namerdquo13 13 For13 example13 a13 directory13 called13 ldquoDrugXrdquo13 will13 be13 created13 by13 PMtree(ldquoDrugXrdquo)13 13 Beneath13 this13 directory13 several13 subdirectories13 will13 be13 also13 created13 Rscript13 Runs13 Sim13 and13 src13 13 The13 Rscript13 subdirectory13 will13 contain13 a13 skeleton13 R13 script13 to13 begin13 Pmetrics13 runs13 in13 the13 new13 project13 13 The13 Runs13 subdirectory13 should13 contain13 all13 Ziles13 required13 for13 a13 run13 (described13 next)13 and13 it13 will13 also13 contain13 the13 resulting13 numerically13 ordered13 run13 directories13 created13 after13 each13 Pmetrics13 NPAG13 or13 IT2B13 run13 13 The13 Sim13 subdirectory13 can13 contain13 any13 Ziles13 related13 to13 simulations13 and13 the13 src13 subdirectory13 should13 contain13 original13 and13 manipulated13 source13 data13 Ziles13 13 Of13 course13 you13 are13 free13 to13 edit13 this13 directory13 tree13 structure13 as13 you13 please13 or13 make13 your13 own13 entirely

GeCng13 the13 required13 files13 to13 run13 Pmetrics

When13 you13 wish13 to13 execute13 a13 Pmetrics13 run13 you13 must13 ensure13 that13 appropriate13 Pmetrics13 model13 txt13 and13 data13 csv13 Ziles13 are13 in13 the13 working13 directory13 ie13 the13 Runs13 subdirectory13 of13 the13 project13 directory13 13 13 13 R13 can13 be13 used13 to13 help13 prepare13 the13 data13 csv13 Zile13 by13 importing13 and13 manipulating13 spreadsheets13 (eg13 readcsv())13 13 The13 Pmetrics13 function13 PMcheck()13 can13 be13 used13 to13 check13 a13 csv13 Zile13 or13 an13 R13 dataframe13 that13 is13 to13 be13 saved13 as13 a13 Pmetrics13 data13 13 csv13 Zile13 for13 errors13 13 13 13 13 13 It13 can13 also13 check13 a13 model13 Zile13 for13 errors13 in13 the13 context13 of13 a13 dataZile13 eg13 covariates13 that13 do13 not13 match13 13 PMfixMatrix()13 attempts13 to13 automatically13 rid13 data13 Ziles13 of13 errors13 13 The13 function13 PMwriteMatrix() 13 can13 be13 used13 to13 write13 the13 R13 data13 object13 in13 the13 correct13 format13 for13 use13 by13 IT2B13 NPAG13 or13 the13 Simulator13 13 You13 can13 also13 download13 sample13 data13 and13 scripts13 from13 the13 Pmetrics13 downloads13 section13 of13 our13 website13 once13 you13 sign13 in13 with13 your13 LAPK13 user13 email13 address13 and13 password13 13 Edit13 prior13 versions13 of13 model13 Ziles13 to13 make13 new13 model13 Ziles

Using13 scripts13 to13 control13 Pmetrics

As13 you13 will13 see13 in13 the13 skeleton13 R13 script13 made13 by13 PMtree() and13 placed13 in13 the13 Rscript13 subdirectory13 if13 this13 is13 a13 Zirst-shy‐time13 run13 the13 R13 commands13 to13 run13 IT2B13 or13 NPAG13 are13 as13 follows13 13 Recall13 that13 the13 ldquordquo13 character13 is13 a13 comment13 character

library(Pmetrics)Run 1 - add your run description heresetwd(ldquoworking directoryrdquo)NPrun() for NPAG or ITrun() for IT2B

The13 Zirst13 line13 will13 load13 the13 Pmetrics13 library13 of13 functions13 13 The13 second13 line13 sets13 the13 working13 directory13 to13 the13 speciZied13 path13 13 The13 third13 line13 generates13 the13 batch13 Zile13 to13 run13 NPAG13 or13 IT2B13 and13 saves13 it13 to13 the13 working13 directory13

NOTE13 13 On13 Mac13 systems13 the13 batch13 Zile13 will13 be13 automatically13 launched13 in13 a13 Terminal13 window13 13 On13 Windows13 systems13 the13 batch13 Zile13 must13 be13 launched13 manually13 by13 double13 clicking13 the13 np_runbat13 or13 it_runbat13 Zile13 in13 the13 working13 directory

ITrun() 13 and13 NPrun()13 both13 return13 the13 full13 path13 of13 the13 output13 directory13 to13 the13 clipboard13 13 By13 default13 runs13 are13 placed13 in13 folders13 numbered13 sequentially13 beginning13 with13 ldquo1rdquoNow13 the13 output13 of13 IT2B13 or13 NPAG13 needs13 to13 be13 loaded13 into13 R13 so13 the13 next13 command13 does13 this

NPload(run_number) or ITload(run_number)

Details13 of13 these13 commands13 and13 what13 is13 loaded13 are13 described13 in13 the13 R13 documentation13 (NPload 13 or13 ITload)13 and13 in13 the13 following13 section13 13 The13 run_number13 should13 be13 included13 within13 the13 parentheses13 to13 be13 appended13 to13 the13 names13

Userrsquos13 Guide13 13 1813 13

of13 loaded13 R13 objects13 allowing13 for13 comparison13 between13 runs13 eg13 NPload(1)13 13 Finally13 at13 this13 point13 other13 Pmetrics13 commands13 can13 be13 added13 to13 the13 script13 to13 process13 the13 data13 such13 as13 the13 following

plot(final1)plot(cycle1)plot(op1type=rdquopoprdquo) or plot(op1$pop1)plot(op1) default is to plot posterior predictions for output 1plot(op1type=rdquopoprdquoresid=T)

Of13 course13 the13 full13 power13 of13 R13 can13 be13 used13 in13 scripts13 to13 analyze13 data13 but13 these13 simple13 statements13 serve13 as13 examplesIf13 you13 do13 not13 use13 the13 PMtree() structure13 we13 suggest13 that13 the13 R13 script13 for13 a13 particular13 project13 be13 saved13 into13 a13 folder13 called13 ldquoRscriptrdquo13 or13 some13 other13 meaningful13 name13 in13 the13 working13 directory13 13 Folders13 are13 not13 be13 moved13 by13 the13 batch13 Zile13 13 Within13 the13 script13 number13 runs13 sequentially13 and13 use13 comments13 liberally13 to13 13 distinguish13 runs13 as13 shown13 below

library(Pmetrics)

Run 1 - Ka Kel V all subjectssetwd(ldquoworking directoryrdquo)NPrun() assumes model=rdquomodeltxtrdquo and data=rdquodatacsvrdquoNPload(1)

Remember13 in13 R13 that13 the13 command13 example(function) will13 provide13 examples13 for13 the13 speciZied13 function13 13 Most13 Pmetrics13 functions13 have13 examples

Pmetrics Data ObjectsAfter13 a13 successful13 IT2B13 or13 NPAG13 run13 an13 R13 dataZile13 is13 saved13 in13 the13 output13 subdirectory13 of13 the13 newly13 created13 numerically13 ordered13 folder13 in13 the13 working13 directory13 13 After13 IT2B13 this13 Zile13 is13 called13 ldquoIT2BoutRdatardquo13 and13 after13 NPAG13 it13 is13 called13 ldquoNPAGoutRdatardquo13 13 As13 mentioned13 in13 the13 previous13 section13 these13 data13 Ziles13 can13 be13 loaded13 by13 ensuring13 that13 the13 Runs13 folder13 is13 set13 as13 the13 working13 directory13 and13 then13 using13 the13 Pmetrics13 commands13 ITload(run_num)13 or13 NPload(run_num)

Both13 commands13 load13 their13 respective13 Rdata13 Ziles13 into13 R13 making13 the13 contained13 objects13 available13 for13 plotting13 and13 other13 analysisObjects13 loaded13 by13 ITload(run_num) and NPload(run_num)

Objects Variables Comments

op13 (class13 PMop13 list) $pop113 $post113 Population13 and13 posterior13 predictions13 for13 each13 output13 equation13 ie13 113 213

13 $id Subject13 identiZication

13 $time Observation13 time13 in13 relative13 decimal13 hours

13 $obs Observation

13 $pred Prediction13 based13 on13 median13 of13 population13 or13 posterior13 parameter13 value13 distributions

Userrsquos13 Guide13 13 1913 13

Objects Variables Comments

13 $block Dosing13 block13 usually13 113 unless13 data13 Zile13 contains13 EVID=413 dose13 reset13 events13 in13 which13 case13 each13 such13 reset13 within13 a13 given13 ID13 will13 increment13 the13 dosing13 block13 by13 113 for13 that13 ID

13 $obsSD Calculated13 standard13 deviation13 (error)13 of13 the13 observation13 based13 on13 the13 assay13 error13 polynomial

13 $d Difference13 between13 pred13 and13 obs

13 $ds Squared13 difference13 between13 pred13 and13 obs

13 $wd $d13 weighted13 by13 the13 $obsSD

13 $wds $ds13 weighted13 by13 the13 $obsSD

Zinal13 (class13 PMZinal13 list) $popPoints (NPAG13 only)13 Dataframe13 of13 the13 Zinal13 cycle13 joint13 population13 density13 of13 grid13 points13 with13 column13 names13 equal13 to13 the13 name13 of13 each13 random13 parameter13 plus13 $prob13 for13 the13 associated13 probability13 of13 that13 point13

$popMean The13 Zinal13 cycle13 mean13 for13 each13 random13 parameter13 distribution

$popSD The13 Zinal13 cycle13 standard13 deviation13 for13 each13 random13 parameter13 distribution

$popCV The13 Zinal13 cycle13 coefZicient13 of13 variation13 for13 each13 random13 parameter13 distribution

$popVar The13 Zinal13 cycle13 variance13 for13 each13 random13 parameter13 distribution

$popCov The13 Zinal13 cycle13 covariance13 matrix13 for13 each13 random13 parameter13 distribution

$popCor The13 Zinal13 cycle13 correlation13 matrix13 for13 each13 random13 parameter13 distribution

$popMedian The13 Zinal13 cycle13 median13 for13 each13 random13 parameter13 distribution

$gridpts (NPAG13 only)13 The13 initial13 number13 of13 support13 points

$ab Matrix13 of13 boundaries13 for13 random13 parameter13 values13 13 For13 NPAG13 this13 is13 speciZied13 by13 the13 user13 prior13 to13 the13 run13 for13 IT2B13 it13 is13 calculated13 as13 a13 user13 speciZied13 multiple13 of13 the13 SD13 for13 the13 parameter13 value13 distribution

Userrsquos13 Guide13 13 2013 13

Objects Variables Comments

cycle13 (class13 PMcycle13 list) $names Vector13 of13 names13 of13 the13 random13 parameters

$ll Matrix13 of13 cycle13 number13 and13 -shy‐2Log-shy‐likelihood13 at13 each13 cycle

$gamlam A13 matrix13 of13 cycle13 number13 and13 gamma13 or13 lambda13 at13 each13 cycle13 (see13 item13 1613 under13 NPAG13 Runs13 below13 for13 a13 discussion13 of13 gamma13 and13 lambda)

$mean A13 matrix13 of13 cycle13 number13 and13 the13 mean13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 mean

$sd A13 matrix13 of13 cycle13 number13 and13 the13 standard13 deviation13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$median A13 matrix13 of13 cycle13 number13 and13 the13 median13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$aic A13 matrix13 of13 cycle13 number13 and13 Akaike13 Information13 Criterion13 at13 each13 cycle

$bic A13 matrix13 of13 cycle13 number13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle

cov13 (class13 PMcov13 dataframe)

$id Subject13 identiZication

$time Time13 for13 each13 covariate13 entry

covariates Covariate13 values13 for13 each13 subject13 at13 each13 time13 extracted13 from13 the13 raw13 data13 Zile

parameters Mean13 median13 or13 mode13 of13 Bayesian13 posterior13 distribution13 for13 each13 random13 parameter13 in13 the13 model13 13 Mode13 summaries13 are13 available13 for13 NPAG13 output13 only13 and13 the13 default13 is13 median13 13 Values13 are13 recycled13 for13 each13 row13 within13 a13 given13 subject13 with13 the13 number13 of13 rows13 driven13 by13 the13 number13 of13 covariate13 entries

Userrsquos13 Guide13 13 2113 13

Objects Variables Comments

pop13 (class13 PMpop13 dataframe)

post13 (class13 PMpost13 dataframe)

NPAG13 only

$id Subject13 identiZication

$pred113 Population13 prior13 (PMpop)13 or13 Bayesian13 posterior13 (PMpost)13 predictions13 for13 each13 output13 equation13 based13 on13 mean13 median13 and13 mode13 as13 speciZied13 by13 the13 user13 and13 with13 frequency13 also13 speciZied13 by13 the13 user13 in13 the13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

$block Same13 as13 for13 PMop13 objects13 above

NPdata13 (class13 NPAG13 list)13 ITdata13 (class13 IT2B13 list

Raw13 data13 used13 to13 make13 the13 above13 objects13 13 Please13 use13 NPparse13 or13 ITparse13 in13 R13 for13 discussion13 of13 the13 data13 contained13 in13 these13 objects

Since13 R13 is13 an13 object13 oriented13 language13 to13 access13 the13 observations13 in13 a13 PMop13 object13 for13 example13 use13 the13 following13 syntax13 op$post1$obsNote13 that13 you13 will13 place13 an13 integer13 within13 the13 parentheses13 of13 the13 loading13 functions13 eg13 NPload(1)13 which13 will13 sufZix13 all13 the13 above13 objects13 with13 that13 integer13 eg13 op113 Zinal113 NPdata113 13 This13 allows13 several13 models13 to13 be13 loaded13 into13 R13 simultaneously13 each13 with13 a13 unique13 sufZix13 and13 which13 can13 be13 compared13 with13 the13 PMcompare()13 command13 (see13 Model13 Diagnostics13 below)

Making New Pmetrics ObjectsOnce13 you13 have13 loaded13 the13 raw13 (NPdata13 or13 ITdata)13 or13 processed13 (op13 Uinal13 cycle13 pop13 post)13 data13 objects13 described13 above13 with13 NPload(run_num)13 or13 ITload(run_num)13 should13 you13 wish13 to13 remake13 the13 processed13 objects13 with13 parameters13 other13 than13 the13 defaults13 you13 can13 easily13 do13 so13 with13 the13 make 13 family13 of13 commands13 13 For13 example13 the13 default13 for13 PMop13 observed13 vs13 predicted13 objects13 is13 to13 use13 the13 prediction13 based13 on13 the13 median13 of13 the13 population13 or13 posterior13 distribution13 13 If13 you13 wish13 to13 use13 the13 mean13 of13 the13 distribution13 remake13 the13 PMop13 object13 using makeOP()13 13 If13 you13 wish13 to13 see13 all13 the13 cycle13 information13 in13 a13 PMcycle13 object13 not13 omitting13 the13 Zirst13 1013 of13 cycles13 by13 default13 remake13 it13 using13 makeCycle()13 13

For13 all13 of13 the13 following13 commands13 the13 data13 input13 is13 either13 NPdata13 or13 ITdata13 with13 additional13 function13 arguments13 speciZic13 to13 each13 command13 13 Accessing13 the13 help13 for13 each13 function13 in13 R13 will13 provide13 further13 details13 on13 the13 arguments13 defaults13 and13 output13 of13 each13 command

Userrsquos13 Guide13 13 2213 13

Command Description R13 help

makeAUC Make13 a13 dataframe13 of13 class13 PMauc13 containing13 subject13 ID13 and13 AUC13 from13 a13 variety13 of13 inputs13 including13 objects13 of13 PMop13 PMsim13 or13 a13 suitable13 dataframe

makeAUC

makeCov Generate13 a13 dataframe13 of13 class13 PMcov13 with13 subject-shy‐speciZic13 covariates13 extracted13 from13 the13 data13 csv13 Zile13 This13 object13 can13 be13 plotted13 and13 used13 to13 test13 for13 covariates13 which13 are13 signiZicantly13 associated13 with13 model13 parameters13 13

makeCov

makeCycle Create13 a13 PMcycle13 object13 described13 in13 the13 previous13 section makeCycle

makeFinal Create13 a13 PMZinal13 object13 described13 in13 the13 previous13 section makeFinal

makeOP Create13 a13 PMop13 object13 described13 in13 the13 previous13 section makeOP

makeNCA Create13 a13 dataframe13 (class13 PMnca)13 with13 the13 output13 of13 a13 non-shy‐compartmental13 analysis13 using13 PMpost13 and13 NPAG13 data13 objects13 as13 input13 13 The13 PMnca13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull auc13 Area13 under13 the13 time-shy‐observation13 curve13 using13 the13

trapezoidal13 approximation13 from13 time13 013 until13 the13 second13 dose13 or13 if13 only13 one13 dose13 until13 the13 last13 observation

bull aumc13 Area13 under13 the13 Zirst13 moment13 curvebull k13 Slope13 by13 least-shy‐squares13 linear13 regression13 of13 the13 Zinal13

613 log-shy‐transformed13 observations13 vs13 timebull auclast13 Area13 under13 the13 curve13 from13 the13 time13 of13 the13

last13 observation13 to13 inZinity13 calculated13 as13 [Final13 obs]kbull aumclast13 Area13 under13 the13 Zirst13 moment13 curve13 from13

the13 time13 of13 the13 last13 observation13 to13 inZinitybull aucinf13 Area13 under13 the13 curve13 from13 time13 013 to13 inZinity13

caluculated13 as13 auc13 +13 auclastbull aumcinf13 Area13 under13 the13 Zirst13 moment13 curve13 from13

time13 013 to13 inZinitybull mrt13 Mean13 residence13 time13 calculated13 as13 1kbull cmax13 Maximum13 predicted13 concentration13 after13 the13

Zirst13 dosebull tmax13 Time13 to13 cmaxbull cl13 Clearance13 calculated13 as13 doseaucinfbull vdss13 Volume13 of13 distribution13 at13 steady13 state13

calculated13 as13 clmrtbull thalf13 Half13 life13 of13 elimination13 calculated13 as13 ln(2)kbull dose13 First13 dose13 amount13 for13 each13 subject

makeNCA

Userrsquos13 Guide13 13 2313 13

Command Description R13 help

makeErrorPoly This13 function13 plots13 Zirst13 second13 and13 third13 order13 polynomial13 functions13 Zitted13 to13 pairs13 of13 observations13 and13 associated13 standard13 deviations13 for13 a13 given13 output13 assay13 In13 this13 way13 the13 standard13 deviation13 associated13 with13 any13 observation13 may13 be13 calculated13 and13 used13 to13 appropriately13 weight13 that13 observation13 in13 the13 model13 building13 process13 Observations13 are13 weighted13 by13 the13 reciprocal13 of13 the13 variance13 or13 squared13 standard13 deviation13 13 Output13 of13 the13 function13 is13 a13 plot13 of13 the13 measured13 observations13 and13 Zitted13 polynomial13 curves13 and13 a13 list13 with13 the13 Zirst13 second13 and13 third13 order13 coefZicients

makeErrorPoly

makePTA This13 function13 performs13 a13 Probability13 of13 Target13 Attainment13 analysis13 for13 a13 set13 of13 simulated13 doses13 and13 time-shy‐concentration13 proZiles13 13 Targets13 (eg13 Minimum13 Inhibitory13 Concentrations)13 the13 type13 of13 target13 attainment13 (ie13 time13 above13 target13 Cmaxtarget13 13 AUCtarget13 Cmintarget13 or13 Cxtarget13 where13 x13 is13 any13 time13 point)13 and13 the13 success13 threshold13 (eg13 time13 gt13 0713 or13 Cmaxtarget13 gt13 10)13 can13 all13 be13 speciZied13 13 Output13 is13 a13 list13 (class13 PMpta)13 with13 two13 objectsbull Results13 a13 413 dimensional13 array13 with13 dimension13 size13 of13

[number13 of13 doses13 number13 of13 targets13 number13 of13 simulated13 proZiles13 1]13 which13 gives13 the13 target13 attainment13 (eg13 Cmaxtarget)13 for13 each13 dose13 target13 and13 proZile

bull Outcome13 For13 each13 dose13 and13 target13 a13 summary13 of13 the13 target13 attainment13 for13 all13 the13 proZiles13 including13 mean13 standard13 deviation13 and13 proportion13 above13 the13 success13 threshold

PMpta13 objects13 can13 be13 summarized13 with13 summary(x)13 and13 plotted13 with13 plot(x)13

makePTA

Userrsquos13 Guide13 13 2413 13

Command Description R13 help

makePopmakePost(NPAG13 only)

These13 functions13 create13 dataframes13 of13 class13 PMpop13 and13 PMpost13 respectively13 13 The13 PMpop13 or13 PMpost13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull time13 Times13 for13 predicted13 concentrations13 13 These13

times13 are13 not13 necessarily13 at13 observed13 times13 but13 at13 a13 frequency13 speciZied13 in13 the13 NPAG13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

bull pred113 Predictions13 for13 output13 113 13 For13 PMpop13 objects13 predictions13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 population13 prior13 distribution13 13 For13 PMpost13 objects13 they13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject

bull pred213 pred313 etc13 If13 additional13 outputs13 exist13 they13 will13 each13 be13 columns13 in13 the13 dataframe13 just13 as13 for13 pred113 13

makePopmakePost

NPAG RunsIn13 the13 past13 users13 had13 to13 run13 NPAG13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 NPrun()13 13 However13 if13 NPrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable

1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 NPAG13 creates13 a13 temporary13 instruction13 Zile13 in13 case13 something13 happens13 so13 that13 instructions13 entered13 to13 date13 can13

be13 recovered13 13 Accept13 the13 default13 by13 choosing13 113 13 You13 can13 save13 with13 a13 meaningful13 Zilename13 later13 13 If13 it13 already13 exists13 you13 will13 be13 asked13 if13 you13 wish13 to13 overwrite13 the13 Zile13 which13 is13 usually13 the13 thing13 to13 do

Userrsquos13 Guide13 13 2513 13

8 If13 you13 have13 previously13 run13 IT2B13 you13 can13 automatically13 import13 the13 suggested13 parameter13 ranges13 13 Choose13 113 to13 do13 this13 and13 013 to13 run13 NPAG13 without13 a13 previous13 IT2B13 run81 If13 you13 choose13 option13 113 you13 must13 specify13 the13 name13 of13 a13 FROMxxxx13 Zile13 typically13 FROM000113 that13 you13 can13

Zind13 in13 an13 output13 directory13 after13 a13 successful13 IT2B13 run13 13 Note13 that13 the13 program13 will13 then13 assume13 that13 you13 are13 using13 the13 same13 wrk13 Ziles13 that13 IT2B13 made13 from13 your13 data13 csv13 Zile13 13 It13 is13 strongly13 recommended13 to13 override13 this13 and13 specify13 a13 data13 csv13 Zile13 13 At13 this13 point13 you13 will13 jump13 to13 1013 below13 and13 continue13 on13 however13 your13 answers13 will13 often13 be13 supplied13 by13 the13 instructions13 contained13 in13 the13 FROMxxxx13 Zile13 and13 you13 need13 merely13 conZirm13 them

9 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13 have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 NPrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis91 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13

for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

10 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 NPAG13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

11 Enter13 the13 name13 of13 your13 csv13 Zile13 now12 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile13 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset131 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects132 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry14 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset15 Enter13 the13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo 13 followed13 by13

return16 Select13 how13 you13 would13 like13 to13 model13 assay13 (observation)13 error13 for13 each13 output13 equation13 13 You13 have13 four13 choices13 13

In13 all13 four13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0161 Error13 model13 113 (SD)13 13 Choose13 this13 option13 if13 you13 have13 already13 run13 IT2B13 and13 multiplied13 your13 assay13 error13

polynomial13 by13 gamma13 (see13 next13 option13 for13 a13 description13 of13 gamma)162 Error13 model13 213 (SD13 13 gamma)13 13 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13

observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 If13 you13 choose13 this13 option13 you13 then13 can13 specify13 the13 starting13 value13 of13 gamma13 13 Good13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality

163 Error13 model13 313 (SD213 +13 lamda2)0513 13 Lamda13 is13 an13 alternative13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present

Userrsquos13 Guide13 13 2613 13

164 Error13 model13 413 SD13 =13 gamma13 13 This13 model13 is13 rarely13 used13 and13 is13 equivalent13 to13 specifying13 a13 model13 with13 C013 only13 ie13 a13 constant13 error13 regardless13 of13 concentration

17 Once13 you13 select13 the13 assay13 error13 model13 for13 each13 output13 equation13 you13 are13 then13 offered13 four13 more13 options13 on13 which13 assay13 error13 polynomial13 coefZicients13 to13 use13 13 Choices13 113 and13 213 are13 the13 most13 commonly13 used171 Choice13 113 The13 default13 13 Use13 coefZicients13 in13 the13 subject13 record13 (C013 C113 C213 C313 in13 the13 data13 csv13 Zile)13 and13 if13

missing13 use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 (item13 1813 below)172 Choice13 213 Use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 for13 all13 subjects13 regardless13 of13 what13 is13 in13 the13

data13 csv13 Zile173 Choice13 313 13 To13 multiply13 data13 csv13 values13 and13 default13 entered13 values13 by13 a13 Zixed13 gamma13 and13 use13 them13 13 174 Choice13 013 Specify13 coefZicients13 on13 a13 subject13 by13 subject13 basis13 either13 those13 in13 the13 data13 csv13 Zile13 already13 the13

default13 values13 entered13 into13 the13 program13 or13 other13 values18 For13 each13 output13 equation13 after13 you13 have13 selected13 the13 option13 in13 item13 1713 you13 will13 be13 prompted13 to13 supply13 the13

required13 information13 including13 the13 general13 default13 values13 for13 missing13 or13 overridden13 values13 in13 the13 data13 csv13 Zile19 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13

usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13

20 Enter13 the13 grid13 point13 index13 13 This13 number13 corresponds13 to13 the13 number13 of13 grid13 (support)13 points13 which13 will13 initially13 Zill13 the13 model13 parameter13 space13 13 The13 larger13 the13 number13 of13 random13 parameters13 to13 be13 estimated13 the13 more13 points13 are13 required13 13 The13 program13 will13 make13 a13 suggestion13 based13 on13 the13 number13 of13 random13 parameters13 in13 the13 model13 13 The13 more13 you13 choose13 the13 slower13 the13 run13 will13 be13 but13 results13 may13 improve13 13 It13 is13 reasonable13 to13 choose13 fewer13 points13 early13 in13 model13 exploration13 and13 increase13 in13 later13 phases13 or13 if13 poor13 model13 Zits13 or13 lack13 of13 convergence13 are13 noted13 The13 choices13 are13 113 to13 713 corresponding13 respectively13 to13 212913 500313 1000713 2001113 4000913 and13 8002113 points13 13 If13 you13 choose13 713 you13 then13 have13 an13 additional13 choice13 to13 select13 one13 or13 more13 multiples13 of13 8002113 points

21 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 013 or13 greater13 13 If13 you13 enter13 an13 integer13 greater13 than13 013 the13 engine13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13 If13 you13 enter13 013 this13 is13 the13 way13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 an13 independent13 data13 set13 and13 a13 non-shy‐uniform13 prior13 must13 be13 speciZied13 (see13 3013 below)13 13 This13 means13 that13 the13 engine13 will13 only13 calculate13 the13 individual13 Bayesian13 posteriors13 for13 the13 new13 subjects13 using13 the13 population13 joint13 density13 from13 a13 previous13 run13 as13 a13 Bayesian13 prior

22 Information13 about13 convergence13 criteria13 13 Answer13 113 or13 some13 other13 keystroke13 plus13 Return13 to13 acknowledge13 that13 you13 have13 read13 it

23 In13 order13 to13 predict13 concentrations13 from13 a13 non-shy‐parametric13 distribution13 you13 have13 the13 option13 to13 use13 the13 1)13 mean13 2)13 median13 or13 3)13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject13 13 We13 typically13 use13 the13 median13 Zirst13 and13 then13 the13 mean13 in13 a13 separate13 run13 and13 compare13 the13 differences13 13

24 Select13 the13 time13 interval13 to13 generate13 predicted13 concentrations13 13 Additionally13 there13 will13 also13 be13 predictions13 made13 at13 the13 time13 of13 each13 observation13 13 In13 general13 for13 most13 models13 predictions13 every13 1213 minutes13 provide13 sufZicient13 granularity13 13 Smaller13 values13 can13 result13 in13 very13 large13 Ziles13 for13 big13 populations

25 Select13 the13 default13 MIC13 to13 be13 used13 for13 AUCMIC13 ratio13 reporting13 13 This13 should13 generally13 be13 set13 to13 the13 default13 of13 113 by13 choosing13 113 13 You13 can13 always13 extract13 the13 AUC13 later13 and13 divide13 it13 by13 any13 MIC13 you13 choose

26 Enter13 the13 value13 in13 hours13 that13 you13 want13 for13 calculations13 of13 AUCs13 from13 predicted13 concentration13 proZiles13 13 The13 default13 is13 2413 hours13 which13 you13 can13 accept13 by13 entering13 113 or13 013 if13 you13 want13 to13 specify13 a13 different13 interval

27 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

28 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

Userrsquos13 Guide13 13 2713 13

29 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

30 For13 the13 prior13 density13 choose13 113 if13 it13 is13 to13 be13 uniform13 13 This13 means13 that13 the13 initial13 grid13 points13 will13 be13 evenly13 distributed13 with13 equal13 probability13 within13 the13 boundaries13 speciZied13 (in13 1513 above)13 13 If13 you13 choose13 013 you13 will13 be13 prompted13 for13 the13 name13 of13 a13 Zile13 that13 contains13 the13 prior13 density13 13 This13 will13 be13 DEN000113 unless13 you13 have13 changed13 its13 name13 13 It13 will13 be13 found13 in13 the13 output13 directory13 of13 a13 prior13 NPAG13 run13 13 The13 model13 used13 to13 generate13 the13 DEN000113 Zile13 must13 be13 exactly13 the13 same13 as13 the13 current13 model13 including13 parameter13 boundaries13 13 However13 this13 option13 is13 useful13 to13 specify13 a13 non-shy‐uniform13 density13 for13 two13 reasons13 13 The13 Zirst13 is13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 a13 new13 set13 of13 subjects13 13 Do13 this13 in13 combination13 with13 setting13 the13 number13 of13 cycles13 to13 013 (see13 2113 above)13 13 The13 second13 use13 for13 a13 non-shy‐uniform13 prior13 is13 to13 continue13 a13 previous13 run13 13 For13 example13 if13 you13 only13 set13 the13 number13 of13 cycles13 to13 5013 to13 get13 a13 rough13 idea13 of13 model13 Zit13 you13 may13 continue13 where13 you13 left13 off13 by13 specifying13 the13 DEN000113 Zile13 from13 the13 50-shy‐cycle13 run13 and13 continuing13 with13 as13 many13 additional13 cycles13 as13 you13 specify13 in13 item13 2113 13 So13 in13 the13 example13 if13 you13 specify13 10013 cycles13 in13 2113 the13 total13 number13 of13 cycles13 will13 be13 5013 +13 10013 =13 150

31 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 NPrun(instr=ldquoyourfilerdquo)13 option13 and13 including13 ldquoyourZilerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

32 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 NPAG13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 NPAG13 analysis

33 The13 NPAG13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

IT2B RunsIn13 the13 past13 users13 had13 to13 run13 IT2B13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 ITrun()13 13 However13 if13 ITrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13

have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 ITrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis

Userrsquos13 Guide13 13 2813 13

71 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13 for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

8 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 IT2B13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

9 Enter13 the13 name13 of13 your13 csv13 Zile13 now10 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile11 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset111 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects112 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry12 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset13 Enter13 the13 initial13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo13 followed13

by13 return14 The13 estimated13 mean13 for13 each13 parameter13 value13 distribution13 during13 the13 Zirst13 iteration13 will13 be13 the13 median13 of13 the13

range13 speciZied13 in13 1313 13 You13 now13 have13 the13 option13 to13 specify13 the13 standard13 deviation13 for13 the13 parameter13 value13 distribution13 which13 by13 default13 is13 half13 of13 the13 range13 in13 1313 13 Choose13 113 to13 accept13 this13 (the13 usual13 answer)13 or13 013 to13 change13 it13 to13 something13 else13 expressed13 as13 a13 multiple13 of13 the13 range

15 In13 IT2B13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 You13 can13 now13 choose13 113 if13 every13 subject13 has13 the13 same13 coefZicients13 or13 013 to13 use13 a13 unique13 set13 of13 coefZicients13 for13 each13 subject13 13 The13 Zirst13 case13 is13 the13 more13 usual13 when13 all13 13 samples13 from13 all13 subjects13 are13 analyzed13 in13 the13 same13 lab13 13 If13 13 samples13 are13 analyzed13 in13 different13 labs13 and13 you13 have13 the13 assay13 data13 from13 each13 lab13 then13 you13 would13 enter13 013 13 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 (see13 151313 below)13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0151 If13 you13 choose13 113 (one13 set13 of13 coefZicients13 for13 all13 subjects)13 you13 will13 then13 be13 presented13 with13 313 additional13

choices1511 Choice13 113 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13 observation13

including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 and13 to13 Zix13 gamma13 to13 1

1512 Choice13 213 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 but13 to13 estimate13 gamma13 based13 on13 the13 data13 13 This13 is13 the13 usual13 option

1513 Choice13 313 Choose13 this13 option13 if13 you13 wish13 to13 estimate13 the13 assay13 error13 coefZicients13 based13 on13 your13 data13 for13 use13 in13 future13 runs13 13 Although13 you13 can13 access13 this13 option13 by13 using13 either13 ITrun()13 or13 ERRrun()13 in13 R13 the13 instruction13 Ziles13 that13 you13 save13 and13 the13 generated13 output13 Ziles13 will13 be13 different13 13 Therefore13 we13 recommend13 that13 if13 you13 intend13 to13 choose13 this13 option13 use13 ERRrun()13 in13 R13 which13 will13 generate13 an13 ASS000113 Zile13 that13 contains13 the13 estimates13 for13 C013 C113 C213 and13 C313 13 You13 can13 then13 include13 this13 Zile13 in13 the13 working13 directory13 (along13 with13 a13 model13 txt13 Zile13 and13 a13 data13 csv13 Zile)13 to13 do13 an13 IT2B13 run13 supplying13 the13 Zile13 name13 in13 16113 below

Userrsquos13 Guide13 13 2913 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

How to use R and PmetricsSeCng13 up13 a13 Pmetrics13 project

When13 beginning13 a13 new13 modeling13 project13 it13 is13 convenient13 to13 use13 the13 command13 PMtree(ldquoproject namerdquo)13 13 This13 command13 will13 set13 up13 a13 new13 directory13 in13 the13 current13 working13 directory13 named13 whatever13 you13 have13 included13 as13 the13 ldquoproject13 namerdquo13 13 For13 example13 a13 directory13 called13 ldquoDrugXrdquo13 will13 be13 created13 by13 PMtree(ldquoDrugXrdquo)13 13 Beneath13 this13 directory13 several13 subdirectories13 will13 be13 also13 created13 Rscript13 Runs13 Sim13 and13 src13 13 The13 Rscript13 subdirectory13 will13 contain13 a13 skeleton13 R13 script13 to13 begin13 Pmetrics13 runs13 in13 the13 new13 project13 13 The13 Runs13 subdirectory13 should13 contain13 all13 Ziles13 required13 for13 a13 run13 (described13 next)13 and13 it13 will13 also13 contain13 the13 resulting13 numerically13 ordered13 run13 directories13 created13 after13 each13 Pmetrics13 NPAG13 or13 IT2B13 run13 13 The13 Sim13 subdirectory13 can13 contain13 any13 Ziles13 related13 to13 simulations13 and13 the13 src13 subdirectory13 should13 contain13 original13 and13 manipulated13 source13 data13 Ziles13 13 Of13 course13 you13 are13 free13 to13 edit13 this13 directory13 tree13 structure13 as13 you13 please13 or13 make13 your13 own13 entirely

GeCng13 the13 required13 files13 to13 run13 Pmetrics

When13 you13 wish13 to13 execute13 a13 Pmetrics13 run13 you13 must13 ensure13 that13 appropriate13 Pmetrics13 model13 txt13 and13 data13 csv13 Ziles13 are13 in13 the13 working13 directory13 ie13 the13 Runs13 subdirectory13 of13 the13 project13 directory13 13 13 13 R13 can13 be13 used13 to13 help13 prepare13 the13 data13 csv13 Zile13 by13 importing13 and13 manipulating13 spreadsheets13 (eg13 readcsv())13 13 The13 Pmetrics13 function13 PMcheck()13 can13 be13 used13 to13 check13 a13 csv13 Zile13 or13 an13 R13 dataframe13 that13 is13 to13 be13 saved13 as13 a13 Pmetrics13 data13 13 csv13 Zile13 for13 errors13 13 13 13 13 13 It13 can13 also13 check13 a13 model13 Zile13 for13 errors13 in13 the13 context13 of13 a13 dataZile13 eg13 covariates13 that13 do13 not13 match13 13 PMfixMatrix()13 attempts13 to13 automatically13 rid13 data13 Ziles13 of13 errors13 13 The13 function13 PMwriteMatrix() 13 can13 be13 used13 to13 write13 the13 R13 data13 object13 in13 the13 correct13 format13 for13 use13 by13 IT2B13 NPAG13 or13 the13 Simulator13 13 You13 can13 also13 download13 sample13 data13 and13 scripts13 from13 the13 Pmetrics13 downloads13 section13 of13 our13 website13 once13 you13 sign13 in13 with13 your13 LAPK13 user13 email13 address13 and13 password13 13 Edit13 prior13 versions13 of13 model13 Ziles13 to13 make13 new13 model13 Ziles

Using13 scripts13 to13 control13 Pmetrics

As13 you13 will13 see13 in13 the13 skeleton13 R13 script13 made13 by13 PMtree() and13 placed13 in13 the13 Rscript13 subdirectory13 if13 this13 is13 a13 Zirst-shy‐time13 run13 the13 R13 commands13 to13 run13 IT2B13 or13 NPAG13 are13 as13 follows13 13 Recall13 that13 the13 ldquordquo13 character13 is13 a13 comment13 character

library(Pmetrics)Run 1 - add your run description heresetwd(ldquoworking directoryrdquo)NPrun() for NPAG or ITrun() for IT2B

The13 Zirst13 line13 will13 load13 the13 Pmetrics13 library13 of13 functions13 13 The13 second13 line13 sets13 the13 working13 directory13 to13 the13 speciZied13 path13 13 The13 third13 line13 generates13 the13 batch13 Zile13 to13 run13 NPAG13 or13 IT2B13 and13 saves13 it13 to13 the13 working13 directory13

NOTE13 13 On13 Mac13 systems13 the13 batch13 Zile13 will13 be13 automatically13 launched13 in13 a13 Terminal13 window13 13 On13 Windows13 systems13 the13 batch13 Zile13 must13 be13 launched13 manually13 by13 double13 clicking13 the13 np_runbat13 or13 it_runbat13 Zile13 in13 the13 working13 directory

ITrun() 13 and13 NPrun()13 both13 return13 the13 full13 path13 of13 the13 output13 directory13 to13 the13 clipboard13 13 By13 default13 runs13 are13 placed13 in13 folders13 numbered13 sequentially13 beginning13 with13 ldquo1rdquoNow13 the13 output13 of13 IT2B13 or13 NPAG13 needs13 to13 be13 loaded13 into13 R13 so13 the13 next13 command13 does13 this

NPload(run_number) or ITload(run_number)

Details13 of13 these13 commands13 and13 what13 is13 loaded13 are13 described13 in13 the13 R13 documentation13 (NPload 13 or13 ITload)13 and13 in13 the13 following13 section13 13 The13 run_number13 should13 be13 included13 within13 the13 parentheses13 to13 be13 appended13 to13 the13 names13

Userrsquos13 Guide13 13 1813 13

of13 loaded13 R13 objects13 allowing13 for13 comparison13 between13 runs13 eg13 NPload(1)13 13 Finally13 at13 this13 point13 other13 Pmetrics13 commands13 can13 be13 added13 to13 the13 script13 to13 process13 the13 data13 such13 as13 the13 following

plot(final1)plot(cycle1)plot(op1type=rdquopoprdquo) or plot(op1$pop1)plot(op1) default is to plot posterior predictions for output 1plot(op1type=rdquopoprdquoresid=T)

Of13 course13 the13 full13 power13 of13 R13 can13 be13 used13 in13 scripts13 to13 analyze13 data13 but13 these13 simple13 statements13 serve13 as13 examplesIf13 you13 do13 not13 use13 the13 PMtree() structure13 we13 suggest13 that13 the13 R13 script13 for13 a13 particular13 project13 be13 saved13 into13 a13 folder13 called13 ldquoRscriptrdquo13 or13 some13 other13 meaningful13 name13 in13 the13 working13 directory13 13 Folders13 are13 not13 be13 moved13 by13 the13 batch13 Zile13 13 Within13 the13 script13 number13 runs13 sequentially13 and13 use13 comments13 liberally13 to13 13 distinguish13 runs13 as13 shown13 below

library(Pmetrics)

Run 1 - Ka Kel V all subjectssetwd(ldquoworking directoryrdquo)NPrun() assumes model=rdquomodeltxtrdquo and data=rdquodatacsvrdquoNPload(1)

Remember13 in13 R13 that13 the13 command13 example(function) will13 provide13 examples13 for13 the13 speciZied13 function13 13 Most13 Pmetrics13 functions13 have13 examples

Pmetrics Data ObjectsAfter13 a13 successful13 IT2B13 or13 NPAG13 run13 an13 R13 dataZile13 is13 saved13 in13 the13 output13 subdirectory13 of13 the13 newly13 created13 numerically13 ordered13 folder13 in13 the13 working13 directory13 13 After13 IT2B13 this13 Zile13 is13 called13 ldquoIT2BoutRdatardquo13 and13 after13 NPAG13 it13 is13 called13 ldquoNPAGoutRdatardquo13 13 As13 mentioned13 in13 the13 previous13 section13 these13 data13 Ziles13 can13 be13 loaded13 by13 ensuring13 that13 the13 Runs13 folder13 is13 set13 as13 the13 working13 directory13 and13 then13 using13 the13 Pmetrics13 commands13 ITload(run_num)13 or13 NPload(run_num)

Both13 commands13 load13 their13 respective13 Rdata13 Ziles13 into13 R13 making13 the13 contained13 objects13 available13 for13 plotting13 and13 other13 analysisObjects13 loaded13 by13 ITload(run_num) and NPload(run_num)

Objects Variables Comments

op13 (class13 PMop13 list) $pop113 $post113 Population13 and13 posterior13 predictions13 for13 each13 output13 equation13 ie13 113 213

13 $id Subject13 identiZication

13 $time Observation13 time13 in13 relative13 decimal13 hours

13 $obs Observation

13 $pred Prediction13 based13 on13 median13 of13 population13 or13 posterior13 parameter13 value13 distributions

Userrsquos13 Guide13 13 1913 13

Objects Variables Comments

13 $block Dosing13 block13 usually13 113 unless13 data13 Zile13 contains13 EVID=413 dose13 reset13 events13 in13 which13 case13 each13 such13 reset13 within13 a13 given13 ID13 will13 increment13 the13 dosing13 block13 by13 113 for13 that13 ID

13 $obsSD Calculated13 standard13 deviation13 (error)13 of13 the13 observation13 based13 on13 the13 assay13 error13 polynomial

13 $d Difference13 between13 pred13 and13 obs

13 $ds Squared13 difference13 between13 pred13 and13 obs

13 $wd $d13 weighted13 by13 the13 $obsSD

13 $wds $ds13 weighted13 by13 the13 $obsSD

Zinal13 (class13 PMZinal13 list) $popPoints (NPAG13 only)13 Dataframe13 of13 the13 Zinal13 cycle13 joint13 population13 density13 of13 grid13 points13 with13 column13 names13 equal13 to13 the13 name13 of13 each13 random13 parameter13 plus13 $prob13 for13 the13 associated13 probability13 of13 that13 point13

$popMean The13 Zinal13 cycle13 mean13 for13 each13 random13 parameter13 distribution

$popSD The13 Zinal13 cycle13 standard13 deviation13 for13 each13 random13 parameter13 distribution

$popCV The13 Zinal13 cycle13 coefZicient13 of13 variation13 for13 each13 random13 parameter13 distribution

$popVar The13 Zinal13 cycle13 variance13 for13 each13 random13 parameter13 distribution

$popCov The13 Zinal13 cycle13 covariance13 matrix13 for13 each13 random13 parameter13 distribution

$popCor The13 Zinal13 cycle13 correlation13 matrix13 for13 each13 random13 parameter13 distribution

$popMedian The13 Zinal13 cycle13 median13 for13 each13 random13 parameter13 distribution

$gridpts (NPAG13 only)13 The13 initial13 number13 of13 support13 points

$ab Matrix13 of13 boundaries13 for13 random13 parameter13 values13 13 For13 NPAG13 this13 is13 speciZied13 by13 the13 user13 prior13 to13 the13 run13 for13 IT2B13 it13 is13 calculated13 as13 a13 user13 speciZied13 multiple13 of13 the13 SD13 for13 the13 parameter13 value13 distribution

Userrsquos13 Guide13 13 2013 13

Objects Variables Comments

cycle13 (class13 PMcycle13 list) $names Vector13 of13 names13 of13 the13 random13 parameters

$ll Matrix13 of13 cycle13 number13 and13 -shy‐2Log-shy‐likelihood13 at13 each13 cycle

$gamlam A13 matrix13 of13 cycle13 number13 and13 gamma13 or13 lambda13 at13 each13 cycle13 (see13 item13 1613 under13 NPAG13 Runs13 below13 for13 a13 discussion13 of13 gamma13 and13 lambda)

$mean A13 matrix13 of13 cycle13 number13 and13 the13 mean13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 mean

$sd A13 matrix13 of13 cycle13 number13 and13 the13 standard13 deviation13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$median A13 matrix13 of13 cycle13 number13 and13 the13 median13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$aic A13 matrix13 of13 cycle13 number13 and13 Akaike13 Information13 Criterion13 at13 each13 cycle

$bic A13 matrix13 of13 cycle13 number13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle

cov13 (class13 PMcov13 dataframe)

$id Subject13 identiZication

$time Time13 for13 each13 covariate13 entry

covariates Covariate13 values13 for13 each13 subject13 at13 each13 time13 extracted13 from13 the13 raw13 data13 Zile

parameters Mean13 median13 or13 mode13 of13 Bayesian13 posterior13 distribution13 for13 each13 random13 parameter13 in13 the13 model13 13 Mode13 summaries13 are13 available13 for13 NPAG13 output13 only13 and13 the13 default13 is13 median13 13 Values13 are13 recycled13 for13 each13 row13 within13 a13 given13 subject13 with13 the13 number13 of13 rows13 driven13 by13 the13 number13 of13 covariate13 entries

Userrsquos13 Guide13 13 2113 13

Objects Variables Comments

pop13 (class13 PMpop13 dataframe)

post13 (class13 PMpost13 dataframe)

NPAG13 only

$id Subject13 identiZication

$pred113 Population13 prior13 (PMpop)13 or13 Bayesian13 posterior13 (PMpost)13 predictions13 for13 each13 output13 equation13 based13 on13 mean13 median13 and13 mode13 as13 speciZied13 by13 the13 user13 and13 with13 frequency13 also13 speciZied13 by13 the13 user13 in13 the13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

$block Same13 as13 for13 PMop13 objects13 above

NPdata13 (class13 NPAG13 list)13 ITdata13 (class13 IT2B13 list

Raw13 data13 used13 to13 make13 the13 above13 objects13 13 Please13 use13 NPparse13 or13 ITparse13 in13 R13 for13 discussion13 of13 the13 data13 contained13 in13 these13 objects

Since13 R13 is13 an13 object13 oriented13 language13 to13 access13 the13 observations13 in13 a13 PMop13 object13 for13 example13 use13 the13 following13 syntax13 op$post1$obsNote13 that13 you13 will13 place13 an13 integer13 within13 the13 parentheses13 of13 the13 loading13 functions13 eg13 NPload(1)13 which13 will13 sufZix13 all13 the13 above13 objects13 with13 that13 integer13 eg13 op113 Zinal113 NPdata113 13 This13 allows13 several13 models13 to13 be13 loaded13 into13 R13 simultaneously13 each13 with13 a13 unique13 sufZix13 and13 which13 can13 be13 compared13 with13 the13 PMcompare()13 command13 (see13 Model13 Diagnostics13 below)

Making New Pmetrics ObjectsOnce13 you13 have13 loaded13 the13 raw13 (NPdata13 or13 ITdata)13 or13 processed13 (op13 Uinal13 cycle13 pop13 post)13 data13 objects13 described13 above13 with13 NPload(run_num)13 or13 ITload(run_num)13 should13 you13 wish13 to13 remake13 the13 processed13 objects13 with13 parameters13 other13 than13 the13 defaults13 you13 can13 easily13 do13 so13 with13 the13 make 13 family13 of13 commands13 13 For13 example13 the13 default13 for13 PMop13 observed13 vs13 predicted13 objects13 is13 to13 use13 the13 prediction13 based13 on13 the13 median13 of13 the13 population13 or13 posterior13 distribution13 13 If13 you13 wish13 to13 use13 the13 mean13 of13 the13 distribution13 remake13 the13 PMop13 object13 using makeOP()13 13 If13 you13 wish13 to13 see13 all13 the13 cycle13 information13 in13 a13 PMcycle13 object13 not13 omitting13 the13 Zirst13 1013 of13 cycles13 by13 default13 remake13 it13 using13 makeCycle()13 13

For13 all13 of13 the13 following13 commands13 the13 data13 input13 is13 either13 NPdata13 or13 ITdata13 with13 additional13 function13 arguments13 speciZic13 to13 each13 command13 13 Accessing13 the13 help13 for13 each13 function13 in13 R13 will13 provide13 further13 details13 on13 the13 arguments13 defaults13 and13 output13 of13 each13 command

Userrsquos13 Guide13 13 2213 13

Command Description R13 help

makeAUC Make13 a13 dataframe13 of13 class13 PMauc13 containing13 subject13 ID13 and13 AUC13 from13 a13 variety13 of13 inputs13 including13 objects13 of13 PMop13 PMsim13 or13 a13 suitable13 dataframe

makeAUC

makeCov Generate13 a13 dataframe13 of13 class13 PMcov13 with13 subject-shy‐speciZic13 covariates13 extracted13 from13 the13 data13 csv13 Zile13 This13 object13 can13 be13 plotted13 and13 used13 to13 test13 for13 covariates13 which13 are13 signiZicantly13 associated13 with13 model13 parameters13 13

makeCov

makeCycle Create13 a13 PMcycle13 object13 described13 in13 the13 previous13 section makeCycle

makeFinal Create13 a13 PMZinal13 object13 described13 in13 the13 previous13 section makeFinal

makeOP Create13 a13 PMop13 object13 described13 in13 the13 previous13 section makeOP

makeNCA Create13 a13 dataframe13 (class13 PMnca)13 with13 the13 output13 of13 a13 non-shy‐compartmental13 analysis13 using13 PMpost13 and13 NPAG13 data13 objects13 as13 input13 13 The13 PMnca13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull auc13 Area13 under13 the13 time-shy‐observation13 curve13 using13 the13

trapezoidal13 approximation13 from13 time13 013 until13 the13 second13 dose13 or13 if13 only13 one13 dose13 until13 the13 last13 observation

bull aumc13 Area13 under13 the13 Zirst13 moment13 curvebull k13 Slope13 by13 least-shy‐squares13 linear13 regression13 of13 the13 Zinal13

613 log-shy‐transformed13 observations13 vs13 timebull auclast13 Area13 under13 the13 curve13 from13 the13 time13 of13 the13

last13 observation13 to13 inZinity13 calculated13 as13 [Final13 obs]kbull aumclast13 Area13 under13 the13 Zirst13 moment13 curve13 from13

the13 time13 of13 the13 last13 observation13 to13 inZinitybull aucinf13 Area13 under13 the13 curve13 from13 time13 013 to13 inZinity13

caluculated13 as13 auc13 +13 auclastbull aumcinf13 Area13 under13 the13 Zirst13 moment13 curve13 from13

time13 013 to13 inZinitybull mrt13 Mean13 residence13 time13 calculated13 as13 1kbull cmax13 Maximum13 predicted13 concentration13 after13 the13

Zirst13 dosebull tmax13 Time13 to13 cmaxbull cl13 Clearance13 calculated13 as13 doseaucinfbull vdss13 Volume13 of13 distribution13 at13 steady13 state13

calculated13 as13 clmrtbull thalf13 Half13 life13 of13 elimination13 calculated13 as13 ln(2)kbull dose13 First13 dose13 amount13 for13 each13 subject

makeNCA

Userrsquos13 Guide13 13 2313 13

Command Description R13 help

makeErrorPoly This13 function13 plots13 Zirst13 second13 and13 third13 order13 polynomial13 functions13 Zitted13 to13 pairs13 of13 observations13 and13 associated13 standard13 deviations13 for13 a13 given13 output13 assay13 In13 this13 way13 the13 standard13 deviation13 associated13 with13 any13 observation13 may13 be13 calculated13 and13 used13 to13 appropriately13 weight13 that13 observation13 in13 the13 model13 building13 process13 Observations13 are13 weighted13 by13 the13 reciprocal13 of13 the13 variance13 or13 squared13 standard13 deviation13 13 Output13 of13 the13 function13 is13 a13 plot13 of13 the13 measured13 observations13 and13 Zitted13 polynomial13 curves13 and13 a13 list13 with13 the13 Zirst13 second13 and13 third13 order13 coefZicients

makeErrorPoly

makePTA This13 function13 performs13 a13 Probability13 of13 Target13 Attainment13 analysis13 for13 a13 set13 of13 simulated13 doses13 and13 time-shy‐concentration13 proZiles13 13 Targets13 (eg13 Minimum13 Inhibitory13 Concentrations)13 the13 type13 of13 target13 attainment13 (ie13 time13 above13 target13 Cmaxtarget13 13 AUCtarget13 Cmintarget13 or13 Cxtarget13 where13 x13 is13 any13 time13 point)13 and13 the13 success13 threshold13 (eg13 time13 gt13 0713 or13 Cmaxtarget13 gt13 10)13 can13 all13 be13 speciZied13 13 Output13 is13 a13 list13 (class13 PMpta)13 with13 two13 objectsbull Results13 a13 413 dimensional13 array13 with13 dimension13 size13 of13

[number13 of13 doses13 number13 of13 targets13 number13 of13 simulated13 proZiles13 1]13 which13 gives13 the13 target13 attainment13 (eg13 Cmaxtarget)13 for13 each13 dose13 target13 and13 proZile

bull Outcome13 For13 each13 dose13 and13 target13 a13 summary13 of13 the13 target13 attainment13 for13 all13 the13 proZiles13 including13 mean13 standard13 deviation13 and13 proportion13 above13 the13 success13 threshold

PMpta13 objects13 can13 be13 summarized13 with13 summary(x)13 and13 plotted13 with13 plot(x)13

makePTA

Userrsquos13 Guide13 13 2413 13

Command Description R13 help

makePopmakePost(NPAG13 only)

These13 functions13 create13 dataframes13 of13 class13 PMpop13 and13 PMpost13 respectively13 13 The13 PMpop13 or13 PMpost13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull time13 Times13 for13 predicted13 concentrations13 13 These13

times13 are13 not13 necessarily13 at13 observed13 times13 but13 at13 a13 frequency13 speciZied13 in13 the13 NPAG13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

bull pred113 Predictions13 for13 output13 113 13 For13 PMpop13 objects13 predictions13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 population13 prior13 distribution13 13 For13 PMpost13 objects13 they13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject

bull pred213 pred313 etc13 If13 additional13 outputs13 exist13 they13 will13 each13 be13 columns13 in13 the13 dataframe13 just13 as13 for13 pred113 13

makePopmakePost

NPAG RunsIn13 the13 past13 users13 had13 to13 run13 NPAG13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 NPrun()13 13 However13 if13 NPrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable

1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 NPAG13 creates13 a13 temporary13 instruction13 Zile13 in13 case13 something13 happens13 so13 that13 instructions13 entered13 to13 date13 can13

be13 recovered13 13 Accept13 the13 default13 by13 choosing13 113 13 You13 can13 save13 with13 a13 meaningful13 Zilename13 later13 13 If13 it13 already13 exists13 you13 will13 be13 asked13 if13 you13 wish13 to13 overwrite13 the13 Zile13 which13 is13 usually13 the13 thing13 to13 do

Userrsquos13 Guide13 13 2513 13

8 If13 you13 have13 previously13 run13 IT2B13 you13 can13 automatically13 import13 the13 suggested13 parameter13 ranges13 13 Choose13 113 to13 do13 this13 and13 013 to13 run13 NPAG13 without13 a13 previous13 IT2B13 run81 If13 you13 choose13 option13 113 you13 must13 specify13 the13 name13 of13 a13 FROMxxxx13 Zile13 typically13 FROM000113 that13 you13 can13

Zind13 in13 an13 output13 directory13 after13 a13 successful13 IT2B13 run13 13 Note13 that13 the13 program13 will13 then13 assume13 that13 you13 are13 using13 the13 same13 wrk13 Ziles13 that13 IT2B13 made13 from13 your13 data13 csv13 Zile13 13 It13 is13 strongly13 recommended13 to13 override13 this13 and13 specify13 a13 data13 csv13 Zile13 13 At13 this13 point13 you13 will13 jump13 to13 1013 below13 and13 continue13 on13 however13 your13 answers13 will13 often13 be13 supplied13 by13 the13 instructions13 contained13 in13 the13 FROMxxxx13 Zile13 and13 you13 need13 merely13 conZirm13 them

9 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13 have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 NPrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis91 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13

for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

10 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 NPAG13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

11 Enter13 the13 name13 of13 your13 csv13 Zile13 now12 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile13 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset131 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects132 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry14 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset15 Enter13 the13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo 13 followed13 by13

return16 Select13 how13 you13 would13 like13 to13 model13 assay13 (observation)13 error13 for13 each13 output13 equation13 13 You13 have13 four13 choices13 13

In13 all13 four13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0161 Error13 model13 113 (SD)13 13 Choose13 this13 option13 if13 you13 have13 already13 run13 IT2B13 and13 multiplied13 your13 assay13 error13

polynomial13 by13 gamma13 (see13 next13 option13 for13 a13 description13 of13 gamma)162 Error13 model13 213 (SD13 13 gamma)13 13 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13

observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 If13 you13 choose13 this13 option13 you13 then13 can13 specify13 the13 starting13 value13 of13 gamma13 13 Good13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality

163 Error13 model13 313 (SD213 +13 lamda2)0513 13 Lamda13 is13 an13 alternative13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present

Userrsquos13 Guide13 13 2613 13

164 Error13 model13 413 SD13 =13 gamma13 13 This13 model13 is13 rarely13 used13 and13 is13 equivalent13 to13 specifying13 a13 model13 with13 C013 only13 ie13 a13 constant13 error13 regardless13 of13 concentration

17 Once13 you13 select13 the13 assay13 error13 model13 for13 each13 output13 equation13 you13 are13 then13 offered13 four13 more13 options13 on13 which13 assay13 error13 polynomial13 coefZicients13 to13 use13 13 Choices13 113 and13 213 are13 the13 most13 commonly13 used171 Choice13 113 The13 default13 13 Use13 coefZicients13 in13 the13 subject13 record13 (C013 C113 C213 C313 in13 the13 data13 csv13 Zile)13 and13 if13

missing13 use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 (item13 1813 below)172 Choice13 213 Use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 for13 all13 subjects13 regardless13 of13 what13 is13 in13 the13

data13 csv13 Zile173 Choice13 313 13 To13 multiply13 data13 csv13 values13 and13 default13 entered13 values13 by13 a13 Zixed13 gamma13 and13 use13 them13 13 174 Choice13 013 Specify13 coefZicients13 on13 a13 subject13 by13 subject13 basis13 either13 those13 in13 the13 data13 csv13 Zile13 already13 the13

default13 values13 entered13 into13 the13 program13 or13 other13 values18 For13 each13 output13 equation13 after13 you13 have13 selected13 the13 option13 in13 item13 1713 you13 will13 be13 prompted13 to13 supply13 the13

required13 information13 including13 the13 general13 default13 values13 for13 missing13 or13 overridden13 values13 in13 the13 data13 csv13 Zile19 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13

usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13

20 Enter13 the13 grid13 point13 index13 13 This13 number13 corresponds13 to13 the13 number13 of13 grid13 (support)13 points13 which13 will13 initially13 Zill13 the13 model13 parameter13 space13 13 The13 larger13 the13 number13 of13 random13 parameters13 to13 be13 estimated13 the13 more13 points13 are13 required13 13 The13 program13 will13 make13 a13 suggestion13 based13 on13 the13 number13 of13 random13 parameters13 in13 the13 model13 13 The13 more13 you13 choose13 the13 slower13 the13 run13 will13 be13 but13 results13 may13 improve13 13 It13 is13 reasonable13 to13 choose13 fewer13 points13 early13 in13 model13 exploration13 and13 increase13 in13 later13 phases13 or13 if13 poor13 model13 Zits13 or13 lack13 of13 convergence13 are13 noted13 The13 choices13 are13 113 to13 713 corresponding13 respectively13 to13 212913 500313 1000713 2001113 4000913 and13 8002113 points13 13 If13 you13 choose13 713 you13 then13 have13 an13 additional13 choice13 to13 select13 one13 or13 more13 multiples13 of13 8002113 points

21 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 013 or13 greater13 13 If13 you13 enter13 an13 integer13 greater13 than13 013 the13 engine13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13 If13 you13 enter13 013 this13 is13 the13 way13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 an13 independent13 data13 set13 and13 a13 non-shy‐uniform13 prior13 must13 be13 speciZied13 (see13 3013 below)13 13 This13 means13 that13 the13 engine13 will13 only13 calculate13 the13 individual13 Bayesian13 posteriors13 for13 the13 new13 subjects13 using13 the13 population13 joint13 density13 from13 a13 previous13 run13 as13 a13 Bayesian13 prior

22 Information13 about13 convergence13 criteria13 13 Answer13 113 or13 some13 other13 keystroke13 plus13 Return13 to13 acknowledge13 that13 you13 have13 read13 it

23 In13 order13 to13 predict13 concentrations13 from13 a13 non-shy‐parametric13 distribution13 you13 have13 the13 option13 to13 use13 the13 1)13 mean13 2)13 median13 or13 3)13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject13 13 We13 typically13 use13 the13 median13 Zirst13 and13 then13 the13 mean13 in13 a13 separate13 run13 and13 compare13 the13 differences13 13

24 Select13 the13 time13 interval13 to13 generate13 predicted13 concentrations13 13 Additionally13 there13 will13 also13 be13 predictions13 made13 at13 the13 time13 of13 each13 observation13 13 In13 general13 for13 most13 models13 predictions13 every13 1213 minutes13 provide13 sufZicient13 granularity13 13 Smaller13 values13 can13 result13 in13 very13 large13 Ziles13 for13 big13 populations

25 Select13 the13 default13 MIC13 to13 be13 used13 for13 AUCMIC13 ratio13 reporting13 13 This13 should13 generally13 be13 set13 to13 the13 default13 of13 113 by13 choosing13 113 13 You13 can13 always13 extract13 the13 AUC13 later13 and13 divide13 it13 by13 any13 MIC13 you13 choose

26 Enter13 the13 value13 in13 hours13 that13 you13 want13 for13 calculations13 of13 AUCs13 from13 predicted13 concentration13 proZiles13 13 The13 default13 is13 2413 hours13 which13 you13 can13 accept13 by13 entering13 113 or13 013 if13 you13 want13 to13 specify13 a13 different13 interval

27 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

28 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

Userrsquos13 Guide13 13 2713 13

29 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

30 For13 the13 prior13 density13 choose13 113 if13 it13 is13 to13 be13 uniform13 13 This13 means13 that13 the13 initial13 grid13 points13 will13 be13 evenly13 distributed13 with13 equal13 probability13 within13 the13 boundaries13 speciZied13 (in13 1513 above)13 13 If13 you13 choose13 013 you13 will13 be13 prompted13 for13 the13 name13 of13 a13 Zile13 that13 contains13 the13 prior13 density13 13 This13 will13 be13 DEN000113 unless13 you13 have13 changed13 its13 name13 13 It13 will13 be13 found13 in13 the13 output13 directory13 of13 a13 prior13 NPAG13 run13 13 The13 model13 used13 to13 generate13 the13 DEN000113 Zile13 must13 be13 exactly13 the13 same13 as13 the13 current13 model13 including13 parameter13 boundaries13 13 However13 this13 option13 is13 useful13 to13 specify13 a13 non-shy‐uniform13 density13 for13 two13 reasons13 13 The13 Zirst13 is13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 a13 new13 set13 of13 subjects13 13 Do13 this13 in13 combination13 with13 setting13 the13 number13 of13 cycles13 to13 013 (see13 2113 above)13 13 The13 second13 use13 for13 a13 non-shy‐uniform13 prior13 is13 to13 continue13 a13 previous13 run13 13 For13 example13 if13 you13 only13 set13 the13 number13 of13 cycles13 to13 5013 to13 get13 a13 rough13 idea13 of13 model13 Zit13 you13 may13 continue13 where13 you13 left13 off13 by13 specifying13 the13 DEN000113 Zile13 from13 the13 50-shy‐cycle13 run13 and13 continuing13 with13 as13 many13 additional13 cycles13 as13 you13 specify13 in13 item13 2113 13 So13 in13 the13 example13 if13 you13 specify13 10013 cycles13 in13 2113 the13 total13 number13 of13 cycles13 will13 be13 5013 +13 10013 =13 150

31 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 NPrun(instr=ldquoyourfilerdquo)13 option13 and13 including13 ldquoyourZilerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

32 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 NPAG13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 NPAG13 analysis

33 The13 NPAG13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

IT2B RunsIn13 the13 past13 users13 had13 to13 run13 IT2B13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 ITrun()13 13 However13 if13 ITrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13

have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 ITrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis

Userrsquos13 Guide13 13 2813 13

71 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13 for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

8 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 IT2B13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

9 Enter13 the13 name13 of13 your13 csv13 Zile13 now10 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile11 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset111 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects112 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry12 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset13 Enter13 the13 initial13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo13 followed13

by13 return14 The13 estimated13 mean13 for13 each13 parameter13 value13 distribution13 during13 the13 Zirst13 iteration13 will13 be13 the13 median13 of13 the13

range13 speciZied13 in13 1313 13 You13 now13 have13 the13 option13 to13 specify13 the13 standard13 deviation13 for13 the13 parameter13 value13 distribution13 which13 by13 default13 is13 half13 of13 the13 range13 in13 1313 13 Choose13 113 to13 accept13 this13 (the13 usual13 answer)13 or13 013 to13 change13 it13 to13 something13 else13 expressed13 as13 a13 multiple13 of13 the13 range

15 In13 IT2B13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 You13 can13 now13 choose13 113 if13 every13 subject13 has13 the13 same13 coefZicients13 or13 013 to13 use13 a13 unique13 set13 of13 coefZicients13 for13 each13 subject13 13 The13 Zirst13 case13 is13 the13 more13 usual13 when13 all13 13 samples13 from13 all13 subjects13 are13 analyzed13 in13 the13 same13 lab13 13 If13 13 samples13 are13 analyzed13 in13 different13 labs13 and13 you13 have13 the13 assay13 data13 from13 each13 lab13 then13 you13 would13 enter13 013 13 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 (see13 151313 below)13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0151 If13 you13 choose13 113 (one13 set13 of13 coefZicients13 for13 all13 subjects)13 you13 will13 then13 be13 presented13 with13 313 additional13

choices1511 Choice13 113 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13 observation13

including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 and13 to13 Zix13 gamma13 to13 1

1512 Choice13 213 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 but13 to13 estimate13 gamma13 based13 on13 the13 data13 13 This13 is13 the13 usual13 option

1513 Choice13 313 Choose13 this13 option13 if13 you13 wish13 to13 estimate13 the13 assay13 error13 coefZicients13 based13 on13 your13 data13 for13 use13 in13 future13 runs13 13 Although13 you13 can13 access13 this13 option13 by13 using13 either13 ITrun()13 or13 ERRrun()13 in13 R13 the13 instruction13 Ziles13 that13 you13 save13 and13 the13 generated13 output13 Ziles13 will13 be13 different13 13 Therefore13 we13 recommend13 that13 if13 you13 intend13 to13 choose13 this13 option13 use13 ERRrun()13 in13 R13 which13 will13 generate13 an13 ASS000113 Zile13 that13 contains13 the13 estimates13 for13 C013 C113 C213 and13 C313 13 You13 can13 then13 include13 this13 Zile13 in13 the13 working13 directory13 (along13 with13 a13 model13 txt13 Zile13 and13 a13 data13 csv13 Zile)13 to13 do13 an13 IT2B13 run13 supplying13 the13 Zile13 name13 in13 16113 below

Userrsquos13 Guide13 13 2913 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

of13 loaded13 R13 objects13 allowing13 for13 comparison13 between13 runs13 eg13 NPload(1)13 13 Finally13 at13 this13 point13 other13 Pmetrics13 commands13 can13 be13 added13 to13 the13 script13 to13 process13 the13 data13 such13 as13 the13 following

plot(final1)plot(cycle1)plot(op1type=rdquopoprdquo) or plot(op1$pop1)plot(op1) default is to plot posterior predictions for output 1plot(op1type=rdquopoprdquoresid=T)

Of13 course13 the13 full13 power13 of13 R13 can13 be13 used13 in13 scripts13 to13 analyze13 data13 but13 these13 simple13 statements13 serve13 as13 examplesIf13 you13 do13 not13 use13 the13 PMtree() structure13 we13 suggest13 that13 the13 R13 script13 for13 a13 particular13 project13 be13 saved13 into13 a13 folder13 called13 ldquoRscriptrdquo13 or13 some13 other13 meaningful13 name13 in13 the13 working13 directory13 13 Folders13 are13 not13 be13 moved13 by13 the13 batch13 Zile13 13 Within13 the13 script13 number13 runs13 sequentially13 and13 use13 comments13 liberally13 to13 13 distinguish13 runs13 as13 shown13 below

library(Pmetrics)

Run 1 - Ka Kel V all subjectssetwd(ldquoworking directoryrdquo)NPrun() assumes model=rdquomodeltxtrdquo and data=rdquodatacsvrdquoNPload(1)

Remember13 in13 R13 that13 the13 command13 example(function) will13 provide13 examples13 for13 the13 speciZied13 function13 13 Most13 Pmetrics13 functions13 have13 examples

Pmetrics Data ObjectsAfter13 a13 successful13 IT2B13 or13 NPAG13 run13 an13 R13 dataZile13 is13 saved13 in13 the13 output13 subdirectory13 of13 the13 newly13 created13 numerically13 ordered13 folder13 in13 the13 working13 directory13 13 After13 IT2B13 this13 Zile13 is13 called13 ldquoIT2BoutRdatardquo13 and13 after13 NPAG13 it13 is13 called13 ldquoNPAGoutRdatardquo13 13 As13 mentioned13 in13 the13 previous13 section13 these13 data13 Ziles13 can13 be13 loaded13 by13 ensuring13 that13 the13 Runs13 folder13 is13 set13 as13 the13 working13 directory13 and13 then13 using13 the13 Pmetrics13 commands13 ITload(run_num)13 or13 NPload(run_num)

Both13 commands13 load13 their13 respective13 Rdata13 Ziles13 into13 R13 making13 the13 contained13 objects13 available13 for13 plotting13 and13 other13 analysisObjects13 loaded13 by13 ITload(run_num) and NPload(run_num)

Objects Variables Comments

op13 (class13 PMop13 list) $pop113 $post113 Population13 and13 posterior13 predictions13 for13 each13 output13 equation13 ie13 113 213

13 $id Subject13 identiZication

13 $time Observation13 time13 in13 relative13 decimal13 hours

13 $obs Observation

13 $pred Prediction13 based13 on13 median13 of13 population13 or13 posterior13 parameter13 value13 distributions

Userrsquos13 Guide13 13 1913 13

Objects Variables Comments

13 $block Dosing13 block13 usually13 113 unless13 data13 Zile13 contains13 EVID=413 dose13 reset13 events13 in13 which13 case13 each13 such13 reset13 within13 a13 given13 ID13 will13 increment13 the13 dosing13 block13 by13 113 for13 that13 ID

13 $obsSD Calculated13 standard13 deviation13 (error)13 of13 the13 observation13 based13 on13 the13 assay13 error13 polynomial

13 $d Difference13 between13 pred13 and13 obs

13 $ds Squared13 difference13 between13 pred13 and13 obs

13 $wd $d13 weighted13 by13 the13 $obsSD

13 $wds $ds13 weighted13 by13 the13 $obsSD

Zinal13 (class13 PMZinal13 list) $popPoints (NPAG13 only)13 Dataframe13 of13 the13 Zinal13 cycle13 joint13 population13 density13 of13 grid13 points13 with13 column13 names13 equal13 to13 the13 name13 of13 each13 random13 parameter13 plus13 $prob13 for13 the13 associated13 probability13 of13 that13 point13

$popMean The13 Zinal13 cycle13 mean13 for13 each13 random13 parameter13 distribution

$popSD The13 Zinal13 cycle13 standard13 deviation13 for13 each13 random13 parameter13 distribution

$popCV The13 Zinal13 cycle13 coefZicient13 of13 variation13 for13 each13 random13 parameter13 distribution

$popVar The13 Zinal13 cycle13 variance13 for13 each13 random13 parameter13 distribution

$popCov The13 Zinal13 cycle13 covariance13 matrix13 for13 each13 random13 parameter13 distribution

$popCor The13 Zinal13 cycle13 correlation13 matrix13 for13 each13 random13 parameter13 distribution

$popMedian The13 Zinal13 cycle13 median13 for13 each13 random13 parameter13 distribution

$gridpts (NPAG13 only)13 The13 initial13 number13 of13 support13 points

$ab Matrix13 of13 boundaries13 for13 random13 parameter13 values13 13 For13 NPAG13 this13 is13 speciZied13 by13 the13 user13 prior13 to13 the13 run13 for13 IT2B13 it13 is13 calculated13 as13 a13 user13 speciZied13 multiple13 of13 the13 SD13 for13 the13 parameter13 value13 distribution

Userrsquos13 Guide13 13 2013 13

Objects Variables Comments

cycle13 (class13 PMcycle13 list) $names Vector13 of13 names13 of13 the13 random13 parameters

$ll Matrix13 of13 cycle13 number13 and13 -shy‐2Log-shy‐likelihood13 at13 each13 cycle

$gamlam A13 matrix13 of13 cycle13 number13 and13 gamma13 or13 lambda13 at13 each13 cycle13 (see13 item13 1613 under13 NPAG13 Runs13 below13 for13 a13 discussion13 of13 gamma13 and13 lambda)

$mean A13 matrix13 of13 cycle13 number13 and13 the13 mean13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 mean

$sd A13 matrix13 of13 cycle13 number13 and13 the13 standard13 deviation13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$median A13 matrix13 of13 cycle13 number13 and13 the13 median13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$aic A13 matrix13 of13 cycle13 number13 and13 Akaike13 Information13 Criterion13 at13 each13 cycle

$bic A13 matrix13 of13 cycle13 number13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle

cov13 (class13 PMcov13 dataframe)

$id Subject13 identiZication

$time Time13 for13 each13 covariate13 entry

covariates Covariate13 values13 for13 each13 subject13 at13 each13 time13 extracted13 from13 the13 raw13 data13 Zile

parameters Mean13 median13 or13 mode13 of13 Bayesian13 posterior13 distribution13 for13 each13 random13 parameter13 in13 the13 model13 13 Mode13 summaries13 are13 available13 for13 NPAG13 output13 only13 and13 the13 default13 is13 median13 13 Values13 are13 recycled13 for13 each13 row13 within13 a13 given13 subject13 with13 the13 number13 of13 rows13 driven13 by13 the13 number13 of13 covariate13 entries

Userrsquos13 Guide13 13 2113 13

Objects Variables Comments

pop13 (class13 PMpop13 dataframe)

post13 (class13 PMpost13 dataframe)

NPAG13 only

$id Subject13 identiZication

$pred113 Population13 prior13 (PMpop)13 or13 Bayesian13 posterior13 (PMpost)13 predictions13 for13 each13 output13 equation13 based13 on13 mean13 median13 and13 mode13 as13 speciZied13 by13 the13 user13 and13 with13 frequency13 also13 speciZied13 by13 the13 user13 in13 the13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

$block Same13 as13 for13 PMop13 objects13 above

NPdata13 (class13 NPAG13 list)13 ITdata13 (class13 IT2B13 list

Raw13 data13 used13 to13 make13 the13 above13 objects13 13 Please13 use13 NPparse13 or13 ITparse13 in13 R13 for13 discussion13 of13 the13 data13 contained13 in13 these13 objects

Since13 R13 is13 an13 object13 oriented13 language13 to13 access13 the13 observations13 in13 a13 PMop13 object13 for13 example13 use13 the13 following13 syntax13 op$post1$obsNote13 that13 you13 will13 place13 an13 integer13 within13 the13 parentheses13 of13 the13 loading13 functions13 eg13 NPload(1)13 which13 will13 sufZix13 all13 the13 above13 objects13 with13 that13 integer13 eg13 op113 Zinal113 NPdata113 13 This13 allows13 several13 models13 to13 be13 loaded13 into13 R13 simultaneously13 each13 with13 a13 unique13 sufZix13 and13 which13 can13 be13 compared13 with13 the13 PMcompare()13 command13 (see13 Model13 Diagnostics13 below)

Making New Pmetrics ObjectsOnce13 you13 have13 loaded13 the13 raw13 (NPdata13 or13 ITdata)13 or13 processed13 (op13 Uinal13 cycle13 pop13 post)13 data13 objects13 described13 above13 with13 NPload(run_num)13 or13 ITload(run_num)13 should13 you13 wish13 to13 remake13 the13 processed13 objects13 with13 parameters13 other13 than13 the13 defaults13 you13 can13 easily13 do13 so13 with13 the13 make 13 family13 of13 commands13 13 For13 example13 the13 default13 for13 PMop13 observed13 vs13 predicted13 objects13 is13 to13 use13 the13 prediction13 based13 on13 the13 median13 of13 the13 population13 or13 posterior13 distribution13 13 If13 you13 wish13 to13 use13 the13 mean13 of13 the13 distribution13 remake13 the13 PMop13 object13 using makeOP()13 13 If13 you13 wish13 to13 see13 all13 the13 cycle13 information13 in13 a13 PMcycle13 object13 not13 omitting13 the13 Zirst13 1013 of13 cycles13 by13 default13 remake13 it13 using13 makeCycle()13 13

For13 all13 of13 the13 following13 commands13 the13 data13 input13 is13 either13 NPdata13 or13 ITdata13 with13 additional13 function13 arguments13 speciZic13 to13 each13 command13 13 Accessing13 the13 help13 for13 each13 function13 in13 R13 will13 provide13 further13 details13 on13 the13 arguments13 defaults13 and13 output13 of13 each13 command

Userrsquos13 Guide13 13 2213 13

Command Description R13 help

makeAUC Make13 a13 dataframe13 of13 class13 PMauc13 containing13 subject13 ID13 and13 AUC13 from13 a13 variety13 of13 inputs13 including13 objects13 of13 PMop13 PMsim13 or13 a13 suitable13 dataframe

makeAUC

makeCov Generate13 a13 dataframe13 of13 class13 PMcov13 with13 subject-shy‐speciZic13 covariates13 extracted13 from13 the13 data13 csv13 Zile13 This13 object13 can13 be13 plotted13 and13 used13 to13 test13 for13 covariates13 which13 are13 signiZicantly13 associated13 with13 model13 parameters13 13

makeCov

makeCycle Create13 a13 PMcycle13 object13 described13 in13 the13 previous13 section makeCycle

makeFinal Create13 a13 PMZinal13 object13 described13 in13 the13 previous13 section makeFinal

makeOP Create13 a13 PMop13 object13 described13 in13 the13 previous13 section makeOP

makeNCA Create13 a13 dataframe13 (class13 PMnca)13 with13 the13 output13 of13 a13 non-shy‐compartmental13 analysis13 using13 PMpost13 and13 NPAG13 data13 objects13 as13 input13 13 The13 PMnca13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull auc13 Area13 under13 the13 time-shy‐observation13 curve13 using13 the13

trapezoidal13 approximation13 from13 time13 013 until13 the13 second13 dose13 or13 if13 only13 one13 dose13 until13 the13 last13 observation

bull aumc13 Area13 under13 the13 Zirst13 moment13 curvebull k13 Slope13 by13 least-shy‐squares13 linear13 regression13 of13 the13 Zinal13

613 log-shy‐transformed13 observations13 vs13 timebull auclast13 Area13 under13 the13 curve13 from13 the13 time13 of13 the13

last13 observation13 to13 inZinity13 calculated13 as13 [Final13 obs]kbull aumclast13 Area13 under13 the13 Zirst13 moment13 curve13 from13

the13 time13 of13 the13 last13 observation13 to13 inZinitybull aucinf13 Area13 under13 the13 curve13 from13 time13 013 to13 inZinity13

caluculated13 as13 auc13 +13 auclastbull aumcinf13 Area13 under13 the13 Zirst13 moment13 curve13 from13

time13 013 to13 inZinitybull mrt13 Mean13 residence13 time13 calculated13 as13 1kbull cmax13 Maximum13 predicted13 concentration13 after13 the13

Zirst13 dosebull tmax13 Time13 to13 cmaxbull cl13 Clearance13 calculated13 as13 doseaucinfbull vdss13 Volume13 of13 distribution13 at13 steady13 state13

calculated13 as13 clmrtbull thalf13 Half13 life13 of13 elimination13 calculated13 as13 ln(2)kbull dose13 First13 dose13 amount13 for13 each13 subject

makeNCA

Userrsquos13 Guide13 13 2313 13

Command Description R13 help

makeErrorPoly This13 function13 plots13 Zirst13 second13 and13 third13 order13 polynomial13 functions13 Zitted13 to13 pairs13 of13 observations13 and13 associated13 standard13 deviations13 for13 a13 given13 output13 assay13 In13 this13 way13 the13 standard13 deviation13 associated13 with13 any13 observation13 may13 be13 calculated13 and13 used13 to13 appropriately13 weight13 that13 observation13 in13 the13 model13 building13 process13 Observations13 are13 weighted13 by13 the13 reciprocal13 of13 the13 variance13 or13 squared13 standard13 deviation13 13 Output13 of13 the13 function13 is13 a13 plot13 of13 the13 measured13 observations13 and13 Zitted13 polynomial13 curves13 and13 a13 list13 with13 the13 Zirst13 second13 and13 third13 order13 coefZicients

makeErrorPoly

makePTA This13 function13 performs13 a13 Probability13 of13 Target13 Attainment13 analysis13 for13 a13 set13 of13 simulated13 doses13 and13 time-shy‐concentration13 proZiles13 13 Targets13 (eg13 Minimum13 Inhibitory13 Concentrations)13 the13 type13 of13 target13 attainment13 (ie13 time13 above13 target13 Cmaxtarget13 13 AUCtarget13 Cmintarget13 or13 Cxtarget13 where13 x13 is13 any13 time13 point)13 and13 the13 success13 threshold13 (eg13 time13 gt13 0713 or13 Cmaxtarget13 gt13 10)13 can13 all13 be13 speciZied13 13 Output13 is13 a13 list13 (class13 PMpta)13 with13 two13 objectsbull Results13 a13 413 dimensional13 array13 with13 dimension13 size13 of13

[number13 of13 doses13 number13 of13 targets13 number13 of13 simulated13 proZiles13 1]13 which13 gives13 the13 target13 attainment13 (eg13 Cmaxtarget)13 for13 each13 dose13 target13 and13 proZile

bull Outcome13 For13 each13 dose13 and13 target13 a13 summary13 of13 the13 target13 attainment13 for13 all13 the13 proZiles13 including13 mean13 standard13 deviation13 and13 proportion13 above13 the13 success13 threshold

PMpta13 objects13 can13 be13 summarized13 with13 summary(x)13 and13 plotted13 with13 plot(x)13

makePTA

Userrsquos13 Guide13 13 2413 13

Command Description R13 help

makePopmakePost(NPAG13 only)

These13 functions13 create13 dataframes13 of13 class13 PMpop13 and13 PMpost13 respectively13 13 The13 PMpop13 or13 PMpost13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull time13 Times13 for13 predicted13 concentrations13 13 These13

times13 are13 not13 necessarily13 at13 observed13 times13 but13 at13 a13 frequency13 speciZied13 in13 the13 NPAG13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

bull pred113 Predictions13 for13 output13 113 13 For13 PMpop13 objects13 predictions13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 population13 prior13 distribution13 13 For13 PMpost13 objects13 they13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject

bull pred213 pred313 etc13 If13 additional13 outputs13 exist13 they13 will13 each13 be13 columns13 in13 the13 dataframe13 just13 as13 for13 pred113 13

makePopmakePost

NPAG RunsIn13 the13 past13 users13 had13 to13 run13 NPAG13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 NPrun()13 13 However13 if13 NPrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable

1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 NPAG13 creates13 a13 temporary13 instruction13 Zile13 in13 case13 something13 happens13 so13 that13 instructions13 entered13 to13 date13 can13

be13 recovered13 13 Accept13 the13 default13 by13 choosing13 113 13 You13 can13 save13 with13 a13 meaningful13 Zilename13 later13 13 If13 it13 already13 exists13 you13 will13 be13 asked13 if13 you13 wish13 to13 overwrite13 the13 Zile13 which13 is13 usually13 the13 thing13 to13 do

Userrsquos13 Guide13 13 2513 13

8 If13 you13 have13 previously13 run13 IT2B13 you13 can13 automatically13 import13 the13 suggested13 parameter13 ranges13 13 Choose13 113 to13 do13 this13 and13 013 to13 run13 NPAG13 without13 a13 previous13 IT2B13 run81 If13 you13 choose13 option13 113 you13 must13 specify13 the13 name13 of13 a13 FROMxxxx13 Zile13 typically13 FROM000113 that13 you13 can13

Zind13 in13 an13 output13 directory13 after13 a13 successful13 IT2B13 run13 13 Note13 that13 the13 program13 will13 then13 assume13 that13 you13 are13 using13 the13 same13 wrk13 Ziles13 that13 IT2B13 made13 from13 your13 data13 csv13 Zile13 13 It13 is13 strongly13 recommended13 to13 override13 this13 and13 specify13 a13 data13 csv13 Zile13 13 At13 this13 point13 you13 will13 jump13 to13 1013 below13 and13 continue13 on13 however13 your13 answers13 will13 often13 be13 supplied13 by13 the13 instructions13 contained13 in13 the13 FROMxxxx13 Zile13 and13 you13 need13 merely13 conZirm13 them

9 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13 have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 NPrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis91 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13

for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

10 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 NPAG13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

11 Enter13 the13 name13 of13 your13 csv13 Zile13 now12 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile13 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset131 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects132 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry14 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset15 Enter13 the13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo 13 followed13 by13

return16 Select13 how13 you13 would13 like13 to13 model13 assay13 (observation)13 error13 for13 each13 output13 equation13 13 You13 have13 four13 choices13 13

In13 all13 four13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0161 Error13 model13 113 (SD)13 13 Choose13 this13 option13 if13 you13 have13 already13 run13 IT2B13 and13 multiplied13 your13 assay13 error13

polynomial13 by13 gamma13 (see13 next13 option13 for13 a13 description13 of13 gamma)162 Error13 model13 213 (SD13 13 gamma)13 13 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13

observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 If13 you13 choose13 this13 option13 you13 then13 can13 specify13 the13 starting13 value13 of13 gamma13 13 Good13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality

163 Error13 model13 313 (SD213 +13 lamda2)0513 13 Lamda13 is13 an13 alternative13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present

Userrsquos13 Guide13 13 2613 13

164 Error13 model13 413 SD13 =13 gamma13 13 This13 model13 is13 rarely13 used13 and13 is13 equivalent13 to13 specifying13 a13 model13 with13 C013 only13 ie13 a13 constant13 error13 regardless13 of13 concentration

17 Once13 you13 select13 the13 assay13 error13 model13 for13 each13 output13 equation13 you13 are13 then13 offered13 four13 more13 options13 on13 which13 assay13 error13 polynomial13 coefZicients13 to13 use13 13 Choices13 113 and13 213 are13 the13 most13 commonly13 used171 Choice13 113 The13 default13 13 Use13 coefZicients13 in13 the13 subject13 record13 (C013 C113 C213 C313 in13 the13 data13 csv13 Zile)13 and13 if13

missing13 use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 (item13 1813 below)172 Choice13 213 Use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 for13 all13 subjects13 regardless13 of13 what13 is13 in13 the13

data13 csv13 Zile173 Choice13 313 13 To13 multiply13 data13 csv13 values13 and13 default13 entered13 values13 by13 a13 Zixed13 gamma13 and13 use13 them13 13 174 Choice13 013 Specify13 coefZicients13 on13 a13 subject13 by13 subject13 basis13 either13 those13 in13 the13 data13 csv13 Zile13 already13 the13

default13 values13 entered13 into13 the13 program13 or13 other13 values18 For13 each13 output13 equation13 after13 you13 have13 selected13 the13 option13 in13 item13 1713 you13 will13 be13 prompted13 to13 supply13 the13

required13 information13 including13 the13 general13 default13 values13 for13 missing13 or13 overridden13 values13 in13 the13 data13 csv13 Zile19 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13

usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13

20 Enter13 the13 grid13 point13 index13 13 This13 number13 corresponds13 to13 the13 number13 of13 grid13 (support)13 points13 which13 will13 initially13 Zill13 the13 model13 parameter13 space13 13 The13 larger13 the13 number13 of13 random13 parameters13 to13 be13 estimated13 the13 more13 points13 are13 required13 13 The13 program13 will13 make13 a13 suggestion13 based13 on13 the13 number13 of13 random13 parameters13 in13 the13 model13 13 The13 more13 you13 choose13 the13 slower13 the13 run13 will13 be13 but13 results13 may13 improve13 13 It13 is13 reasonable13 to13 choose13 fewer13 points13 early13 in13 model13 exploration13 and13 increase13 in13 later13 phases13 or13 if13 poor13 model13 Zits13 or13 lack13 of13 convergence13 are13 noted13 The13 choices13 are13 113 to13 713 corresponding13 respectively13 to13 212913 500313 1000713 2001113 4000913 and13 8002113 points13 13 If13 you13 choose13 713 you13 then13 have13 an13 additional13 choice13 to13 select13 one13 or13 more13 multiples13 of13 8002113 points

21 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 013 or13 greater13 13 If13 you13 enter13 an13 integer13 greater13 than13 013 the13 engine13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13 If13 you13 enter13 013 this13 is13 the13 way13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 an13 independent13 data13 set13 and13 a13 non-shy‐uniform13 prior13 must13 be13 speciZied13 (see13 3013 below)13 13 This13 means13 that13 the13 engine13 will13 only13 calculate13 the13 individual13 Bayesian13 posteriors13 for13 the13 new13 subjects13 using13 the13 population13 joint13 density13 from13 a13 previous13 run13 as13 a13 Bayesian13 prior

22 Information13 about13 convergence13 criteria13 13 Answer13 113 or13 some13 other13 keystroke13 plus13 Return13 to13 acknowledge13 that13 you13 have13 read13 it

23 In13 order13 to13 predict13 concentrations13 from13 a13 non-shy‐parametric13 distribution13 you13 have13 the13 option13 to13 use13 the13 1)13 mean13 2)13 median13 or13 3)13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject13 13 We13 typically13 use13 the13 median13 Zirst13 and13 then13 the13 mean13 in13 a13 separate13 run13 and13 compare13 the13 differences13 13

24 Select13 the13 time13 interval13 to13 generate13 predicted13 concentrations13 13 Additionally13 there13 will13 also13 be13 predictions13 made13 at13 the13 time13 of13 each13 observation13 13 In13 general13 for13 most13 models13 predictions13 every13 1213 minutes13 provide13 sufZicient13 granularity13 13 Smaller13 values13 can13 result13 in13 very13 large13 Ziles13 for13 big13 populations

25 Select13 the13 default13 MIC13 to13 be13 used13 for13 AUCMIC13 ratio13 reporting13 13 This13 should13 generally13 be13 set13 to13 the13 default13 of13 113 by13 choosing13 113 13 You13 can13 always13 extract13 the13 AUC13 later13 and13 divide13 it13 by13 any13 MIC13 you13 choose

26 Enter13 the13 value13 in13 hours13 that13 you13 want13 for13 calculations13 of13 AUCs13 from13 predicted13 concentration13 proZiles13 13 The13 default13 is13 2413 hours13 which13 you13 can13 accept13 by13 entering13 113 or13 013 if13 you13 want13 to13 specify13 a13 different13 interval

27 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

28 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

Userrsquos13 Guide13 13 2713 13

29 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

30 For13 the13 prior13 density13 choose13 113 if13 it13 is13 to13 be13 uniform13 13 This13 means13 that13 the13 initial13 grid13 points13 will13 be13 evenly13 distributed13 with13 equal13 probability13 within13 the13 boundaries13 speciZied13 (in13 1513 above)13 13 If13 you13 choose13 013 you13 will13 be13 prompted13 for13 the13 name13 of13 a13 Zile13 that13 contains13 the13 prior13 density13 13 This13 will13 be13 DEN000113 unless13 you13 have13 changed13 its13 name13 13 It13 will13 be13 found13 in13 the13 output13 directory13 of13 a13 prior13 NPAG13 run13 13 The13 model13 used13 to13 generate13 the13 DEN000113 Zile13 must13 be13 exactly13 the13 same13 as13 the13 current13 model13 including13 parameter13 boundaries13 13 However13 this13 option13 is13 useful13 to13 specify13 a13 non-shy‐uniform13 density13 for13 two13 reasons13 13 The13 Zirst13 is13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 a13 new13 set13 of13 subjects13 13 Do13 this13 in13 combination13 with13 setting13 the13 number13 of13 cycles13 to13 013 (see13 2113 above)13 13 The13 second13 use13 for13 a13 non-shy‐uniform13 prior13 is13 to13 continue13 a13 previous13 run13 13 For13 example13 if13 you13 only13 set13 the13 number13 of13 cycles13 to13 5013 to13 get13 a13 rough13 idea13 of13 model13 Zit13 you13 may13 continue13 where13 you13 left13 off13 by13 specifying13 the13 DEN000113 Zile13 from13 the13 50-shy‐cycle13 run13 and13 continuing13 with13 as13 many13 additional13 cycles13 as13 you13 specify13 in13 item13 2113 13 So13 in13 the13 example13 if13 you13 specify13 10013 cycles13 in13 2113 the13 total13 number13 of13 cycles13 will13 be13 5013 +13 10013 =13 150

31 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 NPrun(instr=ldquoyourfilerdquo)13 option13 and13 including13 ldquoyourZilerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

32 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 NPAG13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 NPAG13 analysis

33 The13 NPAG13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

IT2B RunsIn13 the13 past13 users13 had13 to13 run13 IT2B13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 ITrun()13 13 However13 if13 ITrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13

have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 ITrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis

Userrsquos13 Guide13 13 2813 13

71 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13 for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

8 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 IT2B13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

9 Enter13 the13 name13 of13 your13 csv13 Zile13 now10 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile11 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset111 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects112 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry12 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset13 Enter13 the13 initial13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo13 followed13

by13 return14 The13 estimated13 mean13 for13 each13 parameter13 value13 distribution13 during13 the13 Zirst13 iteration13 will13 be13 the13 median13 of13 the13

range13 speciZied13 in13 1313 13 You13 now13 have13 the13 option13 to13 specify13 the13 standard13 deviation13 for13 the13 parameter13 value13 distribution13 which13 by13 default13 is13 half13 of13 the13 range13 in13 1313 13 Choose13 113 to13 accept13 this13 (the13 usual13 answer)13 or13 013 to13 change13 it13 to13 something13 else13 expressed13 as13 a13 multiple13 of13 the13 range

15 In13 IT2B13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 You13 can13 now13 choose13 113 if13 every13 subject13 has13 the13 same13 coefZicients13 or13 013 to13 use13 a13 unique13 set13 of13 coefZicients13 for13 each13 subject13 13 The13 Zirst13 case13 is13 the13 more13 usual13 when13 all13 13 samples13 from13 all13 subjects13 are13 analyzed13 in13 the13 same13 lab13 13 If13 13 samples13 are13 analyzed13 in13 different13 labs13 and13 you13 have13 the13 assay13 data13 from13 each13 lab13 then13 you13 would13 enter13 013 13 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 (see13 151313 below)13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0151 If13 you13 choose13 113 (one13 set13 of13 coefZicients13 for13 all13 subjects)13 you13 will13 then13 be13 presented13 with13 313 additional13

choices1511 Choice13 113 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13 observation13

including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 and13 to13 Zix13 gamma13 to13 1

1512 Choice13 213 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 but13 to13 estimate13 gamma13 based13 on13 the13 data13 13 This13 is13 the13 usual13 option

1513 Choice13 313 Choose13 this13 option13 if13 you13 wish13 to13 estimate13 the13 assay13 error13 coefZicients13 based13 on13 your13 data13 for13 use13 in13 future13 runs13 13 Although13 you13 can13 access13 this13 option13 by13 using13 either13 ITrun()13 or13 ERRrun()13 in13 R13 the13 instruction13 Ziles13 that13 you13 save13 and13 the13 generated13 output13 Ziles13 will13 be13 different13 13 Therefore13 we13 recommend13 that13 if13 you13 intend13 to13 choose13 this13 option13 use13 ERRrun()13 in13 R13 which13 will13 generate13 an13 ASS000113 Zile13 that13 contains13 the13 estimates13 for13 C013 C113 C213 and13 C313 13 You13 can13 then13 include13 this13 Zile13 in13 the13 working13 directory13 (along13 with13 a13 model13 txt13 Zile13 and13 a13 data13 csv13 Zile)13 to13 do13 an13 IT2B13 run13 supplying13 the13 Zile13 name13 in13 16113 below

Userrsquos13 Guide13 13 2913 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

Objects Variables Comments

13 $block Dosing13 block13 usually13 113 unless13 data13 Zile13 contains13 EVID=413 dose13 reset13 events13 in13 which13 case13 each13 such13 reset13 within13 a13 given13 ID13 will13 increment13 the13 dosing13 block13 by13 113 for13 that13 ID

13 $obsSD Calculated13 standard13 deviation13 (error)13 of13 the13 observation13 based13 on13 the13 assay13 error13 polynomial

13 $d Difference13 between13 pred13 and13 obs

13 $ds Squared13 difference13 between13 pred13 and13 obs

13 $wd $d13 weighted13 by13 the13 $obsSD

13 $wds $ds13 weighted13 by13 the13 $obsSD

Zinal13 (class13 PMZinal13 list) $popPoints (NPAG13 only)13 Dataframe13 of13 the13 Zinal13 cycle13 joint13 population13 density13 of13 grid13 points13 with13 column13 names13 equal13 to13 the13 name13 of13 each13 random13 parameter13 plus13 $prob13 for13 the13 associated13 probability13 of13 that13 point13

$popMean The13 Zinal13 cycle13 mean13 for13 each13 random13 parameter13 distribution

$popSD The13 Zinal13 cycle13 standard13 deviation13 for13 each13 random13 parameter13 distribution

$popCV The13 Zinal13 cycle13 coefZicient13 of13 variation13 for13 each13 random13 parameter13 distribution

$popVar The13 Zinal13 cycle13 variance13 for13 each13 random13 parameter13 distribution

$popCov The13 Zinal13 cycle13 covariance13 matrix13 for13 each13 random13 parameter13 distribution

$popCor The13 Zinal13 cycle13 correlation13 matrix13 for13 each13 random13 parameter13 distribution

$popMedian The13 Zinal13 cycle13 median13 for13 each13 random13 parameter13 distribution

$gridpts (NPAG13 only)13 The13 initial13 number13 of13 support13 points

$ab Matrix13 of13 boundaries13 for13 random13 parameter13 values13 13 For13 NPAG13 this13 is13 speciZied13 by13 the13 user13 prior13 to13 the13 run13 for13 IT2B13 it13 is13 calculated13 as13 a13 user13 speciZied13 multiple13 of13 the13 SD13 for13 the13 parameter13 value13 distribution

Userrsquos13 Guide13 13 2013 13

Objects Variables Comments

cycle13 (class13 PMcycle13 list) $names Vector13 of13 names13 of13 the13 random13 parameters

$ll Matrix13 of13 cycle13 number13 and13 -shy‐2Log-shy‐likelihood13 at13 each13 cycle

$gamlam A13 matrix13 of13 cycle13 number13 and13 gamma13 or13 lambda13 at13 each13 cycle13 (see13 item13 1613 under13 NPAG13 Runs13 below13 for13 a13 discussion13 of13 gamma13 and13 lambda)

$mean A13 matrix13 of13 cycle13 number13 and13 the13 mean13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 mean

$sd A13 matrix13 of13 cycle13 number13 and13 the13 standard13 deviation13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$median A13 matrix13 of13 cycle13 number13 and13 the13 median13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$aic A13 matrix13 of13 cycle13 number13 and13 Akaike13 Information13 Criterion13 at13 each13 cycle

$bic A13 matrix13 of13 cycle13 number13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle

cov13 (class13 PMcov13 dataframe)

$id Subject13 identiZication

$time Time13 for13 each13 covariate13 entry

covariates Covariate13 values13 for13 each13 subject13 at13 each13 time13 extracted13 from13 the13 raw13 data13 Zile

parameters Mean13 median13 or13 mode13 of13 Bayesian13 posterior13 distribution13 for13 each13 random13 parameter13 in13 the13 model13 13 Mode13 summaries13 are13 available13 for13 NPAG13 output13 only13 and13 the13 default13 is13 median13 13 Values13 are13 recycled13 for13 each13 row13 within13 a13 given13 subject13 with13 the13 number13 of13 rows13 driven13 by13 the13 number13 of13 covariate13 entries

Userrsquos13 Guide13 13 2113 13

Objects Variables Comments

pop13 (class13 PMpop13 dataframe)

post13 (class13 PMpost13 dataframe)

NPAG13 only

$id Subject13 identiZication

$pred113 Population13 prior13 (PMpop)13 or13 Bayesian13 posterior13 (PMpost)13 predictions13 for13 each13 output13 equation13 based13 on13 mean13 median13 and13 mode13 as13 speciZied13 by13 the13 user13 and13 with13 frequency13 also13 speciZied13 by13 the13 user13 in13 the13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

$block Same13 as13 for13 PMop13 objects13 above

NPdata13 (class13 NPAG13 list)13 ITdata13 (class13 IT2B13 list

Raw13 data13 used13 to13 make13 the13 above13 objects13 13 Please13 use13 NPparse13 or13 ITparse13 in13 R13 for13 discussion13 of13 the13 data13 contained13 in13 these13 objects

Since13 R13 is13 an13 object13 oriented13 language13 to13 access13 the13 observations13 in13 a13 PMop13 object13 for13 example13 use13 the13 following13 syntax13 op$post1$obsNote13 that13 you13 will13 place13 an13 integer13 within13 the13 parentheses13 of13 the13 loading13 functions13 eg13 NPload(1)13 which13 will13 sufZix13 all13 the13 above13 objects13 with13 that13 integer13 eg13 op113 Zinal113 NPdata113 13 This13 allows13 several13 models13 to13 be13 loaded13 into13 R13 simultaneously13 each13 with13 a13 unique13 sufZix13 and13 which13 can13 be13 compared13 with13 the13 PMcompare()13 command13 (see13 Model13 Diagnostics13 below)

Making New Pmetrics ObjectsOnce13 you13 have13 loaded13 the13 raw13 (NPdata13 or13 ITdata)13 or13 processed13 (op13 Uinal13 cycle13 pop13 post)13 data13 objects13 described13 above13 with13 NPload(run_num)13 or13 ITload(run_num)13 should13 you13 wish13 to13 remake13 the13 processed13 objects13 with13 parameters13 other13 than13 the13 defaults13 you13 can13 easily13 do13 so13 with13 the13 make 13 family13 of13 commands13 13 For13 example13 the13 default13 for13 PMop13 observed13 vs13 predicted13 objects13 is13 to13 use13 the13 prediction13 based13 on13 the13 median13 of13 the13 population13 or13 posterior13 distribution13 13 If13 you13 wish13 to13 use13 the13 mean13 of13 the13 distribution13 remake13 the13 PMop13 object13 using makeOP()13 13 If13 you13 wish13 to13 see13 all13 the13 cycle13 information13 in13 a13 PMcycle13 object13 not13 omitting13 the13 Zirst13 1013 of13 cycles13 by13 default13 remake13 it13 using13 makeCycle()13 13

For13 all13 of13 the13 following13 commands13 the13 data13 input13 is13 either13 NPdata13 or13 ITdata13 with13 additional13 function13 arguments13 speciZic13 to13 each13 command13 13 Accessing13 the13 help13 for13 each13 function13 in13 R13 will13 provide13 further13 details13 on13 the13 arguments13 defaults13 and13 output13 of13 each13 command

Userrsquos13 Guide13 13 2213 13

Command Description R13 help

makeAUC Make13 a13 dataframe13 of13 class13 PMauc13 containing13 subject13 ID13 and13 AUC13 from13 a13 variety13 of13 inputs13 including13 objects13 of13 PMop13 PMsim13 or13 a13 suitable13 dataframe

makeAUC

makeCov Generate13 a13 dataframe13 of13 class13 PMcov13 with13 subject-shy‐speciZic13 covariates13 extracted13 from13 the13 data13 csv13 Zile13 This13 object13 can13 be13 plotted13 and13 used13 to13 test13 for13 covariates13 which13 are13 signiZicantly13 associated13 with13 model13 parameters13 13

makeCov

makeCycle Create13 a13 PMcycle13 object13 described13 in13 the13 previous13 section makeCycle

makeFinal Create13 a13 PMZinal13 object13 described13 in13 the13 previous13 section makeFinal

makeOP Create13 a13 PMop13 object13 described13 in13 the13 previous13 section makeOP

makeNCA Create13 a13 dataframe13 (class13 PMnca)13 with13 the13 output13 of13 a13 non-shy‐compartmental13 analysis13 using13 PMpost13 and13 NPAG13 data13 objects13 as13 input13 13 The13 PMnca13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull auc13 Area13 under13 the13 time-shy‐observation13 curve13 using13 the13

trapezoidal13 approximation13 from13 time13 013 until13 the13 second13 dose13 or13 if13 only13 one13 dose13 until13 the13 last13 observation

bull aumc13 Area13 under13 the13 Zirst13 moment13 curvebull k13 Slope13 by13 least-shy‐squares13 linear13 regression13 of13 the13 Zinal13

613 log-shy‐transformed13 observations13 vs13 timebull auclast13 Area13 under13 the13 curve13 from13 the13 time13 of13 the13

last13 observation13 to13 inZinity13 calculated13 as13 [Final13 obs]kbull aumclast13 Area13 under13 the13 Zirst13 moment13 curve13 from13

the13 time13 of13 the13 last13 observation13 to13 inZinitybull aucinf13 Area13 under13 the13 curve13 from13 time13 013 to13 inZinity13

caluculated13 as13 auc13 +13 auclastbull aumcinf13 Area13 under13 the13 Zirst13 moment13 curve13 from13

time13 013 to13 inZinitybull mrt13 Mean13 residence13 time13 calculated13 as13 1kbull cmax13 Maximum13 predicted13 concentration13 after13 the13

Zirst13 dosebull tmax13 Time13 to13 cmaxbull cl13 Clearance13 calculated13 as13 doseaucinfbull vdss13 Volume13 of13 distribution13 at13 steady13 state13

calculated13 as13 clmrtbull thalf13 Half13 life13 of13 elimination13 calculated13 as13 ln(2)kbull dose13 First13 dose13 amount13 for13 each13 subject

makeNCA

Userrsquos13 Guide13 13 2313 13

Command Description R13 help

makeErrorPoly This13 function13 plots13 Zirst13 second13 and13 third13 order13 polynomial13 functions13 Zitted13 to13 pairs13 of13 observations13 and13 associated13 standard13 deviations13 for13 a13 given13 output13 assay13 In13 this13 way13 the13 standard13 deviation13 associated13 with13 any13 observation13 may13 be13 calculated13 and13 used13 to13 appropriately13 weight13 that13 observation13 in13 the13 model13 building13 process13 Observations13 are13 weighted13 by13 the13 reciprocal13 of13 the13 variance13 or13 squared13 standard13 deviation13 13 Output13 of13 the13 function13 is13 a13 plot13 of13 the13 measured13 observations13 and13 Zitted13 polynomial13 curves13 and13 a13 list13 with13 the13 Zirst13 second13 and13 third13 order13 coefZicients

makeErrorPoly

makePTA This13 function13 performs13 a13 Probability13 of13 Target13 Attainment13 analysis13 for13 a13 set13 of13 simulated13 doses13 and13 time-shy‐concentration13 proZiles13 13 Targets13 (eg13 Minimum13 Inhibitory13 Concentrations)13 the13 type13 of13 target13 attainment13 (ie13 time13 above13 target13 Cmaxtarget13 13 AUCtarget13 Cmintarget13 or13 Cxtarget13 where13 x13 is13 any13 time13 point)13 and13 the13 success13 threshold13 (eg13 time13 gt13 0713 or13 Cmaxtarget13 gt13 10)13 can13 all13 be13 speciZied13 13 Output13 is13 a13 list13 (class13 PMpta)13 with13 two13 objectsbull Results13 a13 413 dimensional13 array13 with13 dimension13 size13 of13

[number13 of13 doses13 number13 of13 targets13 number13 of13 simulated13 proZiles13 1]13 which13 gives13 the13 target13 attainment13 (eg13 Cmaxtarget)13 for13 each13 dose13 target13 and13 proZile

bull Outcome13 For13 each13 dose13 and13 target13 a13 summary13 of13 the13 target13 attainment13 for13 all13 the13 proZiles13 including13 mean13 standard13 deviation13 and13 proportion13 above13 the13 success13 threshold

PMpta13 objects13 can13 be13 summarized13 with13 summary(x)13 and13 plotted13 with13 plot(x)13

makePTA

Userrsquos13 Guide13 13 2413 13

Command Description R13 help

makePopmakePost(NPAG13 only)

These13 functions13 create13 dataframes13 of13 class13 PMpop13 and13 PMpost13 respectively13 13 The13 PMpop13 or13 PMpost13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull time13 Times13 for13 predicted13 concentrations13 13 These13

times13 are13 not13 necessarily13 at13 observed13 times13 but13 at13 a13 frequency13 speciZied13 in13 the13 NPAG13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

bull pred113 Predictions13 for13 output13 113 13 For13 PMpop13 objects13 predictions13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 population13 prior13 distribution13 13 For13 PMpost13 objects13 they13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject

bull pred213 pred313 etc13 If13 additional13 outputs13 exist13 they13 will13 each13 be13 columns13 in13 the13 dataframe13 just13 as13 for13 pred113 13

makePopmakePost

NPAG RunsIn13 the13 past13 users13 had13 to13 run13 NPAG13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 NPrun()13 13 However13 if13 NPrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable

1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 NPAG13 creates13 a13 temporary13 instruction13 Zile13 in13 case13 something13 happens13 so13 that13 instructions13 entered13 to13 date13 can13

be13 recovered13 13 Accept13 the13 default13 by13 choosing13 113 13 You13 can13 save13 with13 a13 meaningful13 Zilename13 later13 13 If13 it13 already13 exists13 you13 will13 be13 asked13 if13 you13 wish13 to13 overwrite13 the13 Zile13 which13 is13 usually13 the13 thing13 to13 do

Userrsquos13 Guide13 13 2513 13

8 If13 you13 have13 previously13 run13 IT2B13 you13 can13 automatically13 import13 the13 suggested13 parameter13 ranges13 13 Choose13 113 to13 do13 this13 and13 013 to13 run13 NPAG13 without13 a13 previous13 IT2B13 run81 If13 you13 choose13 option13 113 you13 must13 specify13 the13 name13 of13 a13 FROMxxxx13 Zile13 typically13 FROM000113 that13 you13 can13

Zind13 in13 an13 output13 directory13 after13 a13 successful13 IT2B13 run13 13 Note13 that13 the13 program13 will13 then13 assume13 that13 you13 are13 using13 the13 same13 wrk13 Ziles13 that13 IT2B13 made13 from13 your13 data13 csv13 Zile13 13 It13 is13 strongly13 recommended13 to13 override13 this13 and13 specify13 a13 data13 csv13 Zile13 13 At13 this13 point13 you13 will13 jump13 to13 1013 below13 and13 continue13 on13 however13 your13 answers13 will13 often13 be13 supplied13 by13 the13 instructions13 contained13 in13 the13 FROMxxxx13 Zile13 and13 you13 need13 merely13 conZirm13 them

9 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13 have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 NPrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis91 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13

for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

10 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 NPAG13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

11 Enter13 the13 name13 of13 your13 csv13 Zile13 now12 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile13 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset131 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects132 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry14 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset15 Enter13 the13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo 13 followed13 by13

return16 Select13 how13 you13 would13 like13 to13 model13 assay13 (observation)13 error13 for13 each13 output13 equation13 13 You13 have13 four13 choices13 13

In13 all13 four13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0161 Error13 model13 113 (SD)13 13 Choose13 this13 option13 if13 you13 have13 already13 run13 IT2B13 and13 multiplied13 your13 assay13 error13

polynomial13 by13 gamma13 (see13 next13 option13 for13 a13 description13 of13 gamma)162 Error13 model13 213 (SD13 13 gamma)13 13 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13

observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 If13 you13 choose13 this13 option13 you13 then13 can13 specify13 the13 starting13 value13 of13 gamma13 13 Good13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality

163 Error13 model13 313 (SD213 +13 lamda2)0513 13 Lamda13 is13 an13 alternative13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present

Userrsquos13 Guide13 13 2613 13

164 Error13 model13 413 SD13 =13 gamma13 13 This13 model13 is13 rarely13 used13 and13 is13 equivalent13 to13 specifying13 a13 model13 with13 C013 only13 ie13 a13 constant13 error13 regardless13 of13 concentration

17 Once13 you13 select13 the13 assay13 error13 model13 for13 each13 output13 equation13 you13 are13 then13 offered13 four13 more13 options13 on13 which13 assay13 error13 polynomial13 coefZicients13 to13 use13 13 Choices13 113 and13 213 are13 the13 most13 commonly13 used171 Choice13 113 The13 default13 13 Use13 coefZicients13 in13 the13 subject13 record13 (C013 C113 C213 C313 in13 the13 data13 csv13 Zile)13 and13 if13

missing13 use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 (item13 1813 below)172 Choice13 213 Use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 for13 all13 subjects13 regardless13 of13 what13 is13 in13 the13

data13 csv13 Zile173 Choice13 313 13 To13 multiply13 data13 csv13 values13 and13 default13 entered13 values13 by13 a13 Zixed13 gamma13 and13 use13 them13 13 174 Choice13 013 Specify13 coefZicients13 on13 a13 subject13 by13 subject13 basis13 either13 those13 in13 the13 data13 csv13 Zile13 already13 the13

default13 values13 entered13 into13 the13 program13 or13 other13 values18 For13 each13 output13 equation13 after13 you13 have13 selected13 the13 option13 in13 item13 1713 you13 will13 be13 prompted13 to13 supply13 the13

required13 information13 including13 the13 general13 default13 values13 for13 missing13 or13 overridden13 values13 in13 the13 data13 csv13 Zile19 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13

usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13

20 Enter13 the13 grid13 point13 index13 13 This13 number13 corresponds13 to13 the13 number13 of13 grid13 (support)13 points13 which13 will13 initially13 Zill13 the13 model13 parameter13 space13 13 The13 larger13 the13 number13 of13 random13 parameters13 to13 be13 estimated13 the13 more13 points13 are13 required13 13 The13 program13 will13 make13 a13 suggestion13 based13 on13 the13 number13 of13 random13 parameters13 in13 the13 model13 13 The13 more13 you13 choose13 the13 slower13 the13 run13 will13 be13 but13 results13 may13 improve13 13 It13 is13 reasonable13 to13 choose13 fewer13 points13 early13 in13 model13 exploration13 and13 increase13 in13 later13 phases13 or13 if13 poor13 model13 Zits13 or13 lack13 of13 convergence13 are13 noted13 The13 choices13 are13 113 to13 713 corresponding13 respectively13 to13 212913 500313 1000713 2001113 4000913 and13 8002113 points13 13 If13 you13 choose13 713 you13 then13 have13 an13 additional13 choice13 to13 select13 one13 or13 more13 multiples13 of13 8002113 points

21 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 013 or13 greater13 13 If13 you13 enter13 an13 integer13 greater13 than13 013 the13 engine13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13 If13 you13 enter13 013 this13 is13 the13 way13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 an13 independent13 data13 set13 and13 a13 non-shy‐uniform13 prior13 must13 be13 speciZied13 (see13 3013 below)13 13 This13 means13 that13 the13 engine13 will13 only13 calculate13 the13 individual13 Bayesian13 posteriors13 for13 the13 new13 subjects13 using13 the13 population13 joint13 density13 from13 a13 previous13 run13 as13 a13 Bayesian13 prior

22 Information13 about13 convergence13 criteria13 13 Answer13 113 or13 some13 other13 keystroke13 plus13 Return13 to13 acknowledge13 that13 you13 have13 read13 it

23 In13 order13 to13 predict13 concentrations13 from13 a13 non-shy‐parametric13 distribution13 you13 have13 the13 option13 to13 use13 the13 1)13 mean13 2)13 median13 or13 3)13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject13 13 We13 typically13 use13 the13 median13 Zirst13 and13 then13 the13 mean13 in13 a13 separate13 run13 and13 compare13 the13 differences13 13

24 Select13 the13 time13 interval13 to13 generate13 predicted13 concentrations13 13 Additionally13 there13 will13 also13 be13 predictions13 made13 at13 the13 time13 of13 each13 observation13 13 In13 general13 for13 most13 models13 predictions13 every13 1213 minutes13 provide13 sufZicient13 granularity13 13 Smaller13 values13 can13 result13 in13 very13 large13 Ziles13 for13 big13 populations

25 Select13 the13 default13 MIC13 to13 be13 used13 for13 AUCMIC13 ratio13 reporting13 13 This13 should13 generally13 be13 set13 to13 the13 default13 of13 113 by13 choosing13 113 13 You13 can13 always13 extract13 the13 AUC13 later13 and13 divide13 it13 by13 any13 MIC13 you13 choose

26 Enter13 the13 value13 in13 hours13 that13 you13 want13 for13 calculations13 of13 AUCs13 from13 predicted13 concentration13 proZiles13 13 The13 default13 is13 2413 hours13 which13 you13 can13 accept13 by13 entering13 113 or13 013 if13 you13 want13 to13 specify13 a13 different13 interval

27 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

28 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

Userrsquos13 Guide13 13 2713 13

29 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

30 For13 the13 prior13 density13 choose13 113 if13 it13 is13 to13 be13 uniform13 13 This13 means13 that13 the13 initial13 grid13 points13 will13 be13 evenly13 distributed13 with13 equal13 probability13 within13 the13 boundaries13 speciZied13 (in13 1513 above)13 13 If13 you13 choose13 013 you13 will13 be13 prompted13 for13 the13 name13 of13 a13 Zile13 that13 contains13 the13 prior13 density13 13 This13 will13 be13 DEN000113 unless13 you13 have13 changed13 its13 name13 13 It13 will13 be13 found13 in13 the13 output13 directory13 of13 a13 prior13 NPAG13 run13 13 The13 model13 used13 to13 generate13 the13 DEN000113 Zile13 must13 be13 exactly13 the13 same13 as13 the13 current13 model13 including13 parameter13 boundaries13 13 However13 this13 option13 is13 useful13 to13 specify13 a13 non-shy‐uniform13 density13 for13 two13 reasons13 13 The13 Zirst13 is13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 a13 new13 set13 of13 subjects13 13 Do13 this13 in13 combination13 with13 setting13 the13 number13 of13 cycles13 to13 013 (see13 2113 above)13 13 The13 second13 use13 for13 a13 non-shy‐uniform13 prior13 is13 to13 continue13 a13 previous13 run13 13 For13 example13 if13 you13 only13 set13 the13 number13 of13 cycles13 to13 5013 to13 get13 a13 rough13 idea13 of13 model13 Zit13 you13 may13 continue13 where13 you13 left13 off13 by13 specifying13 the13 DEN000113 Zile13 from13 the13 50-shy‐cycle13 run13 and13 continuing13 with13 as13 many13 additional13 cycles13 as13 you13 specify13 in13 item13 2113 13 So13 in13 the13 example13 if13 you13 specify13 10013 cycles13 in13 2113 the13 total13 number13 of13 cycles13 will13 be13 5013 +13 10013 =13 150

31 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 NPrun(instr=ldquoyourfilerdquo)13 option13 and13 including13 ldquoyourZilerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

32 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 NPAG13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 NPAG13 analysis

33 The13 NPAG13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

IT2B RunsIn13 the13 past13 users13 had13 to13 run13 IT2B13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 ITrun()13 13 However13 if13 ITrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13

have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 ITrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis

Userrsquos13 Guide13 13 2813 13

71 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13 for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

8 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 IT2B13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

9 Enter13 the13 name13 of13 your13 csv13 Zile13 now10 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile11 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset111 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects112 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry12 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset13 Enter13 the13 initial13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo13 followed13

by13 return14 The13 estimated13 mean13 for13 each13 parameter13 value13 distribution13 during13 the13 Zirst13 iteration13 will13 be13 the13 median13 of13 the13

range13 speciZied13 in13 1313 13 You13 now13 have13 the13 option13 to13 specify13 the13 standard13 deviation13 for13 the13 parameter13 value13 distribution13 which13 by13 default13 is13 half13 of13 the13 range13 in13 1313 13 Choose13 113 to13 accept13 this13 (the13 usual13 answer)13 or13 013 to13 change13 it13 to13 something13 else13 expressed13 as13 a13 multiple13 of13 the13 range

15 In13 IT2B13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 You13 can13 now13 choose13 113 if13 every13 subject13 has13 the13 same13 coefZicients13 or13 013 to13 use13 a13 unique13 set13 of13 coefZicients13 for13 each13 subject13 13 The13 Zirst13 case13 is13 the13 more13 usual13 when13 all13 13 samples13 from13 all13 subjects13 are13 analyzed13 in13 the13 same13 lab13 13 If13 13 samples13 are13 analyzed13 in13 different13 labs13 and13 you13 have13 the13 assay13 data13 from13 each13 lab13 then13 you13 would13 enter13 013 13 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 (see13 151313 below)13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0151 If13 you13 choose13 113 (one13 set13 of13 coefZicients13 for13 all13 subjects)13 you13 will13 then13 be13 presented13 with13 313 additional13

choices1511 Choice13 113 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13 observation13

including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 and13 to13 Zix13 gamma13 to13 1

1512 Choice13 213 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 but13 to13 estimate13 gamma13 based13 on13 the13 data13 13 This13 is13 the13 usual13 option

1513 Choice13 313 Choose13 this13 option13 if13 you13 wish13 to13 estimate13 the13 assay13 error13 coefZicients13 based13 on13 your13 data13 for13 use13 in13 future13 runs13 13 Although13 you13 can13 access13 this13 option13 by13 using13 either13 ITrun()13 or13 ERRrun()13 in13 R13 the13 instruction13 Ziles13 that13 you13 save13 and13 the13 generated13 output13 Ziles13 will13 be13 different13 13 Therefore13 we13 recommend13 that13 if13 you13 intend13 to13 choose13 this13 option13 use13 ERRrun()13 in13 R13 which13 will13 generate13 an13 ASS000113 Zile13 that13 contains13 the13 estimates13 for13 C013 C113 C213 and13 C313 13 You13 can13 then13 include13 this13 Zile13 in13 the13 working13 directory13 (along13 with13 a13 model13 txt13 Zile13 and13 a13 data13 csv13 Zile)13 to13 do13 an13 IT2B13 run13 supplying13 the13 Zile13 name13 in13 16113 below

Userrsquos13 Guide13 13 2913 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

Objects Variables Comments

cycle13 (class13 PMcycle13 list) $names Vector13 of13 names13 of13 the13 random13 parameters

$ll Matrix13 of13 cycle13 number13 and13 -shy‐2Log-shy‐likelihood13 at13 each13 cycle

$gamlam A13 matrix13 of13 cycle13 number13 and13 gamma13 or13 lambda13 at13 each13 cycle13 (see13 item13 1613 under13 NPAG13 Runs13 below13 for13 a13 discussion13 of13 gamma13 and13 lambda)

$mean A13 matrix13 of13 cycle13 number13 and13 the13 mean13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 mean

$sd A13 matrix13 of13 cycle13 number13 and13 the13 standard13 deviation13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$median A13 matrix13 of13 cycle13 number13 and13 the13 median13 of13 each13 random13 parameter13 at13 each13 cycle13 normalized13 to13 initial13 standard13 deviation

$aic A13 matrix13 of13 cycle13 number13 and13 Akaike13 Information13 Criterion13 at13 each13 cycle

$bic A13 matrix13 of13 cycle13 number13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle

cov13 (class13 PMcov13 dataframe)

$id Subject13 identiZication

$time Time13 for13 each13 covariate13 entry

covariates Covariate13 values13 for13 each13 subject13 at13 each13 time13 extracted13 from13 the13 raw13 data13 Zile

parameters Mean13 median13 or13 mode13 of13 Bayesian13 posterior13 distribution13 for13 each13 random13 parameter13 in13 the13 model13 13 Mode13 summaries13 are13 available13 for13 NPAG13 output13 only13 and13 the13 default13 is13 median13 13 Values13 are13 recycled13 for13 each13 row13 within13 a13 given13 subject13 with13 the13 number13 of13 rows13 driven13 by13 the13 number13 of13 covariate13 entries

Userrsquos13 Guide13 13 2113 13

Objects Variables Comments

pop13 (class13 PMpop13 dataframe)

post13 (class13 PMpost13 dataframe)

NPAG13 only

$id Subject13 identiZication

$pred113 Population13 prior13 (PMpop)13 or13 Bayesian13 posterior13 (PMpost)13 predictions13 for13 each13 output13 equation13 based13 on13 mean13 median13 and13 mode13 as13 speciZied13 by13 the13 user13 and13 with13 frequency13 also13 speciZied13 by13 the13 user13 in13 the13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

$block Same13 as13 for13 PMop13 objects13 above

NPdata13 (class13 NPAG13 list)13 ITdata13 (class13 IT2B13 list

Raw13 data13 used13 to13 make13 the13 above13 objects13 13 Please13 use13 NPparse13 or13 ITparse13 in13 R13 for13 discussion13 of13 the13 data13 contained13 in13 these13 objects

Since13 R13 is13 an13 object13 oriented13 language13 to13 access13 the13 observations13 in13 a13 PMop13 object13 for13 example13 use13 the13 following13 syntax13 op$post1$obsNote13 that13 you13 will13 place13 an13 integer13 within13 the13 parentheses13 of13 the13 loading13 functions13 eg13 NPload(1)13 which13 will13 sufZix13 all13 the13 above13 objects13 with13 that13 integer13 eg13 op113 Zinal113 NPdata113 13 This13 allows13 several13 models13 to13 be13 loaded13 into13 R13 simultaneously13 each13 with13 a13 unique13 sufZix13 and13 which13 can13 be13 compared13 with13 the13 PMcompare()13 command13 (see13 Model13 Diagnostics13 below)

Making New Pmetrics ObjectsOnce13 you13 have13 loaded13 the13 raw13 (NPdata13 or13 ITdata)13 or13 processed13 (op13 Uinal13 cycle13 pop13 post)13 data13 objects13 described13 above13 with13 NPload(run_num)13 or13 ITload(run_num)13 should13 you13 wish13 to13 remake13 the13 processed13 objects13 with13 parameters13 other13 than13 the13 defaults13 you13 can13 easily13 do13 so13 with13 the13 make 13 family13 of13 commands13 13 For13 example13 the13 default13 for13 PMop13 observed13 vs13 predicted13 objects13 is13 to13 use13 the13 prediction13 based13 on13 the13 median13 of13 the13 population13 or13 posterior13 distribution13 13 If13 you13 wish13 to13 use13 the13 mean13 of13 the13 distribution13 remake13 the13 PMop13 object13 using makeOP()13 13 If13 you13 wish13 to13 see13 all13 the13 cycle13 information13 in13 a13 PMcycle13 object13 not13 omitting13 the13 Zirst13 1013 of13 cycles13 by13 default13 remake13 it13 using13 makeCycle()13 13

For13 all13 of13 the13 following13 commands13 the13 data13 input13 is13 either13 NPdata13 or13 ITdata13 with13 additional13 function13 arguments13 speciZic13 to13 each13 command13 13 Accessing13 the13 help13 for13 each13 function13 in13 R13 will13 provide13 further13 details13 on13 the13 arguments13 defaults13 and13 output13 of13 each13 command

Userrsquos13 Guide13 13 2213 13

Command Description R13 help

makeAUC Make13 a13 dataframe13 of13 class13 PMauc13 containing13 subject13 ID13 and13 AUC13 from13 a13 variety13 of13 inputs13 including13 objects13 of13 PMop13 PMsim13 or13 a13 suitable13 dataframe

makeAUC

makeCov Generate13 a13 dataframe13 of13 class13 PMcov13 with13 subject-shy‐speciZic13 covariates13 extracted13 from13 the13 data13 csv13 Zile13 This13 object13 can13 be13 plotted13 and13 used13 to13 test13 for13 covariates13 which13 are13 signiZicantly13 associated13 with13 model13 parameters13 13

makeCov

makeCycle Create13 a13 PMcycle13 object13 described13 in13 the13 previous13 section makeCycle

makeFinal Create13 a13 PMZinal13 object13 described13 in13 the13 previous13 section makeFinal

makeOP Create13 a13 PMop13 object13 described13 in13 the13 previous13 section makeOP

makeNCA Create13 a13 dataframe13 (class13 PMnca)13 with13 the13 output13 of13 a13 non-shy‐compartmental13 analysis13 using13 PMpost13 and13 NPAG13 data13 objects13 as13 input13 13 The13 PMnca13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull auc13 Area13 under13 the13 time-shy‐observation13 curve13 using13 the13

trapezoidal13 approximation13 from13 time13 013 until13 the13 second13 dose13 or13 if13 only13 one13 dose13 until13 the13 last13 observation

bull aumc13 Area13 under13 the13 Zirst13 moment13 curvebull k13 Slope13 by13 least-shy‐squares13 linear13 regression13 of13 the13 Zinal13

613 log-shy‐transformed13 observations13 vs13 timebull auclast13 Area13 under13 the13 curve13 from13 the13 time13 of13 the13

last13 observation13 to13 inZinity13 calculated13 as13 [Final13 obs]kbull aumclast13 Area13 under13 the13 Zirst13 moment13 curve13 from13

the13 time13 of13 the13 last13 observation13 to13 inZinitybull aucinf13 Area13 under13 the13 curve13 from13 time13 013 to13 inZinity13

caluculated13 as13 auc13 +13 auclastbull aumcinf13 Area13 under13 the13 Zirst13 moment13 curve13 from13

time13 013 to13 inZinitybull mrt13 Mean13 residence13 time13 calculated13 as13 1kbull cmax13 Maximum13 predicted13 concentration13 after13 the13

Zirst13 dosebull tmax13 Time13 to13 cmaxbull cl13 Clearance13 calculated13 as13 doseaucinfbull vdss13 Volume13 of13 distribution13 at13 steady13 state13

calculated13 as13 clmrtbull thalf13 Half13 life13 of13 elimination13 calculated13 as13 ln(2)kbull dose13 First13 dose13 amount13 for13 each13 subject

makeNCA

Userrsquos13 Guide13 13 2313 13

Command Description R13 help

makeErrorPoly This13 function13 plots13 Zirst13 second13 and13 third13 order13 polynomial13 functions13 Zitted13 to13 pairs13 of13 observations13 and13 associated13 standard13 deviations13 for13 a13 given13 output13 assay13 In13 this13 way13 the13 standard13 deviation13 associated13 with13 any13 observation13 may13 be13 calculated13 and13 used13 to13 appropriately13 weight13 that13 observation13 in13 the13 model13 building13 process13 Observations13 are13 weighted13 by13 the13 reciprocal13 of13 the13 variance13 or13 squared13 standard13 deviation13 13 Output13 of13 the13 function13 is13 a13 plot13 of13 the13 measured13 observations13 and13 Zitted13 polynomial13 curves13 and13 a13 list13 with13 the13 Zirst13 second13 and13 third13 order13 coefZicients

makeErrorPoly

makePTA This13 function13 performs13 a13 Probability13 of13 Target13 Attainment13 analysis13 for13 a13 set13 of13 simulated13 doses13 and13 time-shy‐concentration13 proZiles13 13 Targets13 (eg13 Minimum13 Inhibitory13 Concentrations)13 the13 type13 of13 target13 attainment13 (ie13 time13 above13 target13 Cmaxtarget13 13 AUCtarget13 Cmintarget13 or13 Cxtarget13 where13 x13 is13 any13 time13 point)13 and13 the13 success13 threshold13 (eg13 time13 gt13 0713 or13 Cmaxtarget13 gt13 10)13 can13 all13 be13 speciZied13 13 Output13 is13 a13 list13 (class13 PMpta)13 with13 two13 objectsbull Results13 a13 413 dimensional13 array13 with13 dimension13 size13 of13

[number13 of13 doses13 number13 of13 targets13 number13 of13 simulated13 proZiles13 1]13 which13 gives13 the13 target13 attainment13 (eg13 Cmaxtarget)13 for13 each13 dose13 target13 and13 proZile

bull Outcome13 For13 each13 dose13 and13 target13 a13 summary13 of13 the13 target13 attainment13 for13 all13 the13 proZiles13 including13 mean13 standard13 deviation13 and13 proportion13 above13 the13 success13 threshold

PMpta13 objects13 can13 be13 summarized13 with13 summary(x)13 and13 plotted13 with13 plot(x)13

makePTA

Userrsquos13 Guide13 13 2413 13

Command Description R13 help

makePopmakePost(NPAG13 only)

These13 functions13 create13 dataframes13 of13 class13 PMpop13 and13 PMpost13 respectively13 13 The13 PMpop13 or13 PMpost13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull time13 Times13 for13 predicted13 concentrations13 13 These13

times13 are13 not13 necessarily13 at13 observed13 times13 but13 at13 a13 frequency13 speciZied13 in13 the13 NPAG13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

bull pred113 Predictions13 for13 output13 113 13 For13 PMpop13 objects13 predictions13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 population13 prior13 distribution13 13 For13 PMpost13 objects13 they13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject

bull pred213 pred313 etc13 If13 additional13 outputs13 exist13 they13 will13 each13 be13 columns13 in13 the13 dataframe13 just13 as13 for13 pred113 13

makePopmakePost

NPAG RunsIn13 the13 past13 users13 had13 to13 run13 NPAG13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 NPrun()13 13 However13 if13 NPrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable

1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 NPAG13 creates13 a13 temporary13 instruction13 Zile13 in13 case13 something13 happens13 so13 that13 instructions13 entered13 to13 date13 can13

be13 recovered13 13 Accept13 the13 default13 by13 choosing13 113 13 You13 can13 save13 with13 a13 meaningful13 Zilename13 later13 13 If13 it13 already13 exists13 you13 will13 be13 asked13 if13 you13 wish13 to13 overwrite13 the13 Zile13 which13 is13 usually13 the13 thing13 to13 do

Userrsquos13 Guide13 13 2513 13

8 If13 you13 have13 previously13 run13 IT2B13 you13 can13 automatically13 import13 the13 suggested13 parameter13 ranges13 13 Choose13 113 to13 do13 this13 and13 013 to13 run13 NPAG13 without13 a13 previous13 IT2B13 run81 If13 you13 choose13 option13 113 you13 must13 specify13 the13 name13 of13 a13 FROMxxxx13 Zile13 typically13 FROM000113 that13 you13 can13

Zind13 in13 an13 output13 directory13 after13 a13 successful13 IT2B13 run13 13 Note13 that13 the13 program13 will13 then13 assume13 that13 you13 are13 using13 the13 same13 wrk13 Ziles13 that13 IT2B13 made13 from13 your13 data13 csv13 Zile13 13 It13 is13 strongly13 recommended13 to13 override13 this13 and13 specify13 a13 data13 csv13 Zile13 13 At13 this13 point13 you13 will13 jump13 to13 1013 below13 and13 continue13 on13 however13 your13 answers13 will13 often13 be13 supplied13 by13 the13 instructions13 contained13 in13 the13 FROMxxxx13 Zile13 and13 you13 need13 merely13 conZirm13 them

9 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13 have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 NPrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis91 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13

for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

10 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 NPAG13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

11 Enter13 the13 name13 of13 your13 csv13 Zile13 now12 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile13 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset131 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects132 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry14 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset15 Enter13 the13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo 13 followed13 by13

return16 Select13 how13 you13 would13 like13 to13 model13 assay13 (observation)13 error13 for13 each13 output13 equation13 13 You13 have13 four13 choices13 13

In13 all13 four13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0161 Error13 model13 113 (SD)13 13 Choose13 this13 option13 if13 you13 have13 already13 run13 IT2B13 and13 multiplied13 your13 assay13 error13

polynomial13 by13 gamma13 (see13 next13 option13 for13 a13 description13 of13 gamma)162 Error13 model13 213 (SD13 13 gamma)13 13 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13

observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 If13 you13 choose13 this13 option13 you13 then13 can13 specify13 the13 starting13 value13 of13 gamma13 13 Good13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality

163 Error13 model13 313 (SD213 +13 lamda2)0513 13 Lamda13 is13 an13 alternative13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present

Userrsquos13 Guide13 13 2613 13

164 Error13 model13 413 SD13 =13 gamma13 13 This13 model13 is13 rarely13 used13 and13 is13 equivalent13 to13 specifying13 a13 model13 with13 C013 only13 ie13 a13 constant13 error13 regardless13 of13 concentration

17 Once13 you13 select13 the13 assay13 error13 model13 for13 each13 output13 equation13 you13 are13 then13 offered13 four13 more13 options13 on13 which13 assay13 error13 polynomial13 coefZicients13 to13 use13 13 Choices13 113 and13 213 are13 the13 most13 commonly13 used171 Choice13 113 The13 default13 13 Use13 coefZicients13 in13 the13 subject13 record13 (C013 C113 C213 C313 in13 the13 data13 csv13 Zile)13 and13 if13

missing13 use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 (item13 1813 below)172 Choice13 213 Use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 for13 all13 subjects13 regardless13 of13 what13 is13 in13 the13

data13 csv13 Zile173 Choice13 313 13 To13 multiply13 data13 csv13 values13 and13 default13 entered13 values13 by13 a13 Zixed13 gamma13 and13 use13 them13 13 174 Choice13 013 Specify13 coefZicients13 on13 a13 subject13 by13 subject13 basis13 either13 those13 in13 the13 data13 csv13 Zile13 already13 the13

default13 values13 entered13 into13 the13 program13 or13 other13 values18 For13 each13 output13 equation13 after13 you13 have13 selected13 the13 option13 in13 item13 1713 you13 will13 be13 prompted13 to13 supply13 the13

required13 information13 including13 the13 general13 default13 values13 for13 missing13 or13 overridden13 values13 in13 the13 data13 csv13 Zile19 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13

usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13

20 Enter13 the13 grid13 point13 index13 13 This13 number13 corresponds13 to13 the13 number13 of13 grid13 (support)13 points13 which13 will13 initially13 Zill13 the13 model13 parameter13 space13 13 The13 larger13 the13 number13 of13 random13 parameters13 to13 be13 estimated13 the13 more13 points13 are13 required13 13 The13 program13 will13 make13 a13 suggestion13 based13 on13 the13 number13 of13 random13 parameters13 in13 the13 model13 13 The13 more13 you13 choose13 the13 slower13 the13 run13 will13 be13 but13 results13 may13 improve13 13 It13 is13 reasonable13 to13 choose13 fewer13 points13 early13 in13 model13 exploration13 and13 increase13 in13 later13 phases13 or13 if13 poor13 model13 Zits13 or13 lack13 of13 convergence13 are13 noted13 The13 choices13 are13 113 to13 713 corresponding13 respectively13 to13 212913 500313 1000713 2001113 4000913 and13 8002113 points13 13 If13 you13 choose13 713 you13 then13 have13 an13 additional13 choice13 to13 select13 one13 or13 more13 multiples13 of13 8002113 points

21 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 013 or13 greater13 13 If13 you13 enter13 an13 integer13 greater13 than13 013 the13 engine13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13 If13 you13 enter13 013 this13 is13 the13 way13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 an13 independent13 data13 set13 and13 a13 non-shy‐uniform13 prior13 must13 be13 speciZied13 (see13 3013 below)13 13 This13 means13 that13 the13 engine13 will13 only13 calculate13 the13 individual13 Bayesian13 posteriors13 for13 the13 new13 subjects13 using13 the13 population13 joint13 density13 from13 a13 previous13 run13 as13 a13 Bayesian13 prior

22 Information13 about13 convergence13 criteria13 13 Answer13 113 or13 some13 other13 keystroke13 plus13 Return13 to13 acknowledge13 that13 you13 have13 read13 it

23 In13 order13 to13 predict13 concentrations13 from13 a13 non-shy‐parametric13 distribution13 you13 have13 the13 option13 to13 use13 the13 1)13 mean13 2)13 median13 or13 3)13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject13 13 We13 typically13 use13 the13 median13 Zirst13 and13 then13 the13 mean13 in13 a13 separate13 run13 and13 compare13 the13 differences13 13

24 Select13 the13 time13 interval13 to13 generate13 predicted13 concentrations13 13 Additionally13 there13 will13 also13 be13 predictions13 made13 at13 the13 time13 of13 each13 observation13 13 In13 general13 for13 most13 models13 predictions13 every13 1213 minutes13 provide13 sufZicient13 granularity13 13 Smaller13 values13 can13 result13 in13 very13 large13 Ziles13 for13 big13 populations

25 Select13 the13 default13 MIC13 to13 be13 used13 for13 AUCMIC13 ratio13 reporting13 13 This13 should13 generally13 be13 set13 to13 the13 default13 of13 113 by13 choosing13 113 13 You13 can13 always13 extract13 the13 AUC13 later13 and13 divide13 it13 by13 any13 MIC13 you13 choose

26 Enter13 the13 value13 in13 hours13 that13 you13 want13 for13 calculations13 of13 AUCs13 from13 predicted13 concentration13 proZiles13 13 The13 default13 is13 2413 hours13 which13 you13 can13 accept13 by13 entering13 113 or13 013 if13 you13 want13 to13 specify13 a13 different13 interval

27 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

28 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

Userrsquos13 Guide13 13 2713 13

29 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

30 For13 the13 prior13 density13 choose13 113 if13 it13 is13 to13 be13 uniform13 13 This13 means13 that13 the13 initial13 grid13 points13 will13 be13 evenly13 distributed13 with13 equal13 probability13 within13 the13 boundaries13 speciZied13 (in13 1513 above)13 13 If13 you13 choose13 013 you13 will13 be13 prompted13 for13 the13 name13 of13 a13 Zile13 that13 contains13 the13 prior13 density13 13 This13 will13 be13 DEN000113 unless13 you13 have13 changed13 its13 name13 13 It13 will13 be13 found13 in13 the13 output13 directory13 of13 a13 prior13 NPAG13 run13 13 The13 model13 used13 to13 generate13 the13 DEN000113 Zile13 must13 be13 exactly13 the13 same13 as13 the13 current13 model13 including13 parameter13 boundaries13 13 However13 this13 option13 is13 useful13 to13 specify13 a13 non-shy‐uniform13 density13 for13 two13 reasons13 13 The13 Zirst13 is13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 a13 new13 set13 of13 subjects13 13 Do13 this13 in13 combination13 with13 setting13 the13 number13 of13 cycles13 to13 013 (see13 2113 above)13 13 The13 second13 use13 for13 a13 non-shy‐uniform13 prior13 is13 to13 continue13 a13 previous13 run13 13 For13 example13 if13 you13 only13 set13 the13 number13 of13 cycles13 to13 5013 to13 get13 a13 rough13 idea13 of13 model13 Zit13 you13 may13 continue13 where13 you13 left13 off13 by13 specifying13 the13 DEN000113 Zile13 from13 the13 50-shy‐cycle13 run13 and13 continuing13 with13 as13 many13 additional13 cycles13 as13 you13 specify13 in13 item13 2113 13 So13 in13 the13 example13 if13 you13 specify13 10013 cycles13 in13 2113 the13 total13 number13 of13 cycles13 will13 be13 5013 +13 10013 =13 150

31 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 NPrun(instr=ldquoyourfilerdquo)13 option13 and13 including13 ldquoyourZilerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

32 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 NPAG13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 NPAG13 analysis

33 The13 NPAG13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

IT2B RunsIn13 the13 past13 users13 had13 to13 run13 IT2B13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 ITrun()13 13 However13 if13 ITrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13

have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 ITrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis

Userrsquos13 Guide13 13 2813 13

71 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13 for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

8 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 IT2B13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

9 Enter13 the13 name13 of13 your13 csv13 Zile13 now10 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile11 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset111 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects112 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry12 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset13 Enter13 the13 initial13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo13 followed13

by13 return14 The13 estimated13 mean13 for13 each13 parameter13 value13 distribution13 during13 the13 Zirst13 iteration13 will13 be13 the13 median13 of13 the13

range13 speciZied13 in13 1313 13 You13 now13 have13 the13 option13 to13 specify13 the13 standard13 deviation13 for13 the13 parameter13 value13 distribution13 which13 by13 default13 is13 half13 of13 the13 range13 in13 1313 13 Choose13 113 to13 accept13 this13 (the13 usual13 answer)13 or13 013 to13 change13 it13 to13 something13 else13 expressed13 as13 a13 multiple13 of13 the13 range

15 In13 IT2B13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 You13 can13 now13 choose13 113 if13 every13 subject13 has13 the13 same13 coefZicients13 or13 013 to13 use13 a13 unique13 set13 of13 coefZicients13 for13 each13 subject13 13 The13 Zirst13 case13 is13 the13 more13 usual13 when13 all13 13 samples13 from13 all13 subjects13 are13 analyzed13 in13 the13 same13 lab13 13 If13 13 samples13 are13 analyzed13 in13 different13 labs13 and13 you13 have13 the13 assay13 data13 from13 each13 lab13 then13 you13 would13 enter13 013 13 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 (see13 151313 below)13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0151 If13 you13 choose13 113 (one13 set13 of13 coefZicients13 for13 all13 subjects)13 you13 will13 then13 be13 presented13 with13 313 additional13

choices1511 Choice13 113 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13 observation13

including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 and13 to13 Zix13 gamma13 to13 1

1512 Choice13 213 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 but13 to13 estimate13 gamma13 based13 on13 the13 data13 13 This13 is13 the13 usual13 option

1513 Choice13 313 Choose13 this13 option13 if13 you13 wish13 to13 estimate13 the13 assay13 error13 coefZicients13 based13 on13 your13 data13 for13 use13 in13 future13 runs13 13 Although13 you13 can13 access13 this13 option13 by13 using13 either13 ITrun()13 or13 ERRrun()13 in13 R13 the13 instruction13 Ziles13 that13 you13 save13 and13 the13 generated13 output13 Ziles13 will13 be13 different13 13 Therefore13 we13 recommend13 that13 if13 you13 intend13 to13 choose13 this13 option13 use13 ERRrun()13 in13 R13 which13 will13 generate13 an13 ASS000113 Zile13 that13 contains13 the13 estimates13 for13 C013 C113 C213 and13 C313 13 You13 can13 then13 include13 this13 Zile13 in13 the13 working13 directory13 (along13 with13 a13 model13 txt13 Zile13 and13 a13 data13 csv13 Zile)13 to13 do13 an13 IT2B13 run13 supplying13 the13 Zile13 name13 in13 16113 below

Userrsquos13 Guide13 13 2913 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

Objects Variables Comments

pop13 (class13 PMpop13 dataframe)

post13 (class13 PMpost13 dataframe)

NPAG13 only

$id Subject13 identiZication

$pred113 Population13 prior13 (PMpop)13 or13 Bayesian13 posterior13 (PMpost)13 predictions13 for13 each13 output13 equation13 based13 on13 mean13 median13 and13 mode13 as13 speciZied13 by13 the13 user13 and13 with13 frequency13 also13 speciZied13 by13 the13 user13 in13 the13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

$block Same13 as13 for13 PMop13 objects13 above

NPdata13 (class13 NPAG13 list)13 ITdata13 (class13 IT2B13 list

Raw13 data13 used13 to13 make13 the13 above13 objects13 13 Please13 use13 NPparse13 or13 ITparse13 in13 R13 for13 discussion13 of13 the13 data13 contained13 in13 these13 objects

Since13 R13 is13 an13 object13 oriented13 language13 to13 access13 the13 observations13 in13 a13 PMop13 object13 for13 example13 use13 the13 following13 syntax13 op$post1$obsNote13 that13 you13 will13 place13 an13 integer13 within13 the13 parentheses13 of13 the13 loading13 functions13 eg13 NPload(1)13 which13 will13 sufZix13 all13 the13 above13 objects13 with13 that13 integer13 eg13 op113 Zinal113 NPdata113 13 This13 allows13 several13 models13 to13 be13 loaded13 into13 R13 simultaneously13 each13 with13 a13 unique13 sufZix13 and13 which13 can13 be13 compared13 with13 the13 PMcompare()13 command13 (see13 Model13 Diagnostics13 below)

Making New Pmetrics ObjectsOnce13 you13 have13 loaded13 the13 raw13 (NPdata13 or13 ITdata)13 or13 processed13 (op13 Uinal13 cycle13 pop13 post)13 data13 objects13 described13 above13 with13 NPload(run_num)13 or13 ITload(run_num)13 should13 you13 wish13 to13 remake13 the13 processed13 objects13 with13 parameters13 other13 than13 the13 defaults13 you13 can13 easily13 do13 so13 with13 the13 make 13 family13 of13 commands13 13 For13 example13 the13 default13 for13 PMop13 observed13 vs13 predicted13 objects13 is13 to13 use13 the13 prediction13 based13 on13 the13 median13 of13 the13 population13 or13 posterior13 distribution13 13 If13 you13 wish13 to13 use13 the13 mean13 of13 the13 distribution13 remake13 the13 PMop13 object13 using makeOP()13 13 If13 you13 wish13 to13 see13 all13 the13 cycle13 information13 in13 a13 PMcycle13 object13 not13 omitting13 the13 Zirst13 1013 of13 cycles13 by13 default13 remake13 it13 using13 makeCycle()13 13

For13 all13 of13 the13 following13 commands13 the13 data13 input13 is13 either13 NPdata13 or13 ITdata13 with13 additional13 function13 arguments13 speciZic13 to13 each13 command13 13 Accessing13 the13 help13 for13 each13 function13 in13 R13 will13 provide13 further13 details13 on13 the13 arguments13 defaults13 and13 output13 of13 each13 command

Userrsquos13 Guide13 13 2213 13

Command Description R13 help

makeAUC Make13 a13 dataframe13 of13 class13 PMauc13 containing13 subject13 ID13 and13 AUC13 from13 a13 variety13 of13 inputs13 including13 objects13 of13 PMop13 PMsim13 or13 a13 suitable13 dataframe

makeAUC

makeCov Generate13 a13 dataframe13 of13 class13 PMcov13 with13 subject-shy‐speciZic13 covariates13 extracted13 from13 the13 data13 csv13 Zile13 This13 object13 can13 be13 plotted13 and13 used13 to13 test13 for13 covariates13 which13 are13 signiZicantly13 associated13 with13 model13 parameters13 13

makeCov

makeCycle Create13 a13 PMcycle13 object13 described13 in13 the13 previous13 section makeCycle

makeFinal Create13 a13 PMZinal13 object13 described13 in13 the13 previous13 section makeFinal

makeOP Create13 a13 PMop13 object13 described13 in13 the13 previous13 section makeOP

makeNCA Create13 a13 dataframe13 (class13 PMnca)13 with13 the13 output13 of13 a13 non-shy‐compartmental13 analysis13 using13 PMpost13 and13 NPAG13 data13 objects13 as13 input13 13 The13 PMnca13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull auc13 Area13 under13 the13 time-shy‐observation13 curve13 using13 the13

trapezoidal13 approximation13 from13 time13 013 until13 the13 second13 dose13 or13 if13 only13 one13 dose13 until13 the13 last13 observation

bull aumc13 Area13 under13 the13 Zirst13 moment13 curvebull k13 Slope13 by13 least-shy‐squares13 linear13 regression13 of13 the13 Zinal13

613 log-shy‐transformed13 observations13 vs13 timebull auclast13 Area13 under13 the13 curve13 from13 the13 time13 of13 the13

last13 observation13 to13 inZinity13 calculated13 as13 [Final13 obs]kbull aumclast13 Area13 under13 the13 Zirst13 moment13 curve13 from13

the13 time13 of13 the13 last13 observation13 to13 inZinitybull aucinf13 Area13 under13 the13 curve13 from13 time13 013 to13 inZinity13

caluculated13 as13 auc13 +13 auclastbull aumcinf13 Area13 under13 the13 Zirst13 moment13 curve13 from13

time13 013 to13 inZinitybull mrt13 Mean13 residence13 time13 calculated13 as13 1kbull cmax13 Maximum13 predicted13 concentration13 after13 the13

Zirst13 dosebull tmax13 Time13 to13 cmaxbull cl13 Clearance13 calculated13 as13 doseaucinfbull vdss13 Volume13 of13 distribution13 at13 steady13 state13

calculated13 as13 clmrtbull thalf13 Half13 life13 of13 elimination13 calculated13 as13 ln(2)kbull dose13 First13 dose13 amount13 for13 each13 subject

makeNCA

Userrsquos13 Guide13 13 2313 13

Command Description R13 help

makeErrorPoly This13 function13 plots13 Zirst13 second13 and13 third13 order13 polynomial13 functions13 Zitted13 to13 pairs13 of13 observations13 and13 associated13 standard13 deviations13 for13 a13 given13 output13 assay13 In13 this13 way13 the13 standard13 deviation13 associated13 with13 any13 observation13 may13 be13 calculated13 and13 used13 to13 appropriately13 weight13 that13 observation13 in13 the13 model13 building13 process13 Observations13 are13 weighted13 by13 the13 reciprocal13 of13 the13 variance13 or13 squared13 standard13 deviation13 13 Output13 of13 the13 function13 is13 a13 plot13 of13 the13 measured13 observations13 and13 Zitted13 polynomial13 curves13 and13 a13 list13 with13 the13 Zirst13 second13 and13 third13 order13 coefZicients

makeErrorPoly

makePTA This13 function13 performs13 a13 Probability13 of13 Target13 Attainment13 analysis13 for13 a13 set13 of13 simulated13 doses13 and13 time-shy‐concentration13 proZiles13 13 Targets13 (eg13 Minimum13 Inhibitory13 Concentrations)13 the13 type13 of13 target13 attainment13 (ie13 time13 above13 target13 Cmaxtarget13 13 AUCtarget13 Cmintarget13 or13 Cxtarget13 where13 x13 is13 any13 time13 point)13 and13 the13 success13 threshold13 (eg13 time13 gt13 0713 or13 Cmaxtarget13 gt13 10)13 can13 all13 be13 speciZied13 13 Output13 is13 a13 list13 (class13 PMpta)13 with13 two13 objectsbull Results13 a13 413 dimensional13 array13 with13 dimension13 size13 of13

[number13 of13 doses13 number13 of13 targets13 number13 of13 simulated13 proZiles13 1]13 which13 gives13 the13 target13 attainment13 (eg13 Cmaxtarget)13 for13 each13 dose13 target13 and13 proZile

bull Outcome13 For13 each13 dose13 and13 target13 a13 summary13 of13 the13 target13 attainment13 for13 all13 the13 proZiles13 including13 mean13 standard13 deviation13 and13 proportion13 above13 the13 success13 threshold

PMpta13 objects13 can13 be13 summarized13 with13 summary(x)13 and13 plotted13 with13 plot(x)13

makePTA

Userrsquos13 Guide13 13 2413 13

Command Description R13 help

makePopmakePost(NPAG13 only)

These13 functions13 create13 dataframes13 of13 class13 PMpop13 and13 PMpost13 respectively13 13 The13 PMpop13 or13 PMpost13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull time13 Times13 for13 predicted13 concentrations13 13 These13

times13 are13 not13 necessarily13 at13 observed13 times13 but13 at13 a13 frequency13 speciZied13 in13 the13 NPAG13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

bull pred113 Predictions13 for13 output13 113 13 For13 PMpop13 objects13 predictions13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 population13 prior13 distribution13 13 For13 PMpost13 objects13 they13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject

bull pred213 pred313 etc13 If13 additional13 outputs13 exist13 they13 will13 each13 be13 columns13 in13 the13 dataframe13 just13 as13 for13 pred113 13

makePopmakePost

NPAG RunsIn13 the13 past13 users13 had13 to13 run13 NPAG13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 NPrun()13 13 However13 if13 NPrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable

1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 NPAG13 creates13 a13 temporary13 instruction13 Zile13 in13 case13 something13 happens13 so13 that13 instructions13 entered13 to13 date13 can13

be13 recovered13 13 Accept13 the13 default13 by13 choosing13 113 13 You13 can13 save13 with13 a13 meaningful13 Zilename13 later13 13 If13 it13 already13 exists13 you13 will13 be13 asked13 if13 you13 wish13 to13 overwrite13 the13 Zile13 which13 is13 usually13 the13 thing13 to13 do

Userrsquos13 Guide13 13 2513 13

8 If13 you13 have13 previously13 run13 IT2B13 you13 can13 automatically13 import13 the13 suggested13 parameter13 ranges13 13 Choose13 113 to13 do13 this13 and13 013 to13 run13 NPAG13 without13 a13 previous13 IT2B13 run81 If13 you13 choose13 option13 113 you13 must13 specify13 the13 name13 of13 a13 FROMxxxx13 Zile13 typically13 FROM000113 that13 you13 can13

Zind13 in13 an13 output13 directory13 after13 a13 successful13 IT2B13 run13 13 Note13 that13 the13 program13 will13 then13 assume13 that13 you13 are13 using13 the13 same13 wrk13 Ziles13 that13 IT2B13 made13 from13 your13 data13 csv13 Zile13 13 It13 is13 strongly13 recommended13 to13 override13 this13 and13 specify13 a13 data13 csv13 Zile13 13 At13 this13 point13 you13 will13 jump13 to13 1013 below13 and13 continue13 on13 however13 your13 answers13 will13 often13 be13 supplied13 by13 the13 instructions13 contained13 in13 the13 FROMxxxx13 Zile13 and13 you13 need13 merely13 conZirm13 them

9 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13 have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 NPrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis91 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13

for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

10 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 NPAG13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

11 Enter13 the13 name13 of13 your13 csv13 Zile13 now12 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile13 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset131 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects132 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry14 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset15 Enter13 the13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo 13 followed13 by13

return16 Select13 how13 you13 would13 like13 to13 model13 assay13 (observation)13 error13 for13 each13 output13 equation13 13 You13 have13 four13 choices13 13

In13 all13 four13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0161 Error13 model13 113 (SD)13 13 Choose13 this13 option13 if13 you13 have13 already13 run13 IT2B13 and13 multiplied13 your13 assay13 error13

polynomial13 by13 gamma13 (see13 next13 option13 for13 a13 description13 of13 gamma)162 Error13 model13 213 (SD13 13 gamma)13 13 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13

observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 If13 you13 choose13 this13 option13 you13 then13 can13 specify13 the13 starting13 value13 of13 gamma13 13 Good13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality

163 Error13 model13 313 (SD213 +13 lamda2)0513 13 Lamda13 is13 an13 alternative13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present

Userrsquos13 Guide13 13 2613 13

164 Error13 model13 413 SD13 =13 gamma13 13 This13 model13 is13 rarely13 used13 and13 is13 equivalent13 to13 specifying13 a13 model13 with13 C013 only13 ie13 a13 constant13 error13 regardless13 of13 concentration

17 Once13 you13 select13 the13 assay13 error13 model13 for13 each13 output13 equation13 you13 are13 then13 offered13 four13 more13 options13 on13 which13 assay13 error13 polynomial13 coefZicients13 to13 use13 13 Choices13 113 and13 213 are13 the13 most13 commonly13 used171 Choice13 113 The13 default13 13 Use13 coefZicients13 in13 the13 subject13 record13 (C013 C113 C213 C313 in13 the13 data13 csv13 Zile)13 and13 if13

missing13 use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 (item13 1813 below)172 Choice13 213 Use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 for13 all13 subjects13 regardless13 of13 what13 is13 in13 the13

data13 csv13 Zile173 Choice13 313 13 To13 multiply13 data13 csv13 values13 and13 default13 entered13 values13 by13 a13 Zixed13 gamma13 and13 use13 them13 13 174 Choice13 013 Specify13 coefZicients13 on13 a13 subject13 by13 subject13 basis13 either13 those13 in13 the13 data13 csv13 Zile13 already13 the13

default13 values13 entered13 into13 the13 program13 or13 other13 values18 For13 each13 output13 equation13 after13 you13 have13 selected13 the13 option13 in13 item13 1713 you13 will13 be13 prompted13 to13 supply13 the13

required13 information13 including13 the13 general13 default13 values13 for13 missing13 or13 overridden13 values13 in13 the13 data13 csv13 Zile19 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13

usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13

20 Enter13 the13 grid13 point13 index13 13 This13 number13 corresponds13 to13 the13 number13 of13 grid13 (support)13 points13 which13 will13 initially13 Zill13 the13 model13 parameter13 space13 13 The13 larger13 the13 number13 of13 random13 parameters13 to13 be13 estimated13 the13 more13 points13 are13 required13 13 The13 program13 will13 make13 a13 suggestion13 based13 on13 the13 number13 of13 random13 parameters13 in13 the13 model13 13 The13 more13 you13 choose13 the13 slower13 the13 run13 will13 be13 but13 results13 may13 improve13 13 It13 is13 reasonable13 to13 choose13 fewer13 points13 early13 in13 model13 exploration13 and13 increase13 in13 later13 phases13 or13 if13 poor13 model13 Zits13 or13 lack13 of13 convergence13 are13 noted13 The13 choices13 are13 113 to13 713 corresponding13 respectively13 to13 212913 500313 1000713 2001113 4000913 and13 8002113 points13 13 If13 you13 choose13 713 you13 then13 have13 an13 additional13 choice13 to13 select13 one13 or13 more13 multiples13 of13 8002113 points

21 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 013 or13 greater13 13 If13 you13 enter13 an13 integer13 greater13 than13 013 the13 engine13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13 If13 you13 enter13 013 this13 is13 the13 way13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 an13 independent13 data13 set13 and13 a13 non-shy‐uniform13 prior13 must13 be13 speciZied13 (see13 3013 below)13 13 This13 means13 that13 the13 engine13 will13 only13 calculate13 the13 individual13 Bayesian13 posteriors13 for13 the13 new13 subjects13 using13 the13 population13 joint13 density13 from13 a13 previous13 run13 as13 a13 Bayesian13 prior

22 Information13 about13 convergence13 criteria13 13 Answer13 113 or13 some13 other13 keystroke13 plus13 Return13 to13 acknowledge13 that13 you13 have13 read13 it

23 In13 order13 to13 predict13 concentrations13 from13 a13 non-shy‐parametric13 distribution13 you13 have13 the13 option13 to13 use13 the13 1)13 mean13 2)13 median13 or13 3)13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject13 13 We13 typically13 use13 the13 median13 Zirst13 and13 then13 the13 mean13 in13 a13 separate13 run13 and13 compare13 the13 differences13 13

24 Select13 the13 time13 interval13 to13 generate13 predicted13 concentrations13 13 Additionally13 there13 will13 also13 be13 predictions13 made13 at13 the13 time13 of13 each13 observation13 13 In13 general13 for13 most13 models13 predictions13 every13 1213 minutes13 provide13 sufZicient13 granularity13 13 Smaller13 values13 can13 result13 in13 very13 large13 Ziles13 for13 big13 populations

25 Select13 the13 default13 MIC13 to13 be13 used13 for13 AUCMIC13 ratio13 reporting13 13 This13 should13 generally13 be13 set13 to13 the13 default13 of13 113 by13 choosing13 113 13 You13 can13 always13 extract13 the13 AUC13 later13 and13 divide13 it13 by13 any13 MIC13 you13 choose

26 Enter13 the13 value13 in13 hours13 that13 you13 want13 for13 calculations13 of13 AUCs13 from13 predicted13 concentration13 proZiles13 13 The13 default13 is13 2413 hours13 which13 you13 can13 accept13 by13 entering13 113 or13 013 if13 you13 want13 to13 specify13 a13 different13 interval

27 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

28 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

Userrsquos13 Guide13 13 2713 13

29 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

30 For13 the13 prior13 density13 choose13 113 if13 it13 is13 to13 be13 uniform13 13 This13 means13 that13 the13 initial13 grid13 points13 will13 be13 evenly13 distributed13 with13 equal13 probability13 within13 the13 boundaries13 speciZied13 (in13 1513 above)13 13 If13 you13 choose13 013 you13 will13 be13 prompted13 for13 the13 name13 of13 a13 Zile13 that13 contains13 the13 prior13 density13 13 This13 will13 be13 DEN000113 unless13 you13 have13 changed13 its13 name13 13 It13 will13 be13 found13 in13 the13 output13 directory13 of13 a13 prior13 NPAG13 run13 13 The13 model13 used13 to13 generate13 the13 DEN000113 Zile13 must13 be13 exactly13 the13 same13 as13 the13 current13 model13 including13 parameter13 boundaries13 13 However13 this13 option13 is13 useful13 to13 specify13 a13 non-shy‐uniform13 density13 for13 two13 reasons13 13 The13 Zirst13 is13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 a13 new13 set13 of13 subjects13 13 Do13 this13 in13 combination13 with13 setting13 the13 number13 of13 cycles13 to13 013 (see13 2113 above)13 13 The13 second13 use13 for13 a13 non-shy‐uniform13 prior13 is13 to13 continue13 a13 previous13 run13 13 For13 example13 if13 you13 only13 set13 the13 number13 of13 cycles13 to13 5013 to13 get13 a13 rough13 idea13 of13 model13 Zit13 you13 may13 continue13 where13 you13 left13 off13 by13 specifying13 the13 DEN000113 Zile13 from13 the13 50-shy‐cycle13 run13 and13 continuing13 with13 as13 many13 additional13 cycles13 as13 you13 specify13 in13 item13 2113 13 So13 in13 the13 example13 if13 you13 specify13 10013 cycles13 in13 2113 the13 total13 number13 of13 cycles13 will13 be13 5013 +13 10013 =13 150

31 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 NPrun(instr=ldquoyourfilerdquo)13 option13 and13 including13 ldquoyourZilerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

32 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 NPAG13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 NPAG13 analysis

33 The13 NPAG13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

IT2B RunsIn13 the13 past13 users13 had13 to13 run13 IT2B13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 ITrun()13 13 However13 if13 ITrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13

have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 ITrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis

Userrsquos13 Guide13 13 2813 13

71 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13 for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

8 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 IT2B13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

9 Enter13 the13 name13 of13 your13 csv13 Zile13 now10 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile11 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset111 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects112 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry12 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset13 Enter13 the13 initial13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo13 followed13

by13 return14 The13 estimated13 mean13 for13 each13 parameter13 value13 distribution13 during13 the13 Zirst13 iteration13 will13 be13 the13 median13 of13 the13

range13 speciZied13 in13 1313 13 You13 now13 have13 the13 option13 to13 specify13 the13 standard13 deviation13 for13 the13 parameter13 value13 distribution13 which13 by13 default13 is13 half13 of13 the13 range13 in13 1313 13 Choose13 113 to13 accept13 this13 (the13 usual13 answer)13 or13 013 to13 change13 it13 to13 something13 else13 expressed13 as13 a13 multiple13 of13 the13 range

15 In13 IT2B13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 You13 can13 now13 choose13 113 if13 every13 subject13 has13 the13 same13 coefZicients13 or13 013 to13 use13 a13 unique13 set13 of13 coefZicients13 for13 each13 subject13 13 The13 Zirst13 case13 is13 the13 more13 usual13 when13 all13 13 samples13 from13 all13 subjects13 are13 analyzed13 in13 the13 same13 lab13 13 If13 13 samples13 are13 analyzed13 in13 different13 labs13 and13 you13 have13 the13 assay13 data13 from13 each13 lab13 then13 you13 would13 enter13 013 13 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 (see13 151313 below)13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0151 If13 you13 choose13 113 (one13 set13 of13 coefZicients13 for13 all13 subjects)13 you13 will13 then13 be13 presented13 with13 313 additional13

choices1511 Choice13 113 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13 observation13

including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 and13 to13 Zix13 gamma13 to13 1

1512 Choice13 213 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 but13 to13 estimate13 gamma13 based13 on13 the13 data13 13 This13 is13 the13 usual13 option

1513 Choice13 313 Choose13 this13 option13 if13 you13 wish13 to13 estimate13 the13 assay13 error13 coefZicients13 based13 on13 your13 data13 for13 use13 in13 future13 runs13 13 Although13 you13 can13 access13 this13 option13 by13 using13 either13 ITrun()13 or13 ERRrun()13 in13 R13 the13 instruction13 Ziles13 that13 you13 save13 and13 the13 generated13 output13 Ziles13 will13 be13 different13 13 Therefore13 we13 recommend13 that13 if13 you13 intend13 to13 choose13 this13 option13 use13 ERRrun()13 in13 R13 which13 will13 generate13 an13 ASS000113 Zile13 that13 contains13 the13 estimates13 for13 C013 C113 C213 and13 C313 13 You13 can13 then13 include13 this13 Zile13 in13 the13 working13 directory13 (along13 with13 a13 model13 txt13 Zile13 and13 a13 data13 csv13 Zile)13 to13 do13 an13 IT2B13 run13 supplying13 the13 Zile13 name13 in13 16113 below

Userrsquos13 Guide13 13 2913 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

Command Description R13 help

makeAUC Make13 a13 dataframe13 of13 class13 PMauc13 containing13 subject13 ID13 and13 AUC13 from13 a13 variety13 of13 inputs13 including13 objects13 of13 PMop13 PMsim13 or13 a13 suitable13 dataframe

makeAUC

makeCov Generate13 a13 dataframe13 of13 class13 PMcov13 with13 subject-shy‐speciZic13 covariates13 extracted13 from13 the13 data13 csv13 Zile13 This13 object13 can13 be13 plotted13 and13 used13 to13 test13 for13 covariates13 which13 are13 signiZicantly13 associated13 with13 model13 parameters13 13

makeCov

makeCycle Create13 a13 PMcycle13 object13 described13 in13 the13 previous13 section makeCycle

makeFinal Create13 a13 PMZinal13 object13 described13 in13 the13 previous13 section makeFinal

makeOP Create13 a13 PMop13 object13 described13 in13 the13 previous13 section makeOP

makeNCA Create13 a13 dataframe13 (class13 PMnca)13 with13 the13 output13 of13 a13 non-shy‐compartmental13 analysis13 using13 PMpost13 and13 NPAG13 data13 objects13 as13 input13 13 The13 PMnca13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull auc13 Area13 under13 the13 time-shy‐observation13 curve13 using13 the13

trapezoidal13 approximation13 from13 time13 013 until13 the13 second13 dose13 or13 if13 only13 one13 dose13 until13 the13 last13 observation

bull aumc13 Area13 under13 the13 Zirst13 moment13 curvebull k13 Slope13 by13 least-shy‐squares13 linear13 regression13 of13 the13 Zinal13

613 log-shy‐transformed13 observations13 vs13 timebull auclast13 Area13 under13 the13 curve13 from13 the13 time13 of13 the13

last13 observation13 to13 inZinity13 calculated13 as13 [Final13 obs]kbull aumclast13 Area13 under13 the13 Zirst13 moment13 curve13 from13

the13 time13 of13 the13 last13 observation13 to13 inZinitybull aucinf13 Area13 under13 the13 curve13 from13 time13 013 to13 inZinity13

caluculated13 as13 auc13 +13 auclastbull aumcinf13 Area13 under13 the13 Zirst13 moment13 curve13 from13

time13 013 to13 inZinitybull mrt13 Mean13 residence13 time13 calculated13 as13 1kbull cmax13 Maximum13 predicted13 concentration13 after13 the13

Zirst13 dosebull tmax13 Time13 to13 cmaxbull cl13 Clearance13 calculated13 as13 doseaucinfbull vdss13 Volume13 of13 distribution13 at13 steady13 state13

calculated13 as13 clmrtbull thalf13 Half13 life13 of13 elimination13 calculated13 as13 ln(2)kbull dose13 First13 dose13 amount13 for13 each13 subject

makeNCA

Userrsquos13 Guide13 13 2313 13

Command Description R13 help

makeErrorPoly This13 function13 plots13 Zirst13 second13 and13 third13 order13 polynomial13 functions13 Zitted13 to13 pairs13 of13 observations13 and13 associated13 standard13 deviations13 for13 a13 given13 output13 assay13 In13 this13 way13 the13 standard13 deviation13 associated13 with13 any13 observation13 may13 be13 calculated13 and13 used13 to13 appropriately13 weight13 that13 observation13 in13 the13 model13 building13 process13 Observations13 are13 weighted13 by13 the13 reciprocal13 of13 the13 variance13 or13 squared13 standard13 deviation13 13 Output13 of13 the13 function13 is13 a13 plot13 of13 the13 measured13 observations13 and13 Zitted13 polynomial13 curves13 and13 a13 list13 with13 the13 Zirst13 second13 and13 third13 order13 coefZicients

makeErrorPoly

makePTA This13 function13 performs13 a13 Probability13 of13 Target13 Attainment13 analysis13 for13 a13 set13 of13 simulated13 doses13 and13 time-shy‐concentration13 proZiles13 13 Targets13 (eg13 Minimum13 Inhibitory13 Concentrations)13 the13 type13 of13 target13 attainment13 (ie13 time13 above13 target13 Cmaxtarget13 13 AUCtarget13 Cmintarget13 or13 Cxtarget13 where13 x13 is13 any13 time13 point)13 and13 the13 success13 threshold13 (eg13 time13 gt13 0713 or13 Cmaxtarget13 gt13 10)13 can13 all13 be13 speciZied13 13 Output13 is13 a13 list13 (class13 PMpta)13 with13 two13 objectsbull Results13 a13 413 dimensional13 array13 with13 dimension13 size13 of13

[number13 of13 doses13 number13 of13 targets13 number13 of13 simulated13 proZiles13 1]13 which13 gives13 the13 target13 attainment13 (eg13 Cmaxtarget)13 for13 each13 dose13 target13 and13 proZile

bull Outcome13 For13 each13 dose13 and13 target13 a13 summary13 of13 the13 target13 attainment13 for13 all13 the13 proZiles13 including13 mean13 standard13 deviation13 and13 proportion13 above13 the13 success13 threshold

PMpta13 objects13 can13 be13 summarized13 with13 summary(x)13 and13 plotted13 with13 plot(x)13

makePTA

Userrsquos13 Guide13 13 2413 13

Command Description R13 help

makePopmakePost(NPAG13 only)

These13 functions13 create13 dataframes13 of13 class13 PMpop13 and13 PMpost13 respectively13 13 The13 PMpop13 or13 PMpost13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull time13 Times13 for13 predicted13 concentrations13 13 These13

times13 are13 not13 necessarily13 at13 observed13 times13 but13 at13 a13 frequency13 speciZied13 in13 the13 NPAG13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

bull pred113 Predictions13 for13 output13 113 13 For13 PMpop13 objects13 predictions13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 population13 prior13 distribution13 13 For13 PMpost13 objects13 they13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject

bull pred213 pred313 etc13 If13 additional13 outputs13 exist13 they13 will13 each13 be13 columns13 in13 the13 dataframe13 just13 as13 for13 pred113 13

makePopmakePost

NPAG RunsIn13 the13 past13 users13 had13 to13 run13 NPAG13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 NPrun()13 13 However13 if13 NPrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable

1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 NPAG13 creates13 a13 temporary13 instruction13 Zile13 in13 case13 something13 happens13 so13 that13 instructions13 entered13 to13 date13 can13

be13 recovered13 13 Accept13 the13 default13 by13 choosing13 113 13 You13 can13 save13 with13 a13 meaningful13 Zilename13 later13 13 If13 it13 already13 exists13 you13 will13 be13 asked13 if13 you13 wish13 to13 overwrite13 the13 Zile13 which13 is13 usually13 the13 thing13 to13 do

Userrsquos13 Guide13 13 2513 13

8 If13 you13 have13 previously13 run13 IT2B13 you13 can13 automatically13 import13 the13 suggested13 parameter13 ranges13 13 Choose13 113 to13 do13 this13 and13 013 to13 run13 NPAG13 without13 a13 previous13 IT2B13 run81 If13 you13 choose13 option13 113 you13 must13 specify13 the13 name13 of13 a13 FROMxxxx13 Zile13 typically13 FROM000113 that13 you13 can13

Zind13 in13 an13 output13 directory13 after13 a13 successful13 IT2B13 run13 13 Note13 that13 the13 program13 will13 then13 assume13 that13 you13 are13 using13 the13 same13 wrk13 Ziles13 that13 IT2B13 made13 from13 your13 data13 csv13 Zile13 13 It13 is13 strongly13 recommended13 to13 override13 this13 and13 specify13 a13 data13 csv13 Zile13 13 At13 this13 point13 you13 will13 jump13 to13 1013 below13 and13 continue13 on13 however13 your13 answers13 will13 often13 be13 supplied13 by13 the13 instructions13 contained13 in13 the13 FROMxxxx13 Zile13 and13 you13 need13 merely13 conZirm13 them

9 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13 have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 NPrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis91 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13

for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

10 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 NPAG13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

11 Enter13 the13 name13 of13 your13 csv13 Zile13 now12 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile13 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset131 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects132 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry14 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset15 Enter13 the13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo 13 followed13 by13

return16 Select13 how13 you13 would13 like13 to13 model13 assay13 (observation)13 error13 for13 each13 output13 equation13 13 You13 have13 four13 choices13 13

In13 all13 four13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0161 Error13 model13 113 (SD)13 13 Choose13 this13 option13 if13 you13 have13 already13 run13 IT2B13 and13 multiplied13 your13 assay13 error13

polynomial13 by13 gamma13 (see13 next13 option13 for13 a13 description13 of13 gamma)162 Error13 model13 213 (SD13 13 gamma)13 13 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13

observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 If13 you13 choose13 this13 option13 you13 then13 can13 specify13 the13 starting13 value13 of13 gamma13 13 Good13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality

163 Error13 model13 313 (SD213 +13 lamda2)0513 13 Lamda13 is13 an13 alternative13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present

Userrsquos13 Guide13 13 2613 13

164 Error13 model13 413 SD13 =13 gamma13 13 This13 model13 is13 rarely13 used13 and13 is13 equivalent13 to13 specifying13 a13 model13 with13 C013 only13 ie13 a13 constant13 error13 regardless13 of13 concentration

17 Once13 you13 select13 the13 assay13 error13 model13 for13 each13 output13 equation13 you13 are13 then13 offered13 four13 more13 options13 on13 which13 assay13 error13 polynomial13 coefZicients13 to13 use13 13 Choices13 113 and13 213 are13 the13 most13 commonly13 used171 Choice13 113 The13 default13 13 Use13 coefZicients13 in13 the13 subject13 record13 (C013 C113 C213 C313 in13 the13 data13 csv13 Zile)13 and13 if13

missing13 use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 (item13 1813 below)172 Choice13 213 Use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 for13 all13 subjects13 regardless13 of13 what13 is13 in13 the13

data13 csv13 Zile173 Choice13 313 13 To13 multiply13 data13 csv13 values13 and13 default13 entered13 values13 by13 a13 Zixed13 gamma13 and13 use13 them13 13 174 Choice13 013 Specify13 coefZicients13 on13 a13 subject13 by13 subject13 basis13 either13 those13 in13 the13 data13 csv13 Zile13 already13 the13

default13 values13 entered13 into13 the13 program13 or13 other13 values18 For13 each13 output13 equation13 after13 you13 have13 selected13 the13 option13 in13 item13 1713 you13 will13 be13 prompted13 to13 supply13 the13

required13 information13 including13 the13 general13 default13 values13 for13 missing13 or13 overridden13 values13 in13 the13 data13 csv13 Zile19 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13

usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13

20 Enter13 the13 grid13 point13 index13 13 This13 number13 corresponds13 to13 the13 number13 of13 grid13 (support)13 points13 which13 will13 initially13 Zill13 the13 model13 parameter13 space13 13 The13 larger13 the13 number13 of13 random13 parameters13 to13 be13 estimated13 the13 more13 points13 are13 required13 13 The13 program13 will13 make13 a13 suggestion13 based13 on13 the13 number13 of13 random13 parameters13 in13 the13 model13 13 The13 more13 you13 choose13 the13 slower13 the13 run13 will13 be13 but13 results13 may13 improve13 13 It13 is13 reasonable13 to13 choose13 fewer13 points13 early13 in13 model13 exploration13 and13 increase13 in13 later13 phases13 or13 if13 poor13 model13 Zits13 or13 lack13 of13 convergence13 are13 noted13 The13 choices13 are13 113 to13 713 corresponding13 respectively13 to13 212913 500313 1000713 2001113 4000913 and13 8002113 points13 13 If13 you13 choose13 713 you13 then13 have13 an13 additional13 choice13 to13 select13 one13 or13 more13 multiples13 of13 8002113 points

21 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 013 or13 greater13 13 If13 you13 enter13 an13 integer13 greater13 than13 013 the13 engine13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13 If13 you13 enter13 013 this13 is13 the13 way13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 an13 independent13 data13 set13 and13 a13 non-shy‐uniform13 prior13 must13 be13 speciZied13 (see13 3013 below)13 13 This13 means13 that13 the13 engine13 will13 only13 calculate13 the13 individual13 Bayesian13 posteriors13 for13 the13 new13 subjects13 using13 the13 population13 joint13 density13 from13 a13 previous13 run13 as13 a13 Bayesian13 prior

22 Information13 about13 convergence13 criteria13 13 Answer13 113 or13 some13 other13 keystroke13 plus13 Return13 to13 acknowledge13 that13 you13 have13 read13 it

23 In13 order13 to13 predict13 concentrations13 from13 a13 non-shy‐parametric13 distribution13 you13 have13 the13 option13 to13 use13 the13 1)13 mean13 2)13 median13 or13 3)13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject13 13 We13 typically13 use13 the13 median13 Zirst13 and13 then13 the13 mean13 in13 a13 separate13 run13 and13 compare13 the13 differences13 13

24 Select13 the13 time13 interval13 to13 generate13 predicted13 concentrations13 13 Additionally13 there13 will13 also13 be13 predictions13 made13 at13 the13 time13 of13 each13 observation13 13 In13 general13 for13 most13 models13 predictions13 every13 1213 minutes13 provide13 sufZicient13 granularity13 13 Smaller13 values13 can13 result13 in13 very13 large13 Ziles13 for13 big13 populations

25 Select13 the13 default13 MIC13 to13 be13 used13 for13 AUCMIC13 ratio13 reporting13 13 This13 should13 generally13 be13 set13 to13 the13 default13 of13 113 by13 choosing13 113 13 You13 can13 always13 extract13 the13 AUC13 later13 and13 divide13 it13 by13 any13 MIC13 you13 choose

26 Enter13 the13 value13 in13 hours13 that13 you13 want13 for13 calculations13 of13 AUCs13 from13 predicted13 concentration13 proZiles13 13 The13 default13 is13 2413 hours13 which13 you13 can13 accept13 by13 entering13 113 or13 013 if13 you13 want13 to13 specify13 a13 different13 interval

27 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

28 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

Userrsquos13 Guide13 13 2713 13

29 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

30 For13 the13 prior13 density13 choose13 113 if13 it13 is13 to13 be13 uniform13 13 This13 means13 that13 the13 initial13 grid13 points13 will13 be13 evenly13 distributed13 with13 equal13 probability13 within13 the13 boundaries13 speciZied13 (in13 1513 above)13 13 If13 you13 choose13 013 you13 will13 be13 prompted13 for13 the13 name13 of13 a13 Zile13 that13 contains13 the13 prior13 density13 13 This13 will13 be13 DEN000113 unless13 you13 have13 changed13 its13 name13 13 It13 will13 be13 found13 in13 the13 output13 directory13 of13 a13 prior13 NPAG13 run13 13 The13 model13 used13 to13 generate13 the13 DEN000113 Zile13 must13 be13 exactly13 the13 same13 as13 the13 current13 model13 including13 parameter13 boundaries13 13 However13 this13 option13 is13 useful13 to13 specify13 a13 non-shy‐uniform13 density13 for13 two13 reasons13 13 The13 Zirst13 is13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 a13 new13 set13 of13 subjects13 13 Do13 this13 in13 combination13 with13 setting13 the13 number13 of13 cycles13 to13 013 (see13 2113 above)13 13 The13 second13 use13 for13 a13 non-shy‐uniform13 prior13 is13 to13 continue13 a13 previous13 run13 13 For13 example13 if13 you13 only13 set13 the13 number13 of13 cycles13 to13 5013 to13 get13 a13 rough13 idea13 of13 model13 Zit13 you13 may13 continue13 where13 you13 left13 off13 by13 specifying13 the13 DEN000113 Zile13 from13 the13 50-shy‐cycle13 run13 and13 continuing13 with13 as13 many13 additional13 cycles13 as13 you13 specify13 in13 item13 2113 13 So13 in13 the13 example13 if13 you13 specify13 10013 cycles13 in13 2113 the13 total13 number13 of13 cycles13 will13 be13 5013 +13 10013 =13 150

31 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 NPrun(instr=ldquoyourfilerdquo)13 option13 and13 including13 ldquoyourZilerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

32 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 NPAG13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 NPAG13 analysis

33 The13 NPAG13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

IT2B RunsIn13 the13 past13 users13 had13 to13 run13 IT2B13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 ITrun()13 13 However13 if13 ITrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13

have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 ITrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis

Userrsquos13 Guide13 13 2813 13

71 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13 for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

8 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 IT2B13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

9 Enter13 the13 name13 of13 your13 csv13 Zile13 now10 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile11 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset111 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects112 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry12 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset13 Enter13 the13 initial13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo13 followed13

by13 return14 The13 estimated13 mean13 for13 each13 parameter13 value13 distribution13 during13 the13 Zirst13 iteration13 will13 be13 the13 median13 of13 the13

range13 speciZied13 in13 1313 13 You13 now13 have13 the13 option13 to13 specify13 the13 standard13 deviation13 for13 the13 parameter13 value13 distribution13 which13 by13 default13 is13 half13 of13 the13 range13 in13 1313 13 Choose13 113 to13 accept13 this13 (the13 usual13 answer)13 or13 013 to13 change13 it13 to13 something13 else13 expressed13 as13 a13 multiple13 of13 the13 range

15 In13 IT2B13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 You13 can13 now13 choose13 113 if13 every13 subject13 has13 the13 same13 coefZicients13 or13 013 to13 use13 a13 unique13 set13 of13 coefZicients13 for13 each13 subject13 13 The13 Zirst13 case13 is13 the13 more13 usual13 when13 all13 13 samples13 from13 all13 subjects13 are13 analyzed13 in13 the13 same13 lab13 13 If13 13 samples13 are13 analyzed13 in13 different13 labs13 and13 you13 have13 the13 assay13 data13 from13 each13 lab13 then13 you13 would13 enter13 013 13 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 (see13 151313 below)13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0151 If13 you13 choose13 113 (one13 set13 of13 coefZicients13 for13 all13 subjects)13 you13 will13 then13 be13 presented13 with13 313 additional13

choices1511 Choice13 113 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13 observation13

including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 and13 to13 Zix13 gamma13 to13 1

1512 Choice13 213 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 but13 to13 estimate13 gamma13 based13 on13 the13 data13 13 This13 is13 the13 usual13 option

1513 Choice13 313 Choose13 this13 option13 if13 you13 wish13 to13 estimate13 the13 assay13 error13 coefZicients13 based13 on13 your13 data13 for13 use13 in13 future13 runs13 13 Although13 you13 can13 access13 this13 option13 by13 using13 either13 ITrun()13 or13 ERRrun()13 in13 R13 the13 instruction13 Ziles13 that13 you13 save13 and13 the13 generated13 output13 Ziles13 will13 be13 different13 13 Therefore13 we13 recommend13 that13 if13 you13 intend13 to13 choose13 this13 option13 use13 ERRrun()13 in13 R13 which13 will13 generate13 an13 ASS000113 Zile13 that13 contains13 the13 estimates13 for13 C013 C113 C213 and13 C313 13 You13 can13 then13 include13 this13 Zile13 in13 the13 working13 directory13 (along13 with13 a13 model13 txt13 Zile13 and13 a13 data13 csv13 Zile)13 to13 do13 an13 IT2B13 run13 supplying13 the13 Zile13 name13 in13 16113 below

Userrsquos13 Guide13 13 2913 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

Command Description R13 help

makeErrorPoly This13 function13 plots13 Zirst13 second13 and13 third13 order13 polynomial13 functions13 Zitted13 to13 pairs13 of13 observations13 and13 associated13 standard13 deviations13 for13 a13 given13 output13 assay13 In13 this13 way13 the13 standard13 deviation13 associated13 with13 any13 observation13 may13 be13 calculated13 and13 used13 to13 appropriately13 weight13 that13 observation13 in13 the13 model13 building13 process13 Observations13 are13 weighted13 by13 the13 reciprocal13 of13 the13 variance13 or13 squared13 standard13 deviation13 13 Output13 of13 the13 function13 is13 a13 plot13 of13 the13 measured13 observations13 and13 Zitted13 polynomial13 curves13 and13 a13 list13 with13 the13 Zirst13 second13 and13 third13 order13 coefZicients

makeErrorPoly

makePTA This13 function13 performs13 a13 Probability13 of13 Target13 Attainment13 analysis13 for13 a13 set13 of13 simulated13 doses13 and13 time-shy‐concentration13 proZiles13 13 Targets13 (eg13 Minimum13 Inhibitory13 Concentrations)13 the13 type13 of13 target13 attainment13 (ie13 time13 above13 target13 Cmaxtarget13 13 AUCtarget13 Cmintarget13 or13 Cxtarget13 where13 x13 is13 any13 time13 point)13 and13 the13 success13 threshold13 (eg13 time13 gt13 0713 or13 Cmaxtarget13 gt13 10)13 can13 all13 be13 speciZied13 13 Output13 is13 a13 list13 (class13 PMpta)13 with13 two13 objectsbull Results13 a13 413 dimensional13 array13 with13 dimension13 size13 of13

[number13 of13 doses13 number13 of13 targets13 number13 of13 simulated13 proZiles13 1]13 which13 gives13 the13 target13 attainment13 (eg13 Cmaxtarget)13 for13 each13 dose13 target13 and13 proZile

bull Outcome13 For13 each13 dose13 and13 target13 a13 summary13 of13 the13 target13 attainment13 for13 all13 the13 proZiles13 including13 mean13 standard13 deviation13 and13 proportion13 above13 the13 success13 threshold

PMpta13 objects13 can13 be13 summarized13 with13 summary(x)13 and13 plotted13 with13 plot(x)13

makePTA

Userrsquos13 Guide13 13 2413 13

Command Description R13 help

makePopmakePost(NPAG13 only)

These13 functions13 create13 dataframes13 of13 class13 PMpop13 and13 PMpost13 respectively13 13 The13 PMpop13 or13 PMpost13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull time13 Times13 for13 predicted13 concentrations13 13 These13

times13 are13 not13 necessarily13 at13 observed13 times13 but13 at13 a13 frequency13 speciZied13 in13 the13 NPAG13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

bull pred113 Predictions13 for13 output13 113 13 For13 PMpop13 objects13 predictions13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 population13 prior13 distribution13 13 For13 PMpost13 objects13 they13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject

bull pred213 pred313 etc13 If13 additional13 outputs13 exist13 they13 will13 each13 be13 columns13 in13 the13 dataframe13 just13 as13 for13 pred113 13

makePopmakePost

NPAG RunsIn13 the13 past13 users13 had13 to13 run13 NPAG13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 NPrun()13 13 However13 if13 NPrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable

1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 NPAG13 creates13 a13 temporary13 instruction13 Zile13 in13 case13 something13 happens13 so13 that13 instructions13 entered13 to13 date13 can13

be13 recovered13 13 Accept13 the13 default13 by13 choosing13 113 13 You13 can13 save13 with13 a13 meaningful13 Zilename13 later13 13 If13 it13 already13 exists13 you13 will13 be13 asked13 if13 you13 wish13 to13 overwrite13 the13 Zile13 which13 is13 usually13 the13 thing13 to13 do

Userrsquos13 Guide13 13 2513 13

8 If13 you13 have13 previously13 run13 IT2B13 you13 can13 automatically13 import13 the13 suggested13 parameter13 ranges13 13 Choose13 113 to13 do13 this13 and13 013 to13 run13 NPAG13 without13 a13 previous13 IT2B13 run81 If13 you13 choose13 option13 113 you13 must13 specify13 the13 name13 of13 a13 FROMxxxx13 Zile13 typically13 FROM000113 that13 you13 can13

Zind13 in13 an13 output13 directory13 after13 a13 successful13 IT2B13 run13 13 Note13 that13 the13 program13 will13 then13 assume13 that13 you13 are13 using13 the13 same13 wrk13 Ziles13 that13 IT2B13 made13 from13 your13 data13 csv13 Zile13 13 It13 is13 strongly13 recommended13 to13 override13 this13 and13 specify13 a13 data13 csv13 Zile13 13 At13 this13 point13 you13 will13 jump13 to13 1013 below13 and13 continue13 on13 however13 your13 answers13 will13 often13 be13 supplied13 by13 the13 instructions13 contained13 in13 the13 FROMxxxx13 Zile13 and13 you13 need13 merely13 conZirm13 them

9 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13 have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 NPrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis91 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13

for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

10 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 NPAG13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

11 Enter13 the13 name13 of13 your13 csv13 Zile13 now12 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile13 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset131 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects132 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry14 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset15 Enter13 the13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo 13 followed13 by13

return16 Select13 how13 you13 would13 like13 to13 model13 assay13 (observation)13 error13 for13 each13 output13 equation13 13 You13 have13 four13 choices13 13

In13 all13 four13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0161 Error13 model13 113 (SD)13 13 Choose13 this13 option13 if13 you13 have13 already13 run13 IT2B13 and13 multiplied13 your13 assay13 error13

polynomial13 by13 gamma13 (see13 next13 option13 for13 a13 description13 of13 gamma)162 Error13 model13 213 (SD13 13 gamma)13 13 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13

observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 If13 you13 choose13 this13 option13 you13 then13 can13 specify13 the13 starting13 value13 of13 gamma13 13 Good13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality

163 Error13 model13 313 (SD213 +13 lamda2)0513 13 Lamda13 is13 an13 alternative13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present

Userrsquos13 Guide13 13 2613 13

164 Error13 model13 413 SD13 =13 gamma13 13 This13 model13 is13 rarely13 used13 and13 is13 equivalent13 to13 specifying13 a13 model13 with13 C013 only13 ie13 a13 constant13 error13 regardless13 of13 concentration

17 Once13 you13 select13 the13 assay13 error13 model13 for13 each13 output13 equation13 you13 are13 then13 offered13 four13 more13 options13 on13 which13 assay13 error13 polynomial13 coefZicients13 to13 use13 13 Choices13 113 and13 213 are13 the13 most13 commonly13 used171 Choice13 113 The13 default13 13 Use13 coefZicients13 in13 the13 subject13 record13 (C013 C113 C213 C313 in13 the13 data13 csv13 Zile)13 and13 if13

missing13 use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 (item13 1813 below)172 Choice13 213 Use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 for13 all13 subjects13 regardless13 of13 what13 is13 in13 the13

data13 csv13 Zile173 Choice13 313 13 To13 multiply13 data13 csv13 values13 and13 default13 entered13 values13 by13 a13 Zixed13 gamma13 and13 use13 them13 13 174 Choice13 013 Specify13 coefZicients13 on13 a13 subject13 by13 subject13 basis13 either13 those13 in13 the13 data13 csv13 Zile13 already13 the13

default13 values13 entered13 into13 the13 program13 or13 other13 values18 For13 each13 output13 equation13 after13 you13 have13 selected13 the13 option13 in13 item13 1713 you13 will13 be13 prompted13 to13 supply13 the13

required13 information13 including13 the13 general13 default13 values13 for13 missing13 or13 overridden13 values13 in13 the13 data13 csv13 Zile19 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13

usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13

20 Enter13 the13 grid13 point13 index13 13 This13 number13 corresponds13 to13 the13 number13 of13 grid13 (support)13 points13 which13 will13 initially13 Zill13 the13 model13 parameter13 space13 13 The13 larger13 the13 number13 of13 random13 parameters13 to13 be13 estimated13 the13 more13 points13 are13 required13 13 The13 program13 will13 make13 a13 suggestion13 based13 on13 the13 number13 of13 random13 parameters13 in13 the13 model13 13 The13 more13 you13 choose13 the13 slower13 the13 run13 will13 be13 but13 results13 may13 improve13 13 It13 is13 reasonable13 to13 choose13 fewer13 points13 early13 in13 model13 exploration13 and13 increase13 in13 later13 phases13 or13 if13 poor13 model13 Zits13 or13 lack13 of13 convergence13 are13 noted13 The13 choices13 are13 113 to13 713 corresponding13 respectively13 to13 212913 500313 1000713 2001113 4000913 and13 8002113 points13 13 If13 you13 choose13 713 you13 then13 have13 an13 additional13 choice13 to13 select13 one13 or13 more13 multiples13 of13 8002113 points

21 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 013 or13 greater13 13 If13 you13 enter13 an13 integer13 greater13 than13 013 the13 engine13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13 If13 you13 enter13 013 this13 is13 the13 way13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 an13 independent13 data13 set13 and13 a13 non-shy‐uniform13 prior13 must13 be13 speciZied13 (see13 3013 below)13 13 This13 means13 that13 the13 engine13 will13 only13 calculate13 the13 individual13 Bayesian13 posteriors13 for13 the13 new13 subjects13 using13 the13 population13 joint13 density13 from13 a13 previous13 run13 as13 a13 Bayesian13 prior

22 Information13 about13 convergence13 criteria13 13 Answer13 113 or13 some13 other13 keystroke13 plus13 Return13 to13 acknowledge13 that13 you13 have13 read13 it

23 In13 order13 to13 predict13 concentrations13 from13 a13 non-shy‐parametric13 distribution13 you13 have13 the13 option13 to13 use13 the13 1)13 mean13 2)13 median13 or13 3)13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject13 13 We13 typically13 use13 the13 median13 Zirst13 and13 then13 the13 mean13 in13 a13 separate13 run13 and13 compare13 the13 differences13 13

24 Select13 the13 time13 interval13 to13 generate13 predicted13 concentrations13 13 Additionally13 there13 will13 also13 be13 predictions13 made13 at13 the13 time13 of13 each13 observation13 13 In13 general13 for13 most13 models13 predictions13 every13 1213 minutes13 provide13 sufZicient13 granularity13 13 Smaller13 values13 can13 result13 in13 very13 large13 Ziles13 for13 big13 populations

25 Select13 the13 default13 MIC13 to13 be13 used13 for13 AUCMIC13 ratio13 reporting13 13 This13 should13 generally13 be13 set13 to13 the13 default13 of13 113 by13 choosing13 113 13 You13 can13 always13 extract13 the13 AUC13 later13 and13 divide13 it13 by13 any13 MIC13 you13 choose

26 Enter13 the13 value13 in13 hours13 that13 you13 want13 for13 calculations13 of13 AUCs13 from13 predicted13 concentration13 proZiles13 13 The13 default13 is13 2413 hours13 which13 you13 can13 accept13 by13 entering13 113 or13 013 if13 you13 want13 to13 specify13 a13 different13 interval

27 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

28 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

Userrsquos13 Guide13 13 2713 13

29 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

30 For13 the13 prior13 density13 choose13 113 if13 it13 is13 to13 be13 uniform13 13 This13 means13 that13 the13 initial13 grid13 points13 will13 be13 evenly13 distributed13 with13 equal13 probability13 within13 the13 boundaries13 speciZied13 (in13 1513 above)13 13 If13 you13 choose13 013 you13 will13 be13 prompted13 for13 the13 name13 of13 a13 Zile13 that13 contains13 the13 prior13 density13 13 This13 will13 be13 DEN000113 unless13 you13 have13 changed13 its13 name13 13 It13 will13 be13 found13 in13 the13 output13 directory13 of13 a13 prior13 NPAG13 run13 13 The13 model13 used13 to13 generate13 the13 DEN000113 Zile13 must13 be13 exactly13 the13 same13 as13 the13 current13 model13 including13 parameter13 boundaries13 13 However13 this13 option13 is13 useful13 to13 specify13 a13 non-shy‐uniform13 density13 for13 two13 reasons13 13 The13 Zirst13 is13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 a13 new13 set13 of13 subjects13 13 Do13 this13 in13 combination13 with13 setting13 the13 number13 of13 cycles13 to13 013 (see13 2113 above)13 13 The13 second13 use13 for13 a13 non-shy‐uniform13 prior13 is13 to13 continue13 a13 previous13 run13 13 For13 example13 if13 you13 only13 set13 the13 number13 of13 cycles13 to13 5013 to13 get13 a13 rough13 idea13 of13 model13 Zit13 you13 may13 continue13 where13 you13 left13 off13 by13 specifying13 the13 DEN000113 Zile13 from13 the13 50-shy‐cycle13 run13 and13 continuing13 with13 as13 many13 additional13 cycles13 as13 you13 specify13 in13 item13 2113 13 So13 in13 the13 example13 if13 you13 specify13 10013 cycles13 in13 2113 the13 total13 number13 of13 cycles13 will13 be13 5013 +13 10013 =13 150

31 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 NPrun(instr=ldquoyourfilerdquo)13 option13 and13 including13 ldquoyourZilerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

32 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 NPAG13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 NPAG13 analysis

33 The13 NPAG13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

IT2B RunsIn13 the13 past13 users13 had13 to13 run13 IT2B13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 ITrun()13 13 However13 if13 ITrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13

have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 ITrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis

Userrsquos13 Guide13 13 2813 13

71 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13 for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

8 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 IT2B13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

9 Enter13 the13 name13 of13 your13 csv13 Zile13 now10 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile11 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset111 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects112 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry12 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset13 Enter13 the13 initial13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo13 followed13

by13 return14 The13 estimated13 mean13 for13 each13 parameter13 value13 distribution13 during13 the13 Zirst13 iteration13 will13 be13 the13 median13 of13 the13

range13 speciZied13 in13 1313 13 You13 now13 have13 the13 option13 to13 specify13 the13 standard13 deviation13 for13 the13 parameter13 value13 distribution13 which13 by13 default13 is13 half13 of13 the13 range13 in13 1313 13 Choose13 113 to13 accept13 this13 (the13 usual13 answer)13 or13 013 to13 change13 it13 to13 something13 else13 expressed13 as13 a13 multiple13 of13 the13 range

15 In13 IT2B13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 You13 can13 now13 choose13 113 if13 every13 subject13 has13 the13 same13 coefZicients13 or13 013 to13 use13 a13 unique13 set13 of13 coefZicients13 for13 each13 subject13 13 The13 Zirst13 case13 is13 the13 more13 usual13 when13 all13 13 samples13 from13 all13 subjects13 are13 analyzed13 in13 the13 same13 lab13 13 If13 13 samples13 are13 analyzed13 in13 different13 labs13 and13 you13 have13 the13 assay13 data13 from13 each13 lab13 then13 you13 would13 enter13 013 13 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 (see13 151313 below)13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0151 If13 you13 choose13 113 (one13 set13 of13 coefZicients13 for13 all13 subjects)13 you13 will13 then13 be13 presented13 with13 313 additional13

choices1511 Choice13 113 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13 observation13

including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 and13 to13 Zix13 gamma13 to13 1

1512 Choice13 213 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 but13 to13 estimate13 gamma13 based13 on13 the13 data13 13 This13 is13 the13 usual13 option

1513 Choice13 313 Choose13 this13 option13 if13 you13 wish13 to13 estimate13 the13 assay13 error13 coefZicients13 based13 on13 your13 data13 for13 use13 in13 future13 runs13 13 Although13 you13 can13 access13 this13 option13 by13 using13 either13 ITrun()13 or13 ERRrun()13 in13 R13 the13 instruction13 Ziles13 that13 you13 save13 and13 the13 generated13 output13 Ziles13 will13 be13 different13 13 Therefore13 we13 recommend13 that13 if13 you13 intend13 to13 choose13 this13 option13 use13 ERRrun()13 in13 R13 which13 will13 generate13 an13 ASS000113 Zile13 that13 contains13 the13 estimates13 for13 C013 C113 C213 and13 C313 13 You13 can13 then13 include13 this13 Zile13 in13 the13 working13 directory13 (along13 with13 a13 model13 txt13 Zile13 and13 a13 data13 csv13 Zile)13 to13 do13 an13 IT2B13 run13 supplying13 the13 Zile13 name13 in13 16113 below

Userrsquos13 Guide13 13 2913 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

Command Description R13 help

makePopmakePost(NPAG13 only)

These13 functions13 create13 dataframes13 of13 class13 PMpop13 and13 PMpost13 respectively13 13 The13 PMpop13 or13 PMpost13 object13 contains13 several13 columns

bull id13 Subject13 identiZicationbull time13 Times13 for13 predicted13 concentrations13 13 These13

times13 are13 not13 necessarily13 at13 observed13 times13 but13 at13 a13 frequency13 speciZied13 in13 the13 NPAG13 run13 instructions13 (see13 NPAG13 Runs13 below13 items13 2313 and13 24)

bull pred113 Predictions13 for13 output13 113 13 For13 PMpop13 objects13 predictions13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 population13 prior13 distribution13 13 For13 PMpost13 objects13 they13 are13 based13 on13 the13 mean13 median13 or13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject

bull pred213 pred313 etc13 If13 additional13 outputs13 exist13 they13 will13 each13 be13 columns13 in13 the13 dataframe13 just13 as13 for13 pred113 13

makePopmakePost

NPAG RunsIn13 the13 past13 users13 had13 to13 run13 NPAG13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 NPrun()13 13 However13 if13 NPrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable

1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 NPAG13 creates13 a13 temporary13 instruction13 Zile13 in13 case13 something13 happens13 so13 that13 instructions13 entered13 to13 date13 can13

be13 recovered13 13 Accept13 the13 default13 by13 choosing13 113 13 You13 can13 save13 with13 a13 meaningful13 Zilename13 later13 13 If13 it13 already13 exists13 you13 will13 be13 asked13 if13 you13 wish13 to13 overwrite13 the13 Zile13 which13 is13 usually13 the13 thing13 to13 do

Userrsquos13 Guide13 13 2513 13

8 If13 you13 have13 previously13 run13 IT2B13 you13 can13 automatically13 import13 the13 suggested13 parameter13 ranges13 13 Choose13 113 to13 do13 this13 and13 013 to13 run13 NPAG13 without13 a13 previous13 IT2B13 run81 If13 you13 choose13 option13 113 you13 must13 specify13 the13 name13 of13 a13 FROMxxxx13 Zile13 typically13 FROM000113 that13 you13 can13

Zind13 in13 an13 output13 directory13 after13 a13 successful13 IT2B13 run13 13 Note13 that13 the13 program13 will13 then13 assume13 that13 you13 are13 using13 the13 same13 wrk13 Ziles13 that13 IT2B13 made13 from13 your13 data13 csv13 Zile13 13 It13 is13 strongly13 recommended13 to13 override13 this13 and13 specify13 a13 data13 csv13 Zile13 13 At13 this13 point13 you13 will13 jump13 to13 1013 below13 and13 continue13 on13 however13 your13 answers13 will13 often13 be13 supplied13 by13 the13 instructions13 contained13 in13 the13 FROMxxxx13 Zile13 and13 you13 need13 merely13 conZirm13 them

9 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13 have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 NPrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis91 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13

for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

10 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 NPAG13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

11 Enter13 the13 name13 of13 your13 csv13 Zile13 now12 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile13 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset131 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects132 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry14 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset15 Enter13 the13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo 13 followed13 by13

return16 Select13 how13 you13 would13 like13 to13 model13 assay13 (observation)13 error13 for13 each13 output13 equation13 13 You13 have13 four13 choices13 13

In13 all13 four13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0161 Error13 model13 113 (SD)13 13 Choose13 this13 option13 if13 you13 have13 already13 run13 IT2B13 and13 multiplied13 your13 assay13 error13

polynomial13 by13 gamma13 (see13 next13 option13 for13 a13 description13 of13 gamma)162 Error13 model13 213 (SD13 13 gamma)13 13 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13

observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 If13 you13 choose13 this13 option13 you13 then13 can13 specify13 the13 starting13 value13 of13 gamma13 13 Good13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality

163 Error13 model13 313 (SD213 +13 lamda2)0513 13 Lamda13 is13 an13 alternative13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present

Userrsquos13 Guide13 13 2613 13

164 Error13 model13 413 SD13 =13 gamma13 13 This13 model13 is13 rarely13 used13 and13 is13 equivalent13 to13 specifying13 a13 model13 with13 C013 only13 ie13 a13 constant13 error13 regardless13 of13 concentration

17 Once13 you13 select13 the13 assay13 error13 model13 for13 each13 output13 equation13 you13 are13 then13 offered13 four13 more13 options13 on13 which13 assay13 error13 polynomial13 coefZicients13 to13 use13 13 Choices13 113 and13 213 are13 the13 most13 commonly13 used171 Choice13 113 The13 default13 13 Use13 coefZicients13 in13 the13 subject13 record13 (C013 C113 C213 C313 in13 the13 data13 csv13 Zile)13 and13 if13

missing13 use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 (item13 1813 below)172 Choice13 213 Use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 for13 all13 subjects13 regardless13 of13 what13 is13 in13 the13

data13 csv13 Zile173 Choice13 313 13 To13 multiply13 data13 csv13 values13 and13 default13 entered13 values13 by13 a13 Zixed13 gamma13 and13 use13 them13 13 174 Choice13 013 Specify13 coefZicients13 on13 a13 subject13 by13 subject13 basis13 either13 those13 in13 the13 data13 csv13 Zile13 already13 the13

default13 values13 entered13 into13 the13 program13 or13 other13 values18 For13 each13 output13 equation13 after13 you13 have13 selected13 the13 option13 in13 item13 1713 you13 will13 be13 prompted13 to13 supply13 the13

required13 information13 including13 the13 general13 default13 values13 for13 missing13 or13 overridden13 values13 in13 the13 data13 csv13 Zile19 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13

usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13

20 Enter13 the13 grid13 point13 index13 13 This13 number13 corresponds13 to13 the13 number13 of13 grid13 (support)13 points13 which13 will13 initially13 Zill13 the13 model13 parameter13 space13 13 The13 larger13 the13 number13 of13 random13 parameters13 to13 be13 estimated13 the13 more13 points13 are13 required13 13 The13 program13 will13 make13 a13 suggestion13 based13 on13 the13 number13 of13 random13 parameters13 in13 the13 model13 13 The13 more13 you13 choose13 the13 slower13 the13 run13 will13 be13 but13 results13 may13 improve13 13 It13 is13 reasonable13 to13 choose13 fewer13 points13 early13 in13 model13 exploration13 and13 increase13 in13 later13 phases13 or13 if13 poor13 model13 Zits13 or13 lack13 of13 convergence13 are13 noted13 The13 choices13 are13 113 to13 713 corresponding13 respectively13 to13 212913 500313 1000713 2001113 4000913 and13 8002113 points13 13 If13 you13 choose13 713 you13 then13 have13 an13 additional13 choice13 to13 select13 one13 or13 more13 multiples13 of13 8002113 points

21 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 013 or13 greater13 13 If13 you13 enter13 an13 integer13 greater13 than13 013 the13 engine13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13 If13 you13 enter13 013 this13 is13 the13 way13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 an13 independent13 data13 set13 and13 a13 non-shy‐uniform13 prior13 must13 be13 speciZied13 (see13 3013 below)13 13 This13 means13 that13 the13 engine13 will13 only13 calculate13 the13 individual13 Bayesian13 posteriors13 for13 the13 new13 subjects13 using13 the13 population13 joint13 density13 from13 a13 previous13 run13 as13 a13 Bayesian13 prior

22 Information13 about13 convergence13 criteria13 13 Answer13 113 or13 some13 other13 keystroke13 plus13 Return13 to13 acknowledge13 that13 you13 have13 read13 it

23 In13 order13 to13 predict13 concentrations13 from13 a13 non-shy‐parametric13 distribution13 you13 have13 the13 option13 to13 use13 the13 1)13 mean13 2)13 median13 or13 3)13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject13 13 We13 typically13 use13 the13 median13 Zirst13 and13 then13 the13 mean13 in13 a13 separate13 run13 and13 compare13 the13 differences13 13

24 Select13 the13 time13 interval13 to13 generate13 predicted13 concentrations13 13 Additionally13 there13 will13 also13 be13 predictions13 made13 at13 the13 time13 of13 each13 observation13 13 In13 general13 for13 most13 models13 predictions13 every13 1213 minutes13 provide13 sufZicient13 granularity13 13 Smaller13 values13 can13 result13 in13 very13 large13 Ziles13 for13 big13 populations

25 Select13 the13 default13 MIC13 to13 be13 used13 for13 AUCMIC13 ratio13 reporting13 13 This13 should13 generally13 be13 set13 to13 the13 default13 of13 113 by13 choosing13 113 13 You13 can13 always13 extract13 the13 AUC13 later13 and13 divide13 it13 by13 any13 MIC13 you13 choose

26 Enter13 the13 value13 in13 hours13 that13 you13 want13 for13 calculations13 of13 AUCs13 from13 predicted13 concentration13 proZiles13 13 The13 default13 is13 2413 hours13 which13 you13 can13 accept13 by13 entering13 113 or13 013 if13 you13 want13 to13 specify13 a13 different13 interval

27 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

28 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

Userrsquos13 Guide13 13 2713 13

29 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

30 For13 the13 prior13 density13 choose13 113 if13 it13 is13 to13 be13 uniform13 13 This13 means13 that13 the13 initial13 grid13 points13 will13 be13 evenly13 distributed13 with13 equal13 probability13 within13 the13 boundaries13 speciZied13 (in13 1513 above)13 13 If13 you13 choose13 013 you13 will13 be13 prompted13 for13 the13 name13 of13 a13 Zile13 that13 contains13 the13 prior13 density13 13 This13 will13 be13 DEN000113 unless13 you13 have13 changed13 its13 name13 13 It13 will13 be13 found13 in13 the13 output13 directory13 of13 a13 prior13 NPAG13 run13 13 The13 model13 used13 to13 generate13 the13 DEN000113 Zile13 must13 be13 exactly13 the13 same13 as13 the13 current13 model13 including13 parameter13 boundaries13 13 However13 this13 option13 is13 useful13 to13 specify13 a13 non-shy‐uniform13 density13 for13 two13 reasons13 13 The13 Zirst13 is13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 a13 new13 set13 of13 subjects13 13 Do13 this13 in13 combination13 with13 setting13 the13 number13 of13 cycles13 to13 013 (see13 2113 above)13 13 The13 second13 use13 for13 a13 non-shy‐uniform13 prior13 is13 to13 continue13 a13 previous13 run13 13 For13 example13 if13 you13 only13 set13 the13 number13 of13 cycles13 to13 5013 to13 get13 a13 rough13 idea13 of13 model13 Zit13 you13 may13 continue13 where13 you13 left13 off13 by13 specifying13 the13 DEN000113 Zile13 from13 the13 50-shy‐cycle13 run13 and13 continuing13 with13 as13 many13 additional13 cycles13 as13 you13 specify13 in13 item13 2113 13 So13 in13 the13 example13 if13 you13 specify13 10013 cycles13 in13 2113 the13 total13 number13 of13 cycles13 will13 be13 5013 +13 10013 =13 150

31 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 NPrun(instr=ldquoyourfilerdquo)13 option13 and13 including13 ldquoyourZilerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

32 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 NPAG13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 NPAG13 analysis

33 The13 NPAG13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

IT2B RunsIn13 the13 past13 users13 had13 to13 run13 IT2B13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 ITrun()13 13 However13 if13 ITrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13

have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 ITrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis

Userrsquos13 Guide13 13 2813 13

71 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13 for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

8 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 IT2B13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

9 Enter13 the13 name13 of13 your13 csv13 Zile13 now10 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile11 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset111 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects112 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry12 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset13 Enter13 the13 initial13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo13 followed13

by13 return14 The13 estimated13 mean13 for13 each13 parameter13 value13 distribution13 during13 the13 Zirst13 iteration13 will13 be13 the13 median13 of13 the13

range13 speciZied13 in13 1313 13 You13 now13 have13 the13 option13 to13 specify13 the13 standard13 deviation13 for13 the13 parameter13 value13 distribution13 which13 by13 default13 is13 half13 of13 the13 range13 in13 1313 13 Choose13 113 to13 accept13 this13 (the13 usual13 answer)13 or13 013 to13 change13 it13 to13 something13 else13 expressed13 as13 a13 multiple13 of13 the13 range

15 In13 IT2B13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 You13 can13 now13 choose13 113 if13 every13 subject13 has13 the13 same13 coefZicients13 or13 013 to13 use13 a13 unique13 set13 of13 coefZicients13 for13 each13 subject13 13 The13 Zirst13 case13 is13 the13 more13 usual13 when13 all13 13 samples13 from13 all13 subjects13 are13 analyzed13 in13 the13 same13 lab13 13 If13 13 samples13 are13 analyzed13 in13 different13 labs13 and13 you13 have13 the13 assay13 data13 from13 each13 lab13 then13 you13 would13 enter13 013 13 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 (see13 151313 below)13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0151 If13 you13 choose13 113 (one13 set13 of13 coefZicients13 for13 all13 subjects)13 you13 will13 then13 be13 presented13 with13 313 additional13

choices1511 Choice13 113 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13 observation13

including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 and13 to13 Zix13 gamma13 to13 1

1512 Choice13 213 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 but13 to13 estimate13 gamma13 based13 on13 the13 data13 13 This13 is13 the13 usual13 option

1513 Choice13 313 Choose13 this13 option13 if13 you13 wish13 to13 estimate13 the13 assay13 error13 coefZicients13 based13 on13 your13 data13 for13 use13 in13 future13 runs13 13 Although13 you13 can13 access13 this13 option13 by13 using13 either13 ITrun()13 or13 ERRrun()13 in13 R13 the13 instruction13 Ziles13 that13 you13 save13 and13 the13 generated13 output13 Ziles13 will13 be13 different13 13 Therefore13 we13 recommend13 that13 if13 you13 intend13 to13 choose13 this13 option13 use13 ERRrun()13 in13 R13 which13 will13 generate13 an13 ASS000113 Zile13 that13 contains13 the13 estimates13 for13 C013 C113 C213 and13 C313 13 You13 can13 then13 include13 this13 Zile13 in13 the13 working13 directory13 (along13 with13 a13 model13 txt13 Zile13 and13 a13 data13 csv13 Zile)13 to13 do13 an13 IT2B13 run13 supplying13 the13 Zile13 name13 in13 16113 below

Userrsquos13 Guide13 13 2913 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

8 If13 you13 have13 previously13 run13 IT2B13 you13 can13 automatically13 import13 the13 suggested13 parameter13 ranges13 13 Choose13 113 to13 do13 this13 and13 013 to13 run13 NPAG13 without13 a13 previous13 IT2B13 run81 If13 you13 choose13 option13 113 you13 must13 specify13 the13 name13 of13 a13 FROMxxxx13 Zile13 typically13 FROM000113 that13 you13 can13

Zind13 in13 an13 output13 directory13 after13 a13 successful13 IT2B13 run13 13 Note13 that13 the13 program13 will13 then13 assume13 that13 you13 are13 using13 the13 same13 wrk13 Ziles13 that13 IT2B13 made13 from13 your13 data13 csv13 Zile13 13 It13 is13 strongly13 recommended13 to13 override13 this13 and13 specify13 a13 data13 csv13 Zile13 13 At13 this13 point13 you13 will13 jump13 to13 1013 below13 and13 continue13 on13 however13 your13 answers13 will13 often13 be13 supplied13 by13 the13 instructions13 contained13 in13 the13 FROMxxxx13 Zile13 and13 you13 need13 merely13 conZirm13 them

9 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13 have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 NPrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis91 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13

for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

10 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 NPAG13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

11 Enter13 the13 name13 of13 your13 csv13 Zile13 now12 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile13 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset131 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects132 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry14 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset15 Enter13 the13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo 13 followed13 by13

return16 Select13 how13 you13 would13 like13 to13 model13 assay13 (observation)13 error13 for13 each13 output13 equation13 13 You13 have13 four13 choices13 13

In13 all13 four13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0161 Error13 model13 113 (SD)13 13 Choose13 this13 option13 if13 you13 have13 already13 run13 IT2B13 and13 multiplied13 your13 assay13 error13

polynomial13 by13 gamma13 (see13 next13 option13 for13 a13 description13 of13 gamma)162 Error13 model13 213 (SD13 13 gamma)13 13 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13

observation13 including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 If13 you13 choose13 this13 option13 you13 then13 can13 specify13 the13 starting13 value13 of13 gamma13 13 Good13 values13 are13 113 for13 high-shy‐quality13 data13 313 for13 medium13 and13 513 or13 1013 for13 poor13 quality

163 Error13 model13 313 (SD213 +13 lamda2)0513 13 Lamda13 is13 an13 alternative13 additive13 model13 to13 capture13 process13 noise13 rather13 than13 the13 multiplicative13 gamma13 model13 13 Good13 starting13 values13 for13 lambda13 are13 113 times13 C013 for13 good13 quality13 data13 313 times13 C013 for13 medium13 and13 513 or13 1013 times13 C013 for13 poor13 quality13 13 Note13 that13 C013 should13 generally13 not13 be13 013 as13 it13 represents13 machine13 noise13 (eg13 HPLC13 or13 mass13 spectrometer)13 that13 is13 always13 present

Userrsquos13 Guide13 13 2613 13

164 Error13 model13 413 SD13 =13 gamma13 13 This13 model13 is13 rarely13 used13 and13 is13 equivalent13 to13 specifying13 a13 model13 with13 C013 only13 ie13 a13 constant13 error13 regardless13 of13 concentration

17 Once13 you13 select13 the13 assay13 error13 model13 for13 each13 output13 equation13 you13 are13 then13 offered13 four13 more13 options13 on13 which13 assay13 error13 polynomial13 coefZicients13 to13 use13 13 Choices13 113 and13 213 are13 the13 most13 commonly13 used171 Choice13 113 The13 default13 13 Use13 coefZicients13 in13 the13 subject13 record13 (C013 C113 C213 C313 in13 the13 data13 csv13 Zile)13 and13 if13

missing13 use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 (item13 1813 below)172 Choice13 213 Use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 for13 all13 subjects13 regardless13 of13 what13 is13 in13 the13

data13 csv13 Zile173 Choice13 313 13 To13 multiply13 data13 csv13 values13 and13 default13 entered13 values13 by13 a13 Zixed13 gamma13 and13 use13 them13 13 174 Choice13 013 Specify13 coefZicients13 on13 a13 subject13 by13 subject13 basis13 either13 those13 in13 the13 data13 csv13 Zile13 already13 the13

default13 values13 entered13 into13 the13 program13 or13 other13 values18 For13 each13 output13 equation13 after13 you13 have13 selected13 the13 option13 in13 item13 1713 you13 will13 be13 prompted13 to13 supply13 the13

required13 information13 including13 the13 general13 default13 values13 for13 missing13 or13 overridden13 values13 in13 the13 data13 csv13 Zile19 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13

usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13

20 Enter13 the13 grid13 point13 index13 13 This13 number13 corresponds13 to13 the13 number13 of13 grid13 (support)13 points13 which13 will13 initially13 Zill13 the13 model13 parameter13 space13 13 The13 larger13 the13 number13 of13 random13 parameters13 to13 be13 estimated13 the13 more13 points13 are13 required13 13 The13 program13 will13 make13 a13 suggestion13 based13 on13 the13 number13 of13 random13 parameters13 in13 the13 model13 13 The13 more13 you13 choose13 the13 slower13 the13 run13 will13 be13 but13 results13 may13 improve13 13 It13 is13 reasonable13 to13 choose13 fewer13 points13 early13 in13 model13 exploration13 and13 increase13 in13 later13 phases13 or13 if13 poor13 model13 Zits13 or13 lack13 of13 convergence13 are13 noted13 The13 choices13 are13 113 to13 713 corresponding13 respectively13 to13 212913 500313 1000713 2001113 4000913 and13 8002113 points13 13 If13 you13 choose13 713 you13 then13 have13 an13 additional13 choice13 to13 select13 one13 or13 more13 multiples13 of13 8002113 points

21 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 013 or13 greater13 13 If13 you13 enter13 an13 integer13 greater13 than13 013 the13 engine13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13 If13 you13 enter13 013 this13 is13 the13 way13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 an13 independent13 data13 set13 and13 a13 non-shy‐uniform13 prior13 must13 be13 speciZied13 (see13 3013 below)13 13 This13 means13 that13 the13 engine13 will13 only13 calculate13 the13 individual13 Bayesian13 posteriors13 for13 the13 new13 subjects13 using13 the13 population13 joint13 density13 from13 a13 previous13 run13 as13 a13 Bayesian13 prior

22 Information13 about13 convergence13 criteria13 13 Answer13 113 or13 some13 other13 keystroke13 plus13 Return13 to13 acknowledge13 that13 you13 have13 read13 it

23 In13 order13 to13 predict13 concentrations13 from13 a13 non-shy‐parametric13 distribution13 you13 have13 the13 option13 to13 use13 the13 1)13 mean13 2)13 median13 or13 3)13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject13 13 We13 typically13 use13 the13 median13 Zirst13 and13 then13 the13 mean13 in13 a13 separate13 run13 and13 compare13 the13 differences13 13

24 Select13 the13 time13 interval13 to13 generate13 predicted13 concentrations13 13 Additionally13 there13 will13 also13 be13 predictions13 made13 at13 the13 time13 of13 each13 observation13 13 In13 general13 for13 most13 models13 predictions13 every13 1213 minutes13 provide13 sufZicient13 granularity13 13 Smaller13 values13 can13 result13 in13 very13 large13 Ziles13 for13 big13 populations

25 Select13 the13 default13 MIC13 to13 be13 used13 for13 AUCMIC13 ratio13 reporting13 13 This13 should13 generally13 be13 set13 to13 the13 default13 of13 113 by13 choosing13 113 13 You13 can13 always13 extract13 the13 AUC13 later13 and13 divide13 it13 by13 any13 MIC13 you13 choose

26 Enter13 the13 value13 in13 hours13 that13 you13 want13 for13 calculations13 of13 AUCs13 from13 predicted13 concentration13 proZiles13 13 The13 default13 is13 2413 hours13 which13 you13 can13 accept13 by13 entering13 113 or13 013 if13 you13 want13 to13 specify13 a13 different13 interval

27 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

28 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

Userrsquos13 Guide13 13 2713 13

29 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

30 For13 the13 prior13 density13 choose13 113 if13 it13 is13 to13 be13 uniform13 13 This13 means13 that13 the13 initial13 grid13 points13 will13 be13 evenly13 distributed13 with13 equal13 probability13 within13 the13 boundaries13 speciZied13 (in13 1513 above)13 13 If13 you13 choose13 013 you13 will13 be13 prompted13 for13 the13 name13 of13 a13 Zile13 that13 contains13 the13 prior13 density13 13 This13 will13 be13 DEN000113 unless13 you13 have13 changed13 its13 name13 13 It13 will13 be13 found13 in13 the13 output13 directory13 of13 a13 prior13 NPAG13 run13 13 The13 model13 used13 to13 generate13 the13 DEN000113 Zile13 must13 be13 exactly13 the13 same13 as13 the13 current13 model13 including13 parameter13 boundaries13 13 However13 this13 option13 is13 useful13 to13 specify13 a13 non-shy‐uniform13 density13 for13 two13 reasons13 13 The13 Zirst13 is13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 a13 new13 set13 of13 subjects13 13 Do13 this13 in13 combination13 with13 setting13 the13 number13 of13 cycles13 to13 013 (see13 2113 above)13 13 The13 second13 use13 for13 a13 non-shy‐uniform13 prior13 is13 to13 continue13 a13 previous13 run13 13 For13 example13 if13 you13 only13 set13 the13 number13 of13 cycles13 to13 5013 to13 get13 a13 rough13 idea13 of13 model13 Zit13 you13 may13 continue13 where13 you13 left13 off13 by13 specifying13 the13 DEN000113 Zile13 from13 the13 50-shy‐cycle13 run13 and13 continuing13 with13 as13 many13 additional13 cycles13 as13 you13 specify13 in13 item13 2113 13 So13 in13 the13 example13 if13 you13 specify13 10013 cycles13 in13 2113 the13 total13 number13 of13 cycles13 will13 be13 5013 +13 10013 =13 150

31 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 NPrun(instr=ldquoyourfilerdquo)13 option13 and13 including13 ldquoyourZilerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

32 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 NPAG13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 NPAG13 analysis

33 The13 NPAG13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

IT2B RunsIn13 the13 past13 users13 had13 to13 run13 IT2B13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 ITrun()13 13 However13 if13 ITrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13

have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 ITrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis

Userrsquos13 Guide13 13 2813 13

71 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13 for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

8 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 IT2B13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

9 Enter13 the13 name13 of13 your13 csv13 Zile13 now10 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile11 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset111 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects112 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry12 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset13 Enter13 the13 initial13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo13 followed13

by13 return14 The13 estimated13 mean13 for13 each13 parameter13 value13 distribution13 during13 the13 Zirst13 iteration13 will13 be13 the13 median13 of13 the13

range13 speciZied13 in13 1313 13 You13 now13 have13 the13 option13 to13 specify13 the13 standard13 deviation13 for13 the13 parameter13 value13 distribution13 which13 by13 default13 is13 half13 of13 the13 range13 in13 1313 13 Choose13 113 to13 accept13 this13 (the13 usual13 answer)13 or13 013 to13 change13 it13 to13 something13 else13 expressed13 as13 a13 multiple13 of13 the13 range

15 In13 IT2B13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 You13 can13 now13 choose13 113 if13 every13 subject13 has13 the13 same13 coefZicients13 or13 013 to13 use13 a13 unique13 set13 of13 coefZicients13 for13 each13 subject13 13 The13 Zirst13 case13 is13 the13 more13 usual13 when13 all13 13 samples13 from13 all13 subjects13 are13 analyzed13 in13 the13 same13 lab13 13 If13 13 samples13 are13 analyzed13 in13 different13 labs13 and13 you13 have13 the13 assay13 data13 from13 each13 lab13 then13 you13 would13 enter13 013 13 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 (see13 151313 below)13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0151 If13 you13 choose13 113 (one13 set13 of13 coefZicients13 for13 all13 subjects)13 you13 will13 then13 be13 presented13 with13 313 additional13

choices1511 Choice13 113 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13 observation13

including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 and13 to13 Zix13 gamma13 to13 1

1512 Choice13 213 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 but13 to13 estimate13 gamma13 based13 on13 the13 data13 13 This13 is13 the13 usual13 option

1513 Choice13 313 Choose13 this13 option13 if13 you13 wish13 to13 estimate13 the13 assay13 error13 coefZicients13 based13 on13 your13 data13 for13 use13 in13 future13 runs13 13 Although13 you13 can13 access13 this13 option13 by13 using13 either13 ITrun()13 or13 ERRrun()13 in13 R13 the13 instruction13 Ziles13 that13 you13 save13 and13 the13 generated13 output13 Ziles13 will13 be13 different13 13 Therefore13 we13 recommend13 that13 if13 you13 intend13 to13 choose13 this13 option13 use13 ERRrun()13 in13 R13 which13 will13 generate13 an13 ASS000113 Zile13 that13 contains13 the13 estimates13 for13 C013 C113 C213 and13 C313 13 You13 can13 then13 include13 this13 Zile13 in13 the13 working13 directory13 (along13 with13 a13 model13 txt13 Zile13 and13 a13 data13 csv13 Zile)13 to13 do13 an13 IT2B13 run13 supplying13 the13 Zile13 name13 in13 16113 below

Userrsquos13 Guide13 13 2913 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

164 Error13 model13 413 SD13 =13 gamma13 13 This13 model13 is13 rarely13 used13 and13 is13 equivalent13 to13 specifying13 a13 model13 with13 C013 only13 ie13 a13 constant13 error13 regardless13 of13 concentration

17 Once13 you13 select13 the13 assay13 error13 model13 for13 each13 output13 equation13 you13 are13 then13 offered13 four13 more13 options13 on13 which13 assay13 error13 polynomial13 coefZicients13 to13 use13 13 Choices13 113 and13 213 are13 the13 most13 commonly13 used171 Choice13 113 The13 default13 13 Use13 coefZicients13 in13 the13 subject13 record13 (C013 C113 C213 C313 in13 the13 data13 csv13 Zile)13 and13 if13

missing13 use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 (item13 1813 below)172 Choice13 213 Use13 the13 default13 values13 to13 be13 entered13 in13 the13 program13 for13 all13 subjects13 regardless13 of13 what13 is13 in13 the13

data13 csv13 Zile173 Choice13 313 13 To13 multiply13 data13 csv13 values13 and13 default13 entered13 values13 by13 a13 Zixed13 gamma13 and13 use13 them13 13 174 Choice13 013 Specify13 coefZicients13 on13 a13 subject13 by13 subject13 basis13 either13 those13 in13 the13 data13 csv13 Zile13 already13 the13

default13 values13 entered13 into13 the13 program13 or13 other13 values18 For13 each13 output13 equation13 after13 you13 have13 selected13 the13 option13 in13 item13 1713 you13 will13 be13 prompted13 to13 supply13 the13

required13 information13 including13 the13 general13 default13 values13 for13 missing13 or13 overridden13 values13 in13 the13 data13 csv13 Zile19 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13

usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13

20 Enter13 the13 grid13 point13 index13 13 This13 number13 corresponds13 to13 the13 number13 of13 grid13 (support)13 points13 which13 will13 initially13 Zill13 the13 model13 parameter13 space13 13 The13 larger13 the13 number13 of13 random13 parameters13 to13 be13 estimated13 the13 more13 points13 are13 required13 13 The13 program13 will13 make13 a13 suggestion13 based13 on13 the13 number13 of13 random13 parameters13 in13 the13 model13 13 The13 more13 you13 choose13 the13 slower13 the13 run13 will13 be13 but13 results13 may13 improve13 13 It13 is13 reasonable13 to13 choose13 fewer13 points13 early13 in13 model13 exploration13 and13 increase13 in13 later13 phases13 or13 if13 poor13 model13 Zits13 or13 lack13 of13 convergence13 are13 noted13 The13 choices13 are13 113 to13 713 corresponding13 respectively13 to13 212913 500313 1000713 2001113 4000913 and13 8002113 points13 13 If13 you13 choose13 713 you13 then13 have13 an13 additional13 choice13 to13 select13 one13 or13 more13 multiples13 of13 8002113 points

21 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 013 or13 greater13 13 If13 you13 enter13 an13 integer13 greater13 than13 013 the13 engine13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13 If13 you13 enter13 013 this13 is13 the13 way13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 an13 independent13 data13 set13 and13 a13 non-shy‐uniform13 prior13 must13 be13 speciZied13 (see13 3013 below)13 13 This13 means13 that13 the13 engine13 will13 only13 calculate13 the13 individual13 Bayesian13 posteriors13 for13 the13 new13 subjects13 using13 the13 population13 joint13 density13 from13 a13 previous13 run13 as13 a13 Bayesian13 prior

22 Information13 about13 convergence13 criteria13 13 Answer13 113 or13 some13 other13 keystroke13 plus13 Return13 to13 acknowledge13 that13 you13 have13 read13 it

23 In13 order13 to13 predict13 concentrations13 from13 a13 non-shy‐parametric13 distribution13 you13 have13 the13 option13 to13 use13 the13 1)13 mean13 2)13 median13 or13 3)13 mode13 of13 the13 Bayesian13 posterior13 distribution13 for13 each13 subject13 13 We13 typically13 use13 the13 median13 Zirst13 and13 then13 the13 mean13 in13 a13 separate13 run13 and13 compare13 the13 differences13 13

24 Select13 the13 time13 interval13 to13 generate13 predicted13 concentrations13 13 Additionally13 there13 will13 also13 be13 predictions13 made13 at13 the13 time13 of13 each13 observation13 13 In13 general13 for13 most13 models13 predictions13 every13 1213 minutes13 provide13 sufZicient13 granularity13 13 Smaller13 values13 can13 result13 in13 very13 large13 Ziles13 for13 big13 populations

25 Select13 the13 default13 MIC13 to13 be13 used13 for13 AUCMIC13 ratio13 reporting13 13 This13 should13 generally13 be13 set13 to13 the13 default13 of13 113 by13 choosing13 113 13 You13 can13 always13 extract13 the13 AUC13 later13 and13 divide13 it13 by13 any13 MIC13 you13 choose

26 Enter13 the13 value13 in13 hours13 that13 you13 want13 for13 calculations13 of13 AUCs13 from13 predicted13 concentration13 proZiles13 13 The13 default13 is13 2413 hours13 which13 you13 can13 accept13 by13 entering13 113 or13 013 if13 you13 want13 to13 specify13 a13 different13 interval

27 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

28 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

Userrsquos13 Guide13 13 2713 13

29 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

30 For13 the13 prior13 density13 choose13 113 if13 it13 is13 to13 be13 uniform13 13 This13 means13 that13 the13 initial13 grid13 points13 will13 be13 evenly13 distributed13 with13 equal13 probability13 within13 the13 boundaries13 speciZied13 (in13 1513 above)13 13 If13 you13 choose13 013 you13 will13 be13 prompted13 for13 the13 name13 of13 a13 Zile13 that13 contains13 the13 prior13 density13 13 This13 will13 be13 DEN000113 unless13 you13 have13 changed13 its13 name13 13 It13 will13 be13 found13 in13 the13 output13 directory13 of13 a13 prior13 NPAG13 run13 13 The13 model13 used13 to13 generate13 the13 DEN000113 Zile13 must13 be13 exactly13 the13 same13 as13 the13 current13 model13 including13 parameter13 boundaries13 13 However13 this13 option13 is13 useful13 to13 specify13 a13 non-shy‐uniform13 density13 for13 two13 reasons13 13 The13 Zirst13 is13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 a13 new13 set13 of13 subjects13 13 Do13 this13 in13 combination13 with13 setting13 the13 number13 of13 cycles13 to13 013 (see13 2113 above)13 13 The13 second13 use13 for13 a13 non-shy‐uniform13 prior13 is13 to13 continue13 a13 previous13 run13 13 For13 example13 if13 you13 only13 set13 the13 number13 of13 cycles13 to13 5013 to13 get13 a13 rough13 idea13 of13 model13 Zit13 you13 may13 continue13 where13 you13 left13 off13 by13 specifying13 the13 DEN000113 Zile13 from13 the13 50-shy‐cycle13 run13 and13 continuing13 with13 as13 many13 additional13 cycles13 as13 you13 specify13 in13 item13 2113 13 So13 in13 the13 example13 if13 you13 specify13 10013 cycles13 in13 2113 the13 total13 number13 of13 cycles13 will13 be13 5013 +13 10013 =13 150

31 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 NPrun(instr=ldquoyourfilerdquo)13 option13 and13 including13 ldquoyourZilerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

32 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 NPAG13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 NPAG13 analysis

33 The13 NPAG13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

IT2B RunsIn13 the13 past13 users13 had13 to13 run13 IT2B13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 ITrun()13 13 However13 if13 ITrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13

have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 ITrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis

Userrsquos13 Guide13 13 2813 13

71 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13 for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

8 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 IT2B13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

9 Enter13 the13 name13 of13 your13 csv13 Zile13 now10 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile11 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset111 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects112 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry12 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset13 Enter13 the13 initial13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo13 followed13

by13 return14 The13 estimated13 mean13 for13 each13 parameter13 value13 distribution13 during13 the13 Zirst13 iteration13 will13 be13 the13 median13 of13 the13

range13 speciZied13 in13 1313 13 You13 now13 have13 the13 option13 to13 specify13 the13 standard13 deviation13 for13 the13 parameter13 value13 distribution13 which13 by13 default13 is13 half13 of13 the13 range13 in13 1313 13 Choose13 113 to13 accept13 this13 (the13 usual13 answer)13 or13 013 to13 change13 it13 to13 something13 else13 expressed13 as13 a13 multiple13 of13 the13 range

15 In13 IT2B13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 You13 can13 now13 choose13 113 if13 every13 subject13 has13 the13 same13 coefZicients13 or13 013 to13 use13 a13 unique13 set13 of13 coefZicients13 for13 each13 subject13 13 The13 Zirst13 case13 is13 the13 more13 usual13 when13 all13 13 samples13 from13 all13 subjects13 are13 analyzed13 in13 the13 same13 lab13 13 If13 13 samples13 are13 analyzed13 in13 different13 labs13 and13 you13 have13 the13 assay13 data13 from13 each13 lab13 then13 you13 would13 enter13 013 13 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 (see13 151313 below)13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0151 If13 you13 choose13 113 (one13 set13 of13 coefZicients13 for13 all13 subjects)13 you13 will13 then13 be13 presented13 with13 313 additional13

choices1511 Choice13 113 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13 observation13

including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 and13 to13 Zix13 gamma13 to13 1

1512 Choice13 213 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 but13 to13 estimate13 gamma13 based13 on13 the13 data13 13 This13 is13 the13 usual13 option

1513 Choice13 313 Choose13 this13 option13 if13 you13 wish13 to13 estimate13 the13 assay13 error13 coefZicients13 based13 on13 your13 data13 for13 use13 in13 future13 runs13 13 Although13 you13 can13 access13 this13 option13 by13 using13 either13 ITrun()13 or13 ERRrun()13 in13 R13 the13 instruction13 Ziles13 that13 you13 save13 and13 the13 generated13 output13 Ziles13 will13 be13 different13 13 Therefore13 we13 recommend13 that13 if13 you13 intend13 to13 choose13 this13 option13 use13 ERRrun()13 in13 R13 which13 will13 generate13 an13 ASS000113 Zile13 that13 contains13 the13 estimates13 for13 C013 C113 C213 and13 C313 13 You13 can13 then13 include13 this13 Zile13 in13 the13 working13 directory13 (along13 with13 a13 model13 txt13 Zile13 and13 a13 data13 csv13 Zile)13 to13 do13 an13 IT2B13 run13 supplying13 the13 Zile13 name13 in13 16113 below

Userrsquos13 Guide13 13 2913 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

29 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

30 For13 the13 prior13 density13 choose13 113 if13 it13 is13 to13 be13 uniform13 13 This13 means13 that13 the13 initial13 grid13 points13 will13 be13 evenly13 distributed13 with13 equal13 probability13 within13 the13 boundaries13 speciZied13 (in13 1513 above)13 13 If13 you13 choose13 013 you13 will13 be13 prompted13 for13 the13 name13 of13 a13 Zile13 that13 contains13 the13 prior13 density13 13 This13 will13 be13 DEN000113 unless13 you13 have13 changed13 its13 name13 13 It13 will13 be13 found13 in13 the13 output13 directory13 of13 a13 prior13 NPAG13 run13 13 The13 model13 used13 to13 generate13 the13 DEN000113 Zile13 must13 be13 exactly13 the13 same13 as13 the13 current13 model13 including13 parameter13 boundaries13 13 However13 this13 option13 is13 useful13 to13 specify13 a13 non-shy‐uniform13 density13 for13 two13 reasons13 13 The13 Zirst13 is13 to13 test13 the13 predictive13 power13 of13 a13 model13 on13 a13 new13 set13 of13 subjects13 13 Do13 this13 in13 combination13 with13 setting13 the13 number13 of13 cycles13 to13 013 (see13 2113 above)13 13 The13 second13 use13 for13 a13 non-shy‐uniform13 prior13 is13 to13 continue13 a13 previous13 run13 13 For13 example13 if13 you13 only13 set13 the13 number13 of13 cycles13 to13 5013 to13 get13 a13 rough13 idea13 of13 model13 Zit13 you13 may13 continue13 where13 you13 left13 off13 by13 specifying13 the13 DEN000113 Zile13 from13 the13 50-shy‐cycle13 run13 and13 continuing13 with13 as13 many13 additional13 cycles13 as13 you13 specify13 in13 item13 2113 13 So13 in13 the13 example13 if13 you13 specify13 10013 cycles13 in13 2113 the13 total13 number13 of13 cycles13 will13 be13 5013 +13 10013 =13 150

31 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 NPrun(instr=ldquoyourfilerdquo)13 option13 and13 including13 ldquoyourZilerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

32 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 NPAG13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 NPAG13 analysis

33 The13 NPAG13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

IT2B RunsIn13 the13 past13 users13 had13 to13 run13 IT2B13 once13 before13 generating13 and13 saving13 an13 instruction13 Zile13 which13 could13 automate13 subsequent13 runs13 13 As13 of13 version13 0413 the13 instruction13 Zile13 is13 generated13 automatically13 using13 information13 in13 the13 data13 Zile13 the13 model13 Zile13 and13 arguments13 to13 ITrun()13 13 However13 if13 ITrun(auto=F)13 is13 speciZied13 then13 Pmetrics13 will13 allow13 the13 user13 to13 manually13 answer13 all13 the13 questions13 below13 13 13 Note13 the13 default13 (auto=T)13 option13 means13 that13 this13 section13 does13 not13 applyAnswers13 to13 the13 following13 questions13 can13 be13 saved13 in13 an13 instruction13 Zile13 which13 can13 be13 used13 for13 future13 runs13 if13 (auto=F)13 13 Instruction13 Ziles13 are13 simply13 text13 Ziles13 with13 speciZic13 entries13 which13 can13 be13 modiZied13 directly13 by13 advanced13 users13 Note13 that13 IT2B13 and13 NPAG13 instruction13 Uiles13 are13 NOT13 interchangeable1 Are13 the13 Ziles13 in13 the13 current13 directory13 The13 answer13 should13 always13 be13 12 Do13 an13 analysis13 or13 examine13 results13 from13 prior13 run13 13 Almost13 always13 13 A13 warning13 about13 using13 the13 correctcurrent13 model13 format13 13 Press13 113 or13 some13 other13 key13 and13 then13 return4 Enter13 the13 name13 of13 the13 Fortran13 model13 Zile13 13 5 For13 each13 of13 the13 parameters13 in13 the13 model13 Zile13 specify13 whether13 it13 is13 to13 be13 random13 (estimated)13 or13 Zixed13 (not13

estimated)6 What13 are13 the13 ordinary13 differential13 equation13 solver13 tolerances13 13 Accept13 the13 default13 value13 by13 choosing13 113 unless13

advanced7 Are13 the13 instructions13 coming13 from13 the13 keyboard13 or13 a13 Zile13 13 If13 this13 is13 the13 Zirst13 time13 choose13 013 for13 keyboard13 13 If13 you13

have13 a13 previously13 saved13 instruction13 Zile13 that13 you13 want13 to13 use13 choose13 113 13 However13 typically13 if13 you13 have13 an13 instruction13 Zile13 that13 you13 want13 to13 use13 you13 will13 specify13 this13 in13 the13 R13 script13 with13 ITrun(instr=ldquofilenamerdquo)13 for13 automated13 analysis

Userrsquos13 Guide13 13 2813 13

71 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13 for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

8 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 IT2B13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

9 Enter13 the13 name13 of13 your13 csv13 Zile13 now10 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile11 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset111 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects112 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry12 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset13 Enter13 the13 initial13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo13 followed13

by13 return14 The13 estimated13 mean13 for13 each13 parameter13 value13 distribution13 during13 the13 Zirst13 iteration13 will13 be13 the13 median13 of13 the13

range13 speciZied13 in13 1313 13 You13 now13 have13 the13 option13 to13 specify13 the13 standard13 deviation13 for13 the13 parameter13 value13 distribution13 which13 by13 default13 is13 half13 of13 the13 range13 in13 1313 13 Choose13 113 to13 accept13 this13 (the13 usual13 answer)13 or13 013 to13 change13 it13 to13 something13 else13 expressed13 as13 a13 multiple13 of13 the13 range

15 In13 IT2B13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 You13 can13 now13 choose13 113 if13 every13 subject13 has13 the13 same13 coefZicients13 or13 013 to13 use13 a13 unique13 set13 of13 coefZicients13 for13 each13 subject13 13 The13 Zirst13 case13 is13 the13 more13 usual13 when13 all13 13 samples13 from13 all13 subjects13 are13 analyzed13 in13 the13 same13 lab13 13 If13 13 samples13 are13 analyzed13 in13 different13 labs13 and13 you13 have13 the13 assay13 data13 from13 each13 lab13 then13 you13 would13 enter13 013 13 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 (see13 151313 below)13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0151 If13 you13 choose13 113 (one13 set13 of13 coefZicients13 for13 all13 subjects)13 you13 will13 then13 be13 presented13 with13 313 additional13

choices1511 Choice13 113 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13 observation13

including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 and13 to13 Zix13 gamma13 to13 1

1512 Choice13 213 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 but13 to13 estimate13 gamma13 based13 on13 the13 data13 13 This13 is13 the13 usual13 option

1513 Choice13 313 Choose13 this13 option13 if13 you13 wish13 to13 estimate13 the13 assay13 error13 coefZicients13 based13 on13 your13 data13 for13 use13 in13 future13 runs13 13 Although13 you13 can13 access13 this13 option13 by13 using13 either13 ITrun()13 or13 ERRrun()13 in13 R13 the13 instruction13 Ziles13 that13 you13 save13 and13 the13 generated13 output13 Ziles13 will13 be13 different13 13 Therefore13 we13 recommend13 that13 if13 you13 intend13 to13 choose13 this13 option13 use13 ERRrun()13 in13 R13 which13 will13 generate13 an13 ASS000113 Zile13 that13 contains13 the13 estimates13 for13 C013 C113 C213 and13 C313 13 You13 can13 then13 include13 this13 Zile13 in13 the13 working13 directory13 (along13 with13 a13 model13 txt13 Zile13 and13 a13 data13 csv13 Zile)13 to13 do13 an13 IT2B13 run13 supplying13 the13 Zile13 name13 in13 16113 below

Userrsquos13 Guide13 13 2913 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

71 If13 you13 selected13 keyboard13 input13 you13 will13 answer13 the13 following13 questions13 otherwise13 you13 will13 be13 prompted13 for13 the13 name13 of13 your13 instruction13 Zile13 and13 once13 loaded13 you13 will13 verify13 your13 previously13 supplied13 answers13 to13 the13 following13 questions

8 What13 data13 input13 format13 will13 you13 use13 13 The13 standard13 format13 is13 the13 matrix13 block13 csv13 Zile13 so13 the13 answer13 should13 be13 113 13 Working13 copy13 Ziles13 are13 an13 older13 format13 13 The13 csv13 Zile13 is13 actually13 converted13 to13 these13 wrk13 Ziles13 one13 Zile13 per13 subject13 prior13 to13 an13 IT2B13 run13 13 However13 some13 function13 will13 be13 lost13 in13 the13 Pmetrics13 package13 by13 using13 wrk13 input13 directly13 without13 a13 csv13 Zile13 such13 as13 the13 ability13 to13 plot13 raw13 subject13 data13 via13 the13 plotPMmatrix()13 function

9 Enter13 the13 name13 of13 your13 csv13 Zile13 now10 Enter13 the13 total13 number13 of13 unique13 subjects13 (deZined13 by13 ID)13 in13 the13 csv13 Zile11 How13 many13 of13 the13 total13 number13 do13 you13 want13 to13 analyze13 13 Enter13 113 if13 you13 want13 to13 analyze13 all13 of13 them13 013 if13 you13 want13

to13 analyze13 a13 subset111 If13 you13 entered13 013 you13 will13 then13 choose13 113 to13 include13 speciZic13 subjects13 or13 213 to13 exclude13 speciZic13 subjects112 Enter13 the13 inclusion13 or13 exclusion13 subject13 numbers13 (not13 IDs)13 in13 order13 using13 a13 combination13 of13 numbers13

hyphens13 and13 commas13 13 For13 example13 13-shy‐571013 13 Press13 return13 and13 then13 enter13 013 to13 conclude13 entry12 The13 program13 will13 then13 open13 the13 csv13 Zile13 and13 read13 the13 number13 of13 output13 equations13 reporting13 each13 subject13 as13 it13

is13 read13 13 This13 can13 take13 some13 time13 if13 it13 is13 a13 very13 large13 dataset13 Enter13 the13 initial13 boundary13 values13 for13 the13 random13 parameters13 in13 the13 model13 in13 the13 form13 ldquomin maxrdquo13 followed13

by13 return14 The13 estimated13 mean13 for13 each13 parameter13 value13 distribution13 during13 the13 Zirst13 iteration13 will13 be13 the13 median13 of13 the13

range13 speciZied13 in13 1313 13 You13 now13 have13 the13 option13 to13 specify13 the13 standard13 deviation13 for13 the13 parameter13 value13 distribution13 which13 by13 default13 is13 half13 of13 the13 range13 in13 1313 13 Choose13 113 to13 accept13 this13 (the13 usual13 answer)13 or13 013 to13 change13 it13 to13 something13 else13 expressed13 as13 a13 multiple13 of13 the13 range

15 In13 IT2B13 the13 standard13 deviation13 (SD)13 of13 the13 observation13 [obs]13 is13 modeled13 by13 a13 polynomial13 equation13 with13 up13 to13 four13 terms13 C013 +13 C1[obs]13 +13 C2[obs]213 +13 C3[obs]313 13 You13 will13 specify13 the13 coefZicients13 C013 C113 C213 and13 C313 You13 can13 now13 choose13 113 if13 every13 subject13 has13 the13 same13 coefZicients13 or13 013 to13 use13 a13 unique13 set13 of13 coefZicients13 for13 each13 subject13 13 The13 Zirst13 case13 is13 the13 more13 usual13 when13 all13 13 samples13 from13 all13 subjects13 are13 analyzed13 in13 the13 same13 lab13 13 If13 13 samples13 are13 analyzed13 in13 different13 labs13 and13 you13 have13 the13 assay13 data13 from13 each13 lab13 then13 you13 would13 enter13 013 13 13 This13 information13 should13 ideally13 come13 from13 the13 analytic13 lab13 in13 the13 form13 of13 inter-shy‐run13 standard13 deviations13 or13 coefZicients13 of13 variation13 at13 standard13 concentrations13 13 You13 can13 use13 the13 Pmetrics13 function13 PMerrorPoly()13 to13 choose13 the13 best13 set13 of13 coefZicients13 that13 Zit13 the13 data13 from13 the13 laboratory13 13 Alternatively13 if13 you13 have13 no13 information13 about13 the13 assay13 you13 can13 use13 the13 Pmetrics13 function13 ERRrun()13 to13 estimate13 the13 coefZicients13 from13 the13 data13 (see13 151313 below)13 13 Finally13 you13 can13 use13 a13 generic13 set13 of13 coefZicients13 13 We13 recommend13 that13 as13 a13 start13 C013 be13 set13 to13 half13 of13 the13 lowest13 concentration13 in13 the13 dataset13 and13 C113 be13 set13 to13 01513 13 C213 and13 C313 can13 be13 0151 If13 you13 choose13 113 (one13 set13 of13 coefZicients13 for13 all13 subjects)13 you13 will13 then13 be13 presented13 with13 313 additional13

choices1511 Choice13 113 Gamma13 is13 a13 scalar13 to13 capture13 additional13 process13 noise13 related13 to13 the13 observation13

including13 mis-shy‐speciZied13 dosing13 and13 observation13 times13 13 In13 general13 well-shy‐designed13 and13 executed13 studies13 will13 have13 data13 with13 gamma13 values13 approaching13 113 13 Poor13 quality13 noisy13 data13 will13 result13 in13 gammas13 of13 513 or13 more13 13 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 and13 to13 Zix13 gamma13 to13 1

1512 Choice13 213 Choose13 this13 option13 if13 you13 wish13 to13 Zix13 the13 assay13 error13 coefZicients13 to13 values13 either13 in13 the13 data13 csv13 Zile13 or13 as13 speciZied13 in13 item13 1613 but13 to13 estimate13 gamma13 based13 on13 the13 data13 13 This13 is13 the13 usual13 option

1513 Choice13 313 Choose13 this13 option13 if13 you13 wish13 to13 estimate13 the13 assay13 error13 coefZicients13 based13 on13 your13 data13 for13 use13 in13 future13 runs13 13 Although13 you13 can13 access13 this13 option13 by13 using13 either13 ITrun()13 or13 ERRrun()13 in13 R13 the13 instruction13 Ziles13 that13 you13 save13 and13 the13 generated13 output13 Ziles13 will13 be13 different13 13 Therefore13 we13 recommend13 that13 if13 you13 intend13 to13 choose13 this13 option13 use13 ERRrun()13 in13 R13 which13 will13 generate13 an13 ASS000113 Zile13 that13 contains13 the13 estimates13 for13 C013 C113 C213 and13 C313 13 You13 can13 then13 include13 this13 Zile13 in13 the13 working13 directory13 (along13 with13 a13 model13 txt13 Zile13 and13 a13 data13 csv13 Zile)13 to13 do13 an13 IT2B13 run13 supplying13 the13 Zile13 name13 in13 16113 below

Userrsquos13 Guide13 13 2913 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

152 If13 you13 choose13 013 (unique13 coefZicients13 for13 each13 subject)13 you13 will13 be13 presented13 with13 two13 choices1521 Choice13 113 Fix13 gamma13 to13 113 See13 the13 discussion13 above13 in13 15111522 Choice13 213 Estimate13 gamma13 based13 on13 the13 data1523 You13 now13 need13 to13 specify13 where13 to13 obtain13 the13 values13 for13 C013 C113 C213 C313 13 either13 from13 the13 data13 csv13 Zile13

and13 from13 the13 entry13 in13 1613 (Choice13 1)13 or13 on13 an13 individual13 basis13 during13 the13 IT2B13 run113 (Choice13 0)16 Enter13 the13 values13 for13 C013 C113 C213 C313 that13 will13 be13 used13 for13 all13 patients13 who13 do13 not13 have13 values13 associated13 with13 them13

in13 the13 data13 csv13 Zile161 You13 have13 the13 option13 of13 entering13 a13 Zile13 name13 that13 contains13 the13 output13 of13 a13 previous13 estimation13 generated13

by13 choosing13 313 in13 151313 above13 13 Usually13 this13 Zile13 will13 be13 called13 ASS000113 and13 it13 must13 be13 in13 the13 working13 directory

17 After13 assay13 error13 pattern13 and13 estimates13 are13 speciZied13 for13 all13 output13 equations13 enter13 the13 salt13 fraction13 of13 the13 drug13 usually13 113 13 Salt13 fraction13 is13 the13 percentage13 of13 administered13 compound13 that13 contains13 active13 drug13 13 For13 example13 the13 mean13 salt13 fraction13 for13 theophylline13 is13 08513 13 This13 is13 not13 the13 same13 as13 bioavailability13 which13 is13 the13 fraction13 of13 drug13 absorbed13 after13 non-shy‐parenteral13 administration13 (eg13 oral)13 compared13 to13 intravenous13 administration13 13

18 Enter13 the13 convergence13 criterion13 13 When13 the13 difference13 between13 log-shy‐likelihoods13 of13 successive13 iterations13 is13 less13 than13 or13 equal13 to13 this13 criterion13 IT2B13 will13 converge13 and13 terminate13 13 The13 default13 is13 000113 which13 is13 the13 typical13 response

19 Enter13 the13 maximum13 number13 of13 cycles13 13 This13 can13 be13 113 to13 4100013 and13 IT2B13 will13 terminate13 at13 convergence13 or13 the13 number13 of13 cycles13 you13 specify13 here13 whichever13 comes13 Zirst13 13 Early13 in13 model13 exploration13 values13 of13 1013 to13 10013 can13 be13 useful13 with13 larger13 values13 such13 as13 100013 later13 in13 model13 development13 13 In13 order13 to13 facilitate13 model13 comparison13 however13 we13 recommend13 using13 the13 same13 cycle13 limit13 for13 all13 early13 models13 eg13 10013 rather13 than13 choosing13 1013 for13 one13 and13 10013 for13 another13 13

20 IT2B13 can13 pass13 parameter13 ranges13 to13 NPAG13 via13 a13 FROMxxxx13 (usually13 FROM0001)13 Zile13 13 The13 default13 ranges13 to13 be13 used13 in13 NPAG13 are13 513 times13 the13 Zinal13 IT2B13 cycle13 standard13 deviation13 above13 and13 below13 the13 Zinal13 cycle13 mean13 13 If13 your13 parameters13 are13 normally13 distributed13 513 is13 a13 typical13 number13 13 For13 log-shy‐normally13 distributed13 parameters13 313 is13 a13 better13 choice

21 You13 are13 now13 offered13 the13 opportunity13 to13 check13 all13 of13 your13 entries13 for13 correctness13 13 Choose13 113 each13 time13 to13 indicate13 correct13 entries13 or13 013 to13 change13 them

22 Enter13 113 if13 you13 wish13 to13 save13 all13 the13 instructions13 in13 an13 instruction13 Zile13 13 If13 you13 do13 this13 you13 can13 specify13 this13 instruction13 Zile13 in13 Pmetrics13 by13 using13 the13 ITrun(instr=ldquofilenamerdquo)13 option13 and13 including13 ldquoZilenamerdquo13 in13 the13 working13 directory13 with13 the13 model13 txt13 Zile13 and13 the13 data13 csv13 Zile

23 The13 program13 will13 cycle13 through13 your13 subject13 records13 again13 to13 extract13 all13 relevant13 information13 13 This13 can13 take13 some13 time13 if13 the13 population13 is13 large13 or13 individual13 records13 are13 long

24 Specify13 the13 nature13 of13 each13 covariate13 in13 the13 data13 csv13 Zile13 13 Enter13 113 if13 it13 is13 to13 be13 considered13 constant13 between13 measurements13 (eg13 gender)13 or13 213 if13 values13 should13 be13 extrapolated13 between13 observations13 (eg13 creatinine13 clearance)

25 If13 you13 chose13 unique13 assay13 error13 coefZicients13 for13 each13 subject13 in13 1513 above13 you13 will13 now13 specify13 whether13 you13 wish13 to13 use13 coefZicients13 found13 in13 the13 data13 csv13 Zile13 (choice13 1)13 the13 general13 coefZicients13 speciZied13 in13 1613 above13 (choice13 2)13 or13 a13 different13 set13 that13 you13 enter13 manually13 now13 (choice13 0)13 in13 the13 form13 C013 C113 C213 C3

26 Some13 output13 will13 print13 to13 the13 terminal13 window13 which13 contains13 information13 that13 you13 can13 ignore13 while13 running13 IT2B13 from13 Pmetrics13 13 Press13 113 followed13 by13 return13 to13 begin13 the13 IT2B13 analysis

27 The13 IT2B13 run13 can13 complete13 in13 seconds13 for13 small13 populations13 with13 analytic13 solutions13 or13 days13 for13 large13 populations13 with13 complex13 differential13 equations13 13 At13 the13 end13 of13 a13 successful13 run13 the13 results13 will13 be13 automatically13 parsed13 and13 saved13 to13 the13 output13 directory13 13 Your13 default13 browser13 will13 launch13 with13 a13 summary13 of13 the13 run

Userrsquos13 Guide13 13 3013 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

Simulator RunsThe13 simulator13 is13 run13 from13 within13 R13 13 No13 batch13 Zile13 is13 created13 or13 terminal13 window13 opened13 13 However13 the13 actual13 simulator13 is13 a13 Fortran13 executable13 compiled13 and13 run13 in13 an13 OS13 shell13 13 13 It13 is13 documented13 with13 an13 example13 within13 R13 13 You13 can13 access13 this13 by13 using13 the help(SIMrun)13 or13 SIMrun13 commands13 from13 R13 13 In13 order13 to13 complete13 a13 simulator13 run13 you13 must13 include13 a13 data13 csv13 Zile13 and13 a13 model13 Zile13 in13 the13 working13 directory13 13 The13 structure13 of13 these13 Ziles13 is13 identical13 to13 those13 used13 by13 IT2B13 and13 NPAG13 13 The13 data13 csv13 contains13 the13 template13 dosing13 and13 observation13 history13 as13 well13 as13 any13 covariates13 13 Observation13 values13 (the13 OUT13 column)13 for13 EVID=013 events13 can13 be13 any13 number13 they13 will13 be13 replaced13 with13 the13 simulated13 values13 You13 can13 have13 any13 number13 of13 subject13 records13 within13 a13 data13 csv13 Zile13 each13 with13 its13 own13 covariates13 if13 applicable13 13 Each13 subject13 will13 cause13 the13 simulator13 to13 run13 one13 time13 generating13 as13 many13 simulated13 proZiles13 as13 you13 specify13 from13 each13 template13 subject13 13 This13 is13 controlled13 from13 the13 SIMrun()13 command13 with13 the13 include13 and13 nsim13 arguments13 13 The13 Zirst13 speciZies13 which13 subjects13 in13 the13 data13 csv13 Zile13 13 will13 serve13 as13 templates13 for13 simulation13 13 The13 second13 speciZies13 how13 many13 proZiles13 are13 to13 be13 generated13 from13 each13 included13 subjectSimulation13 from13 a13 non-shy‐parametric13 prior13 distribution13 (from13 NPAG)13 can13 be13 done13 in13 one13 of13 two13 ways13 13 The13 Zirst13 is13 simply13 to13 take13 the13 mean13 standard13 deviation13 and13 covariance13 matrix13 of13 the13 distribution13 and13 perform13 a13 standard13 Monte13 Carlo13 simulation13 The13 second13 way13 is13 what13 we13 call13 semi-shy‐parametric13 and13 was13 devised13 by13 Goutelle13 et13 al113 13 In13 this13 method13 the13 non-shy‐parametric13 ldquosupport13 pointsrdquo13 in13 the13 population13 model13 each13 a13 vector13 of13 one13 value13 for13 each13 parameter13 in13 the13 model13 and13 the13 associated13 probability13 of13 that13 set13 of13 parameter13 values13 serve13 as13 the13 mean13 of13 one13 multi-shy‐variate13 normal13 distribution13 in13 a13 multi-shy‐modal13 multi-shy‐variate13 joint13 distribution13 13 The13 weight13 of13 each13 multi-shy‐variate13 distribution13 is13 equal13 to13 the13 probability13 of13 the13 point13 13 The13 overall13 population13 covariance13 matrix13 is13 divided13 by13 the13 number13 of13 support13 points13 and13 applied13 to13 each13 distribution13 for13 samplingLimits13 may13 be13 speciZied13 for13 truncated13 parameter13 ranges13 to13 avoid13 extreme13 or13 inappropriately13 negative13 values13 13 When13 you13 load13 simulator13 output13 with13 SIMparse() 13 it13 will13 include13 values13 for13 the13 total13 number13 of13 simulated13 proZiles13 needed13 to13 generate13 nsim13 proZiles13 within13 the13 speciZied13 limits13 as13 well13 as13 the13 means13 and13 standard13 deviations13 of13 the13 simulated13 parameters13 to13 check13 for13 simulator13 accuracyOutput13 from13 the13 simulator13 will13 be13 controlled13 by13 further13 arguments13 to13 SIMrun()13 13 If13 makecsv13 is13 not13 missing13 a13 csv13 Zile13 with13 the13 simulated13 proZiles13 will13 be13 created13 with13 the13 name13 as13 speciZied13 by13 makecsv13 otherwise13 there13 will13 be13 no13 csv13 Zile13 created13 13 If13 outname13 is13 not13 missing13 the13 simulated13 values13 and13 parameters13 will13 be13 saved13 in13 a13 txt13 Zile13 whose13 name13 is13 that13 speciZied13 by13 outname13 otherwise13 the13 Zilename13 will13 be13 ldquosimoutrdquo13 13 In13 either13 case13 integers13 113 to13 nsub13 will13 be13 appended13 to13 outname13 or13 ldquosimoutrdquo13 eg13 ldquosimout1txtrdquo13 ldquosimout2txtrdquo

Output13 Ziles13 from13 the13 simulator13 can13 be13 read13 into13 R13 using13 the13 SIMparse()13 command13 (see13 documentation13 in13 R)13 13 There13 is13 a13 plot13 method13 (plotPMsim)13 for13 objects13 created13 by13 SIMparse()

PlottingThere13 are13 numerous13 plotting13 methods13 included13 in13 Pmetrics13 to13 generate13 standardized13 but13 customizable13 graphical13 visualizations13 of13 Pmetrics13 data13 13 Taking13 advantage13 of13 the13 class13 attribute13 in13 R13 a13 single13 plot() 13 command13 is13 used13 to13 access13 all13 of13 the13 appropriate13 plot13 methods13 for13 each13 Pmetrics13 object13 classTo13 access13 the13 R13 help13 for13 these13 methods13 you13 must13 query13 each13 method13 speciZically13 to13 get13 details13 for13 plot13 will13 only13 give13 you13 the13 parent13 function13

Object13 Classes Creating13 functions R13 help Description

PMop NPload() ITload() makeOP()

plotPMop Plot13 population13 or13 individual13 Bayesian13 posterior13 predicted13 data13 vs13 observed13 13 Optionally13 you13 can13 generate13 residual13 plots

Userrsquos13 Guide13 13 3113 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

Object13 Classes Creating13 functions R13 help Description

PMZinal NPload() ITload() makeFinal()

plotPMfinal Plot13 marginal13 Zinal13 cycle13 parameter13 value13 distributions

PMcycle NPload() ITload() makeCycle()

plotPMcycle Plots13 a13 panel13 with13 the13 following13 windows13 -shy‐213 times13 the13 log-shy‐likelihood13 at13 each13 cycle13 gammalambda13 at13 each13 cycle13 Akaike13 Information13 Criterion13 at13 each13 cyle13 and13 Bayesian13 (Schwartz)13 Information13 Criterion13 at13 each13 cycle13 the13 mean13 parameter13 values13 at13 each13 cycle13 (normalized13 to13 starting13 values)13 the13 normalized13 standard13 deviation13 of13 the13 population13 distribution13 for13 each13 parameter13 at13 each13 cycle13 and13 the13 normalized13 median13 parameter13 values13 at13 each13 cycle13 13 The13 default13 is13 to13 omit13 the13 Zirst13 1013 of13 cycles13 as13 a13 burn-shy‐in13 from13 the13 plots13

PMcov makeCov() plotPMcov Plots13 the13 relationship13 between13 any13 two13 columns13 of13 a13 PMcov13 object

PMmatrix PMreadMatrix() plotPMmatrix Plots13 raw13 time-shy‐observation13 data13 from13 a13 data13 csv13 Zile13 read13 by13 the13 PMreadMatrix()13 command13 with13 a13 variety13 of13 options13 including13 joining13 observations13 with13 line13 segments13 including13 doses13 overlaying13 plots13 for13 all13 subjects13 or13 separating13 them13 including13 individual13 posterior13 predictions13 (post13 objects13 as13 described13 above)13 color13 coding13 according13 to13 groups13 and13 more

PMsim SIMparse() plotPMsim Plots13 simulated13 time-shy‐concentration13 proZiles13 overlaid13 as13 individual13 curves13 or13 summarized13 by13 customizable13 quantiles13 (eg13 5th13 25th13 50th13 75th13 and13 95th13 percentiles)13 13 Inclusion13 of13 observations13 in13 a13 population13 can13 be13 used13 to13 return13 a13 visual13 and13 numerical13 predictive13 check

Userrsquos13 Guide13 13 3213 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

Object13 Classes Creating13 functions R13 help Description

PMdiag PMdiag() plotPMdiag Plots13 13 an13 npde13 qqnorm13 npde13 histogram13 npde13 vs13 time13 npde13 vs13 prediction13 and13 standardized13 visual13 predictive13 check13 to13 visualize13 results13 of13 simulation13 based13 internal13 model13 diagnostics13 accessed13 with13 the13 PMdiag()13 command

PMpta makePTA() plotPMpta Plots13 superimposed13 curves13 corresponding13 to13 each13 dose13 with13 target13 (eg13 MIC)13 on13 the13 x-shy‐axis13 and13 proportion13 of13 the13 simulated13 time-shy‐concentration13 proZiles13 for13 the13 dose13 with13 a13 target13 statistic13 (eg13 time13 gt13 MIC)13 above13 a13 user-shy‐deZined13 success13 threshold

Examples of Pmetrics plots

plot(PMmatrix13 object)

13

13 plot(PMop13 object)13 plot(PMop13 object13 resid=T)

Userrsquos13 Guide13 13 3313 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

plot(PMJinal13 object)

plot(PMcycle13 object)

Userrsquos13 Guide13 13 3413 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

plot(PMdiag13 object)

plot(PMsim13 object)

Userrsquos13 Guide13 13 3513 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

plot(PMpta13 object)

1 Model DiagnosticsInternal13 Valida1on

Several13 tools13 are13 available13 in13 Pmetrics13 to13 assist13 with13 model13 selection13 13 The13 simplest13 methods13 are13 using13 PMcompare()13 and13 plotPMop()13 via13 the13 plot() 13 command13 for13 a13 PMop13 object13 made13 by13 makeOP() or13 by13 using13 NPload()13 or13 ITload()13 after13 a13 successful13 run13 PMstep()13 is13 another13 option13 for13 covariate13 analysis13 All13 these13 functions13 are13 carefully13 documented13 within13 R13 and13 accessible13 using13 the13 command or13 help(command)13 syntax

To13 compare13 models13 with13 PMcompare()13 simply13 enter13 a13 list13 of13 two13 or13 more13 PMetrics13 data13 objects13 13 These13 should13 be13 of13 the13 NPAG13 or13 IT2B13 class13 made13 either13 by13 using13 NPload()ITload()13 or NPparse()ITparse()13 13 Although13 it13 is13 possible13 to13 compare13 models13 of13 mixed13 classes13 the13 validity13 of13 this13 is13 dubious13 13 The13 return13 object13 will13 be13 a13 data13 frame13 with13 summaries13 of13 each13 model13 and13 key13 metrics13 such13 as13 log-shy‐likelihood13 Zinal-shy‐cycle13 Akaike13 Information13 and13 Bayesian13 Information13 Criteria13 and13 root13 mean13 squared13 errors13 (RMSE)13 for13 observed13 vs13 predictions13 from13 the13 population13 prior13 distribution13 and13 individual13 posterior13 distributions13 13 By13 specifying13 the13 option13 plot=T13 observed13 vs13 predicted13 plots13 for13 all13 the13 models13 will13 be13 generated13 13 The13 option13 to13 generate13 residual13 plots13 of13 prediction13 errors13 described13 next13 can13 be13 speciZied13 with13 the13 additional13 switch13 resid=T13 which13 is13 ignored13 if13 plot=F

As13 an13 option13 to13 plotPMop()13 resid=T13 will13 generate13 a13 residual13 plot13 instead13 of13 an13 observed13 vs13 predicted13 plot13 13 A13 residual13 plot13 consists13 of13 three13 panels13 1)13 weighted13 residuals13 (predicted13 -shy‐13 observed)13 vs13 time13 2)13 weighted13 residuals13 vs13 predictions13 3)13 a13 histogram13 of13 residuals13 with13 a13 superimposed13 normal13 curve13 if13 the13 option13 ref=T 13 is13 speciZied13 (the13 default)13 13 The13 mean13 of13 the13 weighted13 residuals13 (expected13 to13 be13 0)13 is13 reported13 along13 with13 the13 probability13 that13 it13 is13 different13 from13 013 by13 chance13 13 Three13 tests13 of13 normality13 are13 reported13 for13 the13 residuals13 DrsquoAgostino213 Shapiro-shy‐Wilk13 and13 Kolmogorov-shy‐Smirnof13 13 An13 example13 is13 shown13 in13 the13 Plotting13 sectionPMstep()13 will13 take13 a13 PMcov13 Pmetrics13 data13 object13 loaded13 automatically13 with13 NPload()13 or13 ITload() 13 after13 a13 successful13 run13 and13 will13 generate13 P-shy‐values13 for13 the13 relationship13 of13 covariates13 to13 Bayesian13 posterior13 parameter13 values13 13 Covariates13 will13 be13 tested13 in13 a13 step-shy‐wise13 multivariate13 linear13 regression13 with13 forwards13 and13 backwards13 elimination13 using13 the13 step()13 function13 in13 the13 stats13 package13 for13 R13 which13 is13 a13 default13 package13 13 PMstep()13 can13 help13 with13 covariate13 analysis13 although13 it13 only13 performs13 linear13 regressions13 13 It13 is13 possible13 to13 test13 non-shy‐linear13 relationships13

Userrsquos13 Guide13 13 3613 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

using13 capabilities13 of13 R13 and13 the13 PMcov13 object13 for13 example13 with13 the13 nls() function13 for13 non-shy‐linear13 least13 squares13 analysisTwo13 more13 complex13 and13 time-shy‐consuming13 options13 are13 also13 available13 the13 prediction13 discrepancy13 (pd)13 method13 of13 Mentreacute13 and13 13 Escolano13 313 recently13 recast13 as13 a13 standardized13 visual13 predictive13 check13 (SVPC)13 by13 Wang13 and13 Zhang13 413 13 Both13 of13 these13 can13 be13 computed13 from13 the13 same13 simulation13 13 The13 basic13 idea13 is13 that13 each13 subject13 in13 the13 population13 serves13 as13 a13 template13 for13 a13 simulation13 of13 100013 further13 proZiles13 using13 the13 population13 structural13 model13 and13 parameter13 values13 joint13 probability13 distribution13 ie13 together13 the13 ldquopopulation13 modelrdquo13 13 The13 simulated13 proZiles13 are13 compared13 to13 the13 observed13 data13 and13 the13 pd13 is13 generated13 13 The13 command13 to13 generate13 a13 PMdiag13 object13 is PMdiag()13 which13 is13 documented13 in13 R13 13 The13 same13 model13 Zile13 and13 data13 csv13 Zile13 used13 in13 the13 NPAG13 or13 IT2B13 run13 must13 be13 in13 the13 working13 directory13 prior13 to13 executing13 the13 command13 13 Because13 of13 the13 extensive13 simulations13 involved13 execution13 of13 this13 command13 can13 be13 slow13 if13 the13 population13 is13 large13 the13 model13 complex13 the13 time13 horizon13 long13 andor13 the13 number13 of13 observations13 to13 be13 simulated13 per13 proZile13 is13 large13 13 There13 are13 print13 and13 plot13 methods13 for13 PMdiag13 objects13 (printPMdiag()13 and13 plotPMdiag)13 both13 of13 which13 are13 also13 documented13 within13 R13 13 An13 example13 of13 a13 PMdiag13 plot13 is13 shown13 in13 the13 Plotting13 sectionNote13 that13 simulation13 from13 a13 population13 model13 can13 be13 a13 Zickle13 thing13 which13 may13 lead13 to13 errors13 when13 trying13 to13 execute13 this13 command13 13 Parameter13 value13 distributions13 in13 linear13 space13 run13 the13 risk13 of13 simulating13 extreme13 or13 even13 inappropriately13 negative13 parameter13 values13 which13 can13 in13 turn13 lead13 to13 simulated13 observations13 far13 beyond13 anything13 corresponding13 to13 possible13 reality13 13 In13 Pmetrics13 the13 method13 used13 to13 simulate13 from13 a13 prior13 NPAG13 (non-shy‐parametric)13 distribution13 is13 the13 split13 method13 described13 above13 in13 the13 Simulator13 section13 13 Division13 of13 the13 covariance13 matrix13 over13 all13 the13 multi-shy‐variate13 distributions13 in13 the13 multi-shy‐modal13 multi-shy‐variate13 distribution13 mitigates13 the13 problem13 of13 extreme13 values13 13 When13 using13 an13 IT2B13 (parametric)13 unimodal13 multi-shy‐variate13 distribution13 it13 is13 likely13 that13 extreme13 values13 will13 be13 simulated13 13 Mitigating13 techniques13 include13 transformation13 of13 the13 model13 into13 log-shy‐space13 or13 switching13 to13 an13 NPAG13 priorThere13 is13 no13 command13 in13 Pmetrics13 to13 automatically13 generate13 the13 simulations13 necessary13 for13 a13 Visual13 Predictive13 Check13 (VPC)13 in13 contrast13 to13 the13 methods13 described13 above13 13 VPCs13 are13 cumbersome13 when13 models13 include13 covariates13 or13 have13 heterogeneous13 dosingsampling13 regimens13 among13 subjects13 in13 the13 population13 13 It13 is13 nonetheless13 possible13 to13 obtain13 a13 VPC13 and13 numerical13 predictive13 check13 (NPC)13 using13 the13 plotPMsim() 13 command13 via13 plot() 13 on13 a13 PMsim13 object13 made13 with13 SIMparse()13 13 If13 an13 observed13 vs13 predicted13 PMop13 object13 made13 with13 makeOP()13 is13 passed13 to13 plotPMsim() 13 with13 the13 obspred13 argument13 the13 observed13 values13 will13 be13 overlaid13 upon13 simulated13 proZiles13 if13 possible13 and13 an13 NPC13 will13 be13 returned13 in13 addition13 to13 the13 plot13 13 The13 NPC13 is13 simply13 a13 binomial13 test13 for13 the13 percentage13 of13 observations13 less13 than13 the13 quantiles13 speciZied13 by13 the13 probs13 argument13 (00513 02513 0513 07513 09513 by13 default)13 13 The13 simulations13 for13 the13 VPC13 must13 be13 done13 ldquomanuallyrdquo13 using13 SIMrun() and13 extracted13 with13 SIMparse() prior13 to13 plotting13 them13 13 It13 is13 up13 to13 the13 user13 to13 decide13 if13 the13 study13 population13 and13 model13 is13 homogeneous13 enough13 to13 justify13 a13 VPC

External13 Valida1on

Should13 you13 wish13 to13 use13 your13 population13 model13 to13 test13 how13 well13 it13 predicts13 a13 second13 population13 that13 is13 separate13 from13 that13 used13 to13 build13 the13 model13 (ie13 externally13 validate13 your13 model)13 you13 may13 do13 that13 in13 Pmetrics13 13 After13 completing13 an13 NPAG13 run13 place13 the13 same13 model13 Zile13 (located13 in13 the13 inputs13 subdirectory13 of13 the13 NPAG13 run13 whose13 model13 you13 are13 validating)13 along13 with13 your13 new13 (validating)13 data13 Zile13 in13 your13 working13 directory13 13 So13 there13 should13 be13 two13 Ziles13 in13 your13 working13 directory

bull model13 txt13 Uile13 13 This13 will13 be13 the13 same13 as13 for13 model13 building13 NPAG13 run13 found13 in13 the13 inputs13 subdirectorybull data13 csv13 Uile13 13 This13 will13 be13 a13 Pmetrics13 data13 input13 Zile13 containing13 the13 new13 subjects13 for13 validation

13 Next13 do13 the13 following13 steps13 to13 complete13 the13 validation13 NPAG13 run

1 Load13 the13 model13 building13 run13 with13 NPload(run_num1) so13 that13 its13 NPdata13 object13 is13 in13 memory

2 Initiate13 an13 NPAG13 run13 in13 Pmetrics13 as13 usual13 but13 with13 an13 additional13 argument13 to13 specify13 the13 model13 density13 Zile13 which13 wi l l13 serve13 as13 a13 non-shy‐un i form13 pr ior 13 e g 13 NPrun(model=ldquomymodeltxtrdquo data=rdquovalidationcsvrdquo prior=NPdata1 cycles=0) where13 NPdata113 is13 and13 example13 of13 13

Userrsquos13 Guide13 13 3713 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13

the13 object13 loaded13 in13 step13 113 in13 this13 case13 with13 NPload(1)13 13 13 Specifying13 013 cycles13 will13 calculate13 a13 Bayesian13 posterior13 only13 for13 each13 subject13 in13 the13 validation13 data13 set

3 Complete13 the13 NPAG13 run13 as13 usual4 Load13 the13 results13 with13 NPload(run_num2)13 and13 plot13 etc13 as13 usual

References1  Goutelle13 S13 et13 al13 Population13 modeling13 and13 Monte13 Carlo13 simulation13 study13 of13 the13 pharmacokinetics13 and13

antituberculosis13 pharmacodynamics13 of13 rifampin13 in13 lungs13 Antimicrob13 Agents13 Chemother13 53 13 2974ndash298113 (2009)

2 DAgostino13 R13 Transformation13 to13 Normality13 of13 the13 Null13 Distribution13 of13 G13 113 Biometrika13 5713 679ndash68113 (1970)3  Mentreacute13 F13 amp13 Escolano13 S13 Prediction13 discrepancies13 for13 the13 evaluation13 of13 nonlinear13 mixed-shy‐effects13 models13 J13

Pharmacokinet13 Pharmacodyn13 3313 345ndash36713 (2006)4 Wang13 D13 D13 amp13 Zhang13 S13 Standardized13 visual13 predictive13 check13 versus13 visual13 predictive13 check13 for13 model13 evaluation13

J13 Clin13 Pharmacol13 5213 39ndash5413 (2012)13

Userrsquos13 Guide13 13 3813 13