warwick.ac.uk/lib-publications
Original citation:
Toumazi, A., Comets, E., Alberti, C., Friede, T., Lentz, F., Stallard, Nigel, Zohar, S. and Ursino,
M. (2018) dfpk : An R-package for Bayesian dose-finding designs using Pharmacokinetics (PK)
for phase I clinical trials. Computer Methods and Programs in Biomedicine, 157. pp.
163-177. doi:
10.1016/j.cmpb.2018.01.023
Permanent WRAP URL:
http://wrap.warwick.ac.uk/98032
Copyright and reuse:
The Warwick Research Archive Portal (WRAP) makes this work of researchers of the
University of Warwick available open access under the following conditions.
This article is made available under the Attribution-NonCommercial-NoDerivatives 4.0 (CC
BY-NC-ND 4.0) license and may be reused according to the conditions of the license. For
more details see:
http://creativecommons.org/licenses/by-nc-nd/4.0/
A note on versions:
The version presented in WRAP is the published version, or, version of record, and may be
cited as it appears here.
ContentslistsavailableatScienceDirect
Computer
Methods
and
Programs
in
Biomedicine
journalhomepage:www.elsevier.com/locate/cmpb
dfpk:
An
R-package
for
Bayesian
dose-finding
designs
using
pharmacokinetics
(PK)
for
phase
I
clinical
trials
A.
Toumazi
a,
E.
Comets
b,c,
C.
Alberti
d,
T.
Friede
e,
F.
Lentz
f,
N.
Stallard
g,
S.
Zohar
a,1,
M.
Ursino
a,1,∗aINSERM,UMRS1138,Team22,CRC,UniversityParis5,UniversityParis6,Paris,France bINSERM,CIC1414,UniversityRennes-1,Rennes,France
cINSERM,IAMEUMR1137,UniversityParisDiderot,Paris,France
dINSERM,UMR1123,HôpitalRobert-Debré,APHP,UniversityParis7,Paris,France eDepartmentofMedicalStatistics,UniversityMedicalCenterGöttingen,Göttingen,Germany fFederalInstituteforDrugsandMedicalDevices,Bonn,Germany
gStatisticsandEpidemiology,DivisionofHealthSciences,WarwickMedicalSchool,TheUniversityofWarwick,UK
a
r
t
i
c
l
e
i
n
f
o
Articlehistory: Received30June2017 Revised11January2018 Accepted24January2018
Keywords: Dose-finding
Maximumtolerateddose Pharmacokinetics PhaseIclinicaltrials Rpackage
a
b
s
t
r
a
c
t
Backgroundand objective: Dose-finding, aimingatfinding the maximumtolerateddose, and pharma-cokineticsstudiesarethefirstinhumanstudiesinthedevelopmentprocessofanewpharmacological treatment.Intheliterature,todateonlyfewattemptshavebeenmadetocombinepharmacokineticsand dose-findingandtoour knowledgenosoftwareimplementationis generallyavailable. Inprevious pa-pers,weproposedseveralBayesianadaptivepharmacokinetics-baseddose-findingdesignsinsmall pop-ulations.Theobjectiveofthisworkistoimplementthesedose-findingmethodsinan
R
package,calleddfpk
.Methods: AllmethodsweredevelopedinasequentialBayesiansettingandBayesianparameter estima-tioniscarriedoutusingthe
rstan
package.Allavailablepharmacokineticsandtoxicitydataareusedto suggestthedoseofthenextcohortwithaconstraintregardingtheprobabilityoftoxicity.Stoppingrules arealsoconsideredforeachmethod.Theggplot2
packageisusedtocreatesummaryplotsoftoxicities orconcentrationcurves.Results: Forallimplementedmethods,
dfpk
providesafunction(nextDose
)toestimatetheprobability ofefficacyandtosuggestthedosetogivetothenextcohort,andafunctiontoruntrialsimulationsto design atrial (nsim
). Thesim.data
functiongeneratesateachdose thetoxicity valuerelatedto a pharmacokineticmeasureofexposure,theAUC,withanunderlyingpharmacokineticonecompartmental modelwithlinearabsorption.It isincludedasanexamplesincesimilar data-framescanbegenerated directlybytheuserandpassedtonsim
.Conclusion: Thedevelopeduser-friendlyRpackage
dfpk
,availableontheCRANrepository,supportsthe designofinnovativedose-findingstudiesusingPKinformation.© 2018TheAuthors.PublishedbyElsevierB.V. ThisisanopenaccessarticleundertheCCBY-NC-NDlicense. (http://creativecommons.org/licenses/by-nc-nd/4.0/)
1. Introduction
Dose-findingstudiesandpharmacokinetics(PK)arecarriedout atthefirstphasesofclinicalevaluationofanewdruginhumans. Drug safetyisevaluatedin thedose-findingstudy,whichaims at identifyingthemaximumtolerateddose(MTD)[1].Meanwhile,the
∗ Correspondingauthor..
E-mailaddress:[email protected] (M.Ursino).
1Thelasttwoauthorscontributedequallyasco-seniorauthors.
PKdatacollectedduringsuchstudyprovidesthedescriptionofthe dose-concentration relationships[2]. Nevertheless, these two ap-proaches are oftenconductedandreported independently in dif-ferentsectionsinpublicationsreportingtrialresults[3].Identifying therightdoseorsetofdosesatanearlystageiscrucial:selecting too toxic doses can result in patient overdosing, while selecting an inefficientdose increasesthe likelihood that the drug willbe found to be ineffectivein subsequentclinical evaluation [4]. Par-ticularlyinthecaseofsmallpopulations,suchasrarediseasesor paediatrics, itshould beusefulto take intoaccount all the
infor-https://doi.org/10.1016/j.cmpb.2018.01.023
mationcollectedduringthetrial,andtotrytoutilizethePK mea-surementswithinthedose-findingdesign.Onlyfewattemptshave beendescribed inthe literature so far and, usually,the methods were built fora very specific situation [5–8]. Moreover, no soft-wareimplementationsarepubliclyavailable.
In thisarticle wepresent thenewR package
dfpk
(short for dose-findingPharmacokinetics),whichprovidestheBayesian adap-tivePK-baseddose-findingdesigns insmallpopulations proposed byUrsinoetal.[8]throughthefreelyavailableRsoftware[9].The sixmethods detailedin[8]havebeenimplementedindfpk
.For eachofthem,twofunctionsareprovided: (i) afunctionto deter-mine the next recommended dose (during the trial) or the rec-ommended MTD (at the end of the trial) and (ii) a function to runsimulations of phase Istudies to designa newtrial. Interac-tive graphicalrepresentations ofthe dose-concentration curve, of thedoseallocationprocessinthetrialandofthedose-toxicity re-sponsearealsoprovidedbythepackage.Thepaperisorganisedasfollows.Section2introducesthe sta-tisticalmethodsproposed byUrsinoetal.[8],alongwiththe de-scriptionofthesuggestedscenariostobesimulated.Section3 out-linesthe structure ofthe package andthe main functionsof the paper(
sim.data
,nextDose
andnsim
)withpracticalexamples. Section4&5includeconclusion,discussionandrecommendations.2. Computationalmethods
The presentsection briefly reviews the methods proposed by Ursino et al. [8]to perform dose-finding takinginto account PK measurements.Wethendescribethescenariossimulatedin[8]in orderto evaluatetherobustnessofthemethod,whichhavebeen addedasexamplesinthedfpkpackage.
2.1.Dose-findingmethods
Let D=
{
d1,...,dk}
be the set of K possible doses withd1<<dkandd[i]∈Dbethedoseadministeredtotheithsubject (i=1,...,n,wherendenotesthesamplesize)andyibeabinary variablewhichtakesvalue 1iftheithsubjectshowsaDLT (dose-limitingtoxicity)and0otherwise.Moreover,letzibethelogarithm oftheareaunderthecurve(AUC)oftheconcentrationsofdrugin bloodplasmaagainsttime,fortheithpatient.
All methods share the same fundamental idea for the dose-escalation rule: the dose chosen for the next cohort enrolled is the one with probability of toxicity nearest to the target
θ
se-lected by the trial investigators. A no-skipping rule is given: if some doses have not yet been tested, the dose is chosen fromD∗⊂D,a subset ofD whichcontainsall the dosesalready evalu-atedandthe firstdoselevelimmediatelyabove.Thefinal recom-mendedMTD isgiven bythe dosethat wouldhavebeen admin-isteredfor the
(
n+1)
st subject enrolledin the trial.Finally, we addedinallmethodsthesamestoppingrule:iftheposterior prob-abilityoftoxicityofthefirstdoseisgreaterofaspecified thresh-old,thennodoseissuggestedandthetrialisstopped.Eachmethodisseparatedfromtheothers.Weadoptedthe con-ventionofstartingthesubscriptionof
β
parameterfrom0foreach method.Therefore,evenifthe parametersshare thesamenames acrossmodels,theyhavedifferentinterpretations.Inthefollowing, webrieflydescribehowtheprobabilityoftoxicityisestimatedand computedineachmethod.2.1.1. PKCOV
PKCOVisamodificationofthemethodproposedbyPiantadosi andLiu[5]whosuggestedtousetheAUCasacovariateforpT,the probabilityoftoxicity, throughthelogit link.Therefore,the
dose-toxicitymodelis
logit
(
pT(
dk,zdk,β
)
)
=−β0
+β1
log(
dk)
+β2
zdk
∀
dk∈D, (1)where
β
=(
β
1,β
2)
,β
0 isaconstantselectedthroughasensitivity analysisorwithpriorinformation,zdkisthedifferencebetween thelogarithmofpopulationAUCatdosedkandz,thelogarithmof AUCofthesubjectatthesamedose.Independentuniform distri-butionsareselectedaspriordistributionsfor
β
1andβ
2.Indetail,β
1∼U(
max(
0,m1−5)
,m1+5)
,wherem1reflectstheprior infor-mationontheparameterandthelengthofthedomainofthe dis-tributioncangoupto10,andβ
2∼U(0,5).Bothβ
0andm1should beselectedusingprior information,such asfrompreclinicaldata, and sensitivity analysisshould be done. The estimated probabil-ityof toxicity versus doseis obtained by invertingEq. (1),usingβ
1=β
ˆ1,theestimatedparameter,andzdk=0.
2.1.2. PKLIMandPKCRM
PKLIM isa modification ofthe methodproposed by Patterson etal.[6]andWhiteheadetal.[10].AnormalPK-toxicitymodelis used:
zi
|
β
,ν
∼Nβ0
+β1
logdi,ν
2, (2)
where
β
=(
β
0,β
1)
are the regression parameters, andν
is the standard deviation. A bivariate normal distribution and a beta distribution are chosen forβ
andν
, respectively, that is,β
∼ N(
m,ν
2(
g))
andν
∼Beta(1,1).Therefore,ahierarchicalprior dis-tributionisgiventoβ
,wherem=(
−logClpop,1)
andgshouldbe chosenusingpriorinformation.Forinstance,Clpopdenotesthe at-tendedvalueoftheclearanceatpopulationlevel,andgreflectsthe precision. Theprobability oftoxicity ofeachdoseiscomputedasP
(
z>L|
dk,β
=β
ˆ,ν
=ν
ˆ)
∀
dk∈D, (3)whereLisathresholdsetbeforestartingthetrialandthehat de-notestheposteriormeansoftheparameters.Sinceanassumption underlyingthemodelisthatDLTsarebasedontheAUCexceeding some threshold,the methodcould be applicable only when such a thresholdisknown.In ordertoavoidthisproblem, thePKCRM methodwasproposed,whichisthecombinationofPKLIMandthe CRM[11] usingapower workingmodelandnormalprior onthe parameter.InPKCRMthedoserecommendedforthenextsubject isthelowestofthedosesrecommendedbythetwomethods.
Notethat although the samenotationhas beenused for con-venience,theparameters
β
0 andβ
1 are differentinthedifferent models.2.1.3. PKLOGIT,PKPOP,PKTOX
PKLOGIT,inspiredbyWhiteheadetal.[7],combinestwo regres-sions to compute the probability oftoxicity versus the dose. The firstoneisthesameasEq.(2),thatiszversusdose.Inthesecond,
z isusedasacovariateina logisticregressionmodelforpT.This meansthatnowtheprobabilityoftoxicityisdescribedintermof AUCandnotanymoreintermofdose.Therefore,wehavethat
logit
(
pT(
z,β
))
=−β
2+β
3z, (4)where
β
2 andβ
3 have independent uniform prior distributions, thatis,β
2∼U(0,m2) andβ
3∼U(0,m3),withm2≥m3,andvalues can bechosen usingprior information.Ifnoinformationis avail-able,m2=20andm3=10aregoodstartingvaluesfora sensitiv-ityanalysis.The probability oftoxicity associatedwith eachdose isobtainedby usingthe estimatedparametersofeach regression modelinthefollowingexpectedvalueformula:P
(
y=1|
dk,β
=β
ˆ,ν
=ν
ˆ)
=E 11+eβˆ2−βˆ3z
=
1
1+eβˆ2−βˆ3z
where g(z) represents the distribution of the logarithm of AUC giventhedosedkobtainedfromEq.(2).
PKPOP,avariationofPKLOGIT,arisesbyreplacingzwithzk,pop inEq.(4),wherezk,popisthemeanvalueofthelogarithmofAUC atdosedkpredictedbyEq.(2).Inotherwords,wereplacethe ob-servedAUCvalue forthepatientwiththepopulationmeanvalue. Then, theprobability oftoxicityateach doseiscomputed invert-ing Eq.(4),usingtheestimatedparameters
β
ˆ2 andβ
ˆ3 along withzk,poppredictedbyEq.(2).
PKTOXisessentiallythePKLOGITmethodwithaprobit regres-sionmodelreplacingthelogisticregressioninEq.(4),thatis
pT
(
z,β
)
=(
−β2+β3
z)
, (6)with
represents the standard cumulative normal distribution. As intheprevious models,independentuniformdistributions are chosen as prior distributions for the parameters. The probabil-ity oftoxicity versus doseis then computedin the sameway of Eq.(5)usingtheprobitregressioninsidetheintegral.
2.1.4. DTOX
DTOX follows the usual wayof estimating pT versus dose di-rectlywithoutthePK measurementsandisincludedtocheckthe behaviourofthisstandardmethod.Thedose-toxicitymodelis:
pT
(
dk,β
)
=(
−β0+β1
log(
dk))
∀
dk∈D. (7)Independentuniformbivariatepriordistributionischosenfor
β
in thesamewayofEq.(4).2.2. Simulatingdatafortrialdesign
Thepackageimplementsseveralexamplesreproducingthe sce-nariosproposedinUrsinoetal.[8]toevaluatethemethod perfor-manceusingsimulateddata.Inthesesettings,toxicityislinkedto a PK measure ofexposure,namely toAUC, andwe useda simu-lation settingsimilar to the one in[12].A first orderabsorption, linear,one compartmentPK modelwasusedtosimulatePKdata. Inthismodel,theconcentrationattimetafteradministrationofa dosedkofthedrugattime0,canbe writtenasa functionofka, theabsorptionrateconstantfororaladministration,CL,the clear-ance ofelimination, andV,thevolumeofdistribution,asfollows:
c
(
t)
=dkV ka
ka−CL/V
e−(CL/V)t−e−kat
, (8)
IndividualCLandVare sampledfromlog-normaldistributions withmeanCLpop
(
Lh−1)
andVpop(L),respectively,andstandard de-viationω
CL=ω
V,while ka isfixed inthis studyaslimited infor-mationconcerningtheabsorptionphasewasavailableinthe orig-inaldataset toestimate its inter-individualvariability.In orderto link PK to the toxicity profile of patients, a sensitivity parame-terα
,comingfromalog-normaldistributionwithmeanequalto 1 andstandard deviationω
α, anda thresholdτ
T are introduced. Weassumedthatapatient incursadoselimitingtoxicity(DLT)ifα
AUC≥τ
T.Choosingthedifferentparameters leadstoseveral sce-narios.Theprobabilityoftoxicityiscomputedas:pT
(
dk)
=logdk−log
τ
T−logCLω
2 CL+ω
2α. (9)
3. R-functions
Package
dfpk
implements all the dose-finding methods de-scribed inSection 2. InFig.1,an overallexplanation ofthemain functions inthedfpk
package is given. The aim of the package is to assist the design ofphase I clinical trials. During the trial, the patient data already accrued (“Trial data” in Fig. 1A) can be used in thenextDose
function in order to determine the nextFig.1. OverallpresentationofthemainRfunctionsnextDose(Fig.1A)andnsim (Fig.1B)availableinthepackagedfpk,indicatingthecorrespondinginputsand out-puts.
recommended dose, or the MTD at the end of trial. Plots are alsoavailable aftertheestimationprocess. Whenplanninga new trial, datasets containing PK and toxicity measurements can be simulateddirectly by the user (“Simulated data”) or through the
sim.data
function,andused inthensim
function (inFig. 1B.), which will perform n simulated clinical trials. Also in this case, plotswithgraphicalrepresentationssupportthenumericresults.Bayesianparameterestimationiscarried outusingthe
rstan
packagewhilethe
ggplot2
packageisusedtocreateplots.Three S4 classesare implemented in thepackage, “dose” ,“dosefinding”and“scen”,inorderto store theoutputs ofthe mainR functions
nextDose
,nsim
andsim.data
,respectively.Theclassesare de-taileddescribedintheAppendixB.Thepackage
dfpk
isavailableontheCRANarchiveandcanbe easily installed on the fly through the URL https://cran.r-project. org/web/packages/dfpk. Once the package is installed, it can be loadedwiththecommand:Table1
ArgumentsforthefunctionsnextDoseandthedose-findingmodels.
model Thedose-findingmodelchosenbetween“pktox”,“pkcov”,“pkcrm”,“pklogit”, “pkpop” and“dtox”.
y Abinaryvectoroftoxicityoutcomesfrompreviouspatients.
AUCs AvectorwiththecomputedAUCvaluesofeachpreviouspatientforPKTOX, PKCRM,PKLOGITandPKPOP.
doses Avectorwiththedosespanel.
x Avectorwiththedoselevelassignedtopreviouspatients. theta Thetoxicitytarget.
options ListwiththeStanmodel’soptions.
prob Thethresholdoftheposteriorprobabilityoftoxicityforthestoppingrulein theselectedmodel;defaultsto0.9.
betapriors Avectorwiththevalueforthepriordistributionoftheregressionparameters intheselectedmodel.
thetaL AsecondthresholdofAUCinthePKCRMmodelonly;defaultstothetafor PKCRMandNULLforthemodelsPKTOX,PKCOV,PKLOGIT,PKPOP&DTOX. p0 TheskeletonofCRMforPKCRM;defaultstoNULL.
L TheAUCthresholdtobesetbeforestartingthetrialforPKCRM;defaultsto NULL.
deltaAUC Avectorofthedifferencebetweencomputedindividualpreviouspatients’AUC andtheAUCofpopulationatthesamedoselevel(definedasanaverage); argumentforPKCOV;defaultstoNULL.
CI Alogicalconstantindicatingtheestimationofthe95%credibleintervals(CI)of theprobabilityoftoxicityateachdoselevelfortheselectedmodel;defaults toTRUE.
Table2
Inputargumentsrequiredbyeachdose-findingmethodinthenextDosefunction.
Method Requiredarguments Optionalarguments
pktox y,AUCs,doses,x,theta,prob,options,CI betapriors pkcov y,AUCs,doses,x,theta,deltaAUC,prob,options,CI betapriors pkcrm y,AUCs,doses,x,theta,p0,L,prob,thetaL,options,CI betapriors pklogit y,AUCs,doses,x,theta,prob,options,CI betapriors pkpop y,AUCs,doses,x,theta,prob,options,CI betapriors dtox y,doses,x,theta,prob,options,CI betapriors
3.1.Dose-findingmethods(
nextDose
)The
nextDose
functionisusedtoperformparameterestimationateachstepduringadose-findingtrial.It givestherecommended dosetoadministertothenext cohortofpatients, orthefinal estimatedMTD ifappliedattheendofthetrial.Itcan beusedduringan ongoingclinicaltrialorwithasimulateddataset,asdescribedlaterintheSection3.2.The description ofthe input argumentsused in the
nextDose
functionare provided in Table1. Theuser hasto choosethe dose-finding methodfrom the available set in themodel
parameter. Then, he/she should provide the parameters required by the selected method,asspecifiedinTable2,whiletheothersaresetautomaticallytoNULL.Anyargumentnotspecifiedbytheuserwillbesettothe correspondingdefaultchoice[8].The numberofchainsanditerationsforthe Bayesianalgorithmcan bechanged usingtheappropriaterstan
options.3.1.1. Demonstration
Othernecessaryinputargumentsarethevectorofdoselevelsassignedtothepatients(asintegervector),thatisdenotedby
x
,the AUCsvaluesandthevectoroftoxicityoutcomes(0/1areaccepted),denotedasy
,foreachenrolledpatient.Theusercanchangethepriordistributionparameterofthetoxicity-AUCregressionbyaddingtheparameter
betapriors
.Ifitis notspecified,thevaluesuggestedbyUrsinoetal.[8]areusedbydefault.ThedefaultchoicesofbetapriorsforPKTOXmodelarethefollowing:
β
|
ν
∼N(
m,ν
×g×diag(
1,1)
)
,ν
∼Beta(
1,1)
,m=
−logCLpop,1
,β
2 ∼U(
0,beta2mean)
,β
3 ∼U(
0,beta3mean)
, (10)whereClpop isthepopulation clearanceandthedefaultchoicesareClpop=10,g=10000,beta2mean= 20andbeta3mean= 10. Detailsaboutthedefaultchoicesofallthedose-findingmodelsareavailableintheuser-manualontheCRAN.
Theseargumentsareusedinthe
nextDose
functiondependingonthechosenmodel,PKTOX,usingthefollowingsyntax:omittingalldefaultparameters.
Theresultsarestoredina“dose”object.Theoutputbelowreportspartoftheresultsdisplayed,thatisthenumberofpatientswho arecurrentlyenrolled,theselecteddose-findingmodel,andtheobserveddoselevelsofthedrug:
Accordingto theseresults,thenext recommendeddoselevelis5,whichwouldbe thedoseforthenext cohortofpatientsgiven thedata.Theestimatedtoxicityprobabilitiesandmodelparametersarealsoshown:
The packagealso providesa graphicalrepresentationof theresults.Forexample,usingthe genericfunction
plot()
on a “dose”object,wecanselectifwewanttopresentgraphically:(1)thedoseallocationofthecurrentlyenrolledpatientsduringthetrialor (2)theposteriordistributions oftheprobability oftoxicityateachdosepresentingtheestimationalongwiththelinesofthe95% credibleintervals(CI),asbelow:
Fig.2presents(A)thedataforthefirst15patientsinthestudy,and(B)theplotoftheposteriordistributions giventhisdata of theprobabilityoftoxicityateachdoseaccordingtothePKTOXmethod(includingthemeanestimationalongwiththe95%CI). (B) PKCRMmodel
Fig.2. (A)Plotofthedataforthefirst15patientsinthestudyand,(B)theplotoftheposteriordistributionsgiventhisdataoftheprobabilityoftoxicityateachdose accordingtothePKTOXmethod(includingthemeanestimationalongwiththe95%CI).
method (i.e.y,AUCs, doses,x, theta, options), thePKCRMmethod requirestheskeleton ofCRM (
p0
) andtheAUC threshold(L
), whichmustbesetbeforestartingthetrial.Inthisexampleweuse:AftersettingalltherequiredargumentsforthechosenPKCRMmodel,wecallthenextDosefunctionasfollowing:
Theresultingobjectdisplaysasfollows:
3.2.
Generate
data
(sim.data)
Inparticular,itstartsbydrawingsubject’sPK parameters(kα,CLandV) fromthe populationdistributionsdefinedbythepopulation mean(
PKparameters
) andtheinter-individualvariability(IIV)fortheclearanceandthevolumeofdistribution(omegaIIV
). Then,for each doselevel(doses
), wecomputed thedesiredprobability oftoxicity (preal
), andforall patients(N
) andsimulateddata (TR
),it computestheconcentrationmeasurementsatthespecifiedtimepoints(timeSampling
).Inaddition,weaddaproportionalerrordrawn from a normaldistribution withzero mean anda standard deviationsigma
. Accordingto eq. (9), the function computesthe toxicity valuesforeachdoselevelusingthethresholdlimitTox
andthepatient’ssensitivityparameteromegaAlpha
.Finally,adefaultvalueof therandomnumbergenerator(seed
)issetat190591.Theresultsarestoredinalistof“scen”objects,whichconsistsof
PKparameters
,nPK
,thelengthofthetimepoints,timeSampling
,idtr
,N
,doses
,preal
,limitTox
,omegaIIV
,omegaAlpha
,concentration
, the concentration computed at the PK population values,concPred
,theconcentration valueswithproportional errorsforeach patientateach dose,tox
,tab
,a summarymatrix,used inthesimulationfunction,containingthesamplingtimepointsatthefirstrowfollowedbyconcPred
,parameters
,thesimulatedPK parameters ofeach patient,alphaAUC
,theα
AUCs. Since we are usingS4 classes,theusercan easily createhis/herown datasets. For example,he/shecancreateanewobjectforeachsimulatedtrial,namedUserData
,usingthecommandnew
inthefollowingwayandthen add itin alist, alongwiththe other simulateddatasets.A moreexpanded descriptionofthe “scen”class andobjectscan be accessedfromAppendixB2.
3.2.1. Demonstration
Thefollowingillustrationshowshowtogeneratethedatasetsofthefirstscenariodescribedby Ursinoetal.[8].Inthisexample,we setthenumberoftrialsto10(i.e.
TR
=10),thethresholdoftoxicityvalueto10.96,thedoselevelsto(12.6,34.655,44.69,60.807,83.689 and100.371mg)whichareusedtoobtainthetrueprobabilitiesoftoxicity,48evenlyspacedsamplingtimepointsbetween0and48h,a samplesizeof30andka=2,CL=10andV =100asillustratedbelow:Fig.3. Plotoftheconcentrationofthedrugvstimefor12.6,34.65,44.69,60.8,83.69and100.37mgwithka=2h1,CL=10Lh1andV=100L.
Inthisexample,weused
α
=1forallpatients,buttheusercansimulateα
fromalog-normaldistributionwithmean=1andstandard deviationω
α.Selectingω
α=0impliesα
=1asinthisexample.Onceagain,providingtheselectedlistofthegenerated“scen”objecttothegenericplotfunction
plot
,theuserobtainsaplotofthe drug’sconcentrationintheplasmaagainstthetimet.Underthesamesettingsandoutputsasabove,theplotisimplementedasfollows: Fig.3presentsthePKconcentration curves,describedinSection 2,withthePK parameterskα=2h−1,CL=10Lh−1 andV=100Lfor the6doses(12.6,34.65,44.69,60.8,83.69and100.37mg).3.3. Dose-findingsimulation(
nsim
)In additiontotheinput argumentsof
nextDose
,thensim
function hasthe followingadditionalarguments:(i)N
,thetotalsample sizepertrial,(ii)cohort
,thecohortsize,(iii)TR
,thetotalnumberoftrialstobesimulated,(iv)simulatedData
,alistforeachtrial containingprevioussimulateddatasetsasin3.2.1,(v)icon
,avectorcontainingtheindexofrealbloodsamplingthatenablestheuserto useallconcentrationpoints,previouslysimulated,oronlyasubsetofthemand(f)AUCmethod
,astringnumberspecifyingtheestimation methodforAUC; validchoicesare1fora“compartmental method” (see[8]fordetails)and2fornon-compartmentalmethod(defaults to2).TheestimatedAUCforeachpatientiscomputedinsidethefunctionnsim
,usingonlytheconcentrationsamplesselectedbyicon
. Bydefault,allsimulatedsamplesareused.SimilarlytothenextDose
function,theuserneedstochooseoneofthedose-findingmodels whichareavailableinthepackage.3.3.1. Demonstration
Asanexample,10trials(i.e.
TR
=10)weresimulatedwith30patients(i.e.N
=30)pertrial,usingthefunctionnsim
.Atthebeginning, thesimulatedData
isdefined(inthiscase,weusethesimulateddatagen.scen
generatedintheSection3.2.1),representingthetrue toxicityprobabilitiesofeachtrial,wheresixdoselevelsareconsidered.Thedoselevelsshouldbeenteredinavector,asfollows:Thetargettoxicityprobability
theta
issetto0.2,meaningthattheMTDisdefinedasthedoseforwhichatmost20%ofdoselimiting toxicity(DLT)responsesoccur.Forthisexample,thePKTOXmethodisselectedandthe95%CIoftheprobabilityoftoxicityateachdose ischosentobeestimatedandincludedintheresultssincetheinputargumentCI
issettoTRUE
.SinceoursimulationusesStanmodels, wealsoneedtospecifythemodel’soptions,asalist,containingthenumberofchains,howmanyiterationseachchainwilluseandthe numberofwarm-upiterations.Thedefaultchoiceis:After settingtheindexofrealbloodsampling(i.e.
icon
)andenteringthecorrespondingmodel’sinputparameters,wecallthensim
functionasfollowing:
Basedontheaboveexample,thenextrecommendeddoselevel is4mgwithapercentageofMTDselectionequalsto60%.
The MTD,toxicity responsesaswell asthedoseescalation for eachtrialcanbeobtainedasfollows:
Thegenericfunction
plot()
canbeusedinordertoillustrate the doseescalation duringthe trialorthe dose-toxicityresponse for each dose level. The main input argument is a “dosefinding”object.The simulation output canbe shown graphicallywiththe command:
where
TR
representsthe numberoftrial(defaults toTR= 1) for whichwe wanttoplotthegraph,CI
indicatesifthesimulation’s resultsincludethe estimated95% oftheprobability oftoxicity or not (defaultstoCI
=
TRUE
) andask
representstheplot selec-tion index(defaultsto ask= TRUE)showinga selection menuas above:the usershould enter1 tosee thedoseescalation alloca-tion of the selected trial, 2 to create a boxplot of the sampling distribution oftheprobability oftoxicity ateach doseinthe end ofthetrialoverthetotalnumberoftrials,and3toplotthefinal posterior distributions ofthe probability oftoxicity ateach dose (the plotincludes theestimation alongwiththe linesof the95% CI for theselected trial). 0 is the command to exitand 2 isthe defaultchoicefortheinputask
.Notethat,ifthesimulation’s re-sults don’t include the 95% CI of probability of toxicity then the selectionmenucontainsonlythefirsttwochoices.Fig.4(A)showsthedoseallocationplotbasedonourexample, wherethenon-toxicity responseisrepresentedasacircleandthe toxicityresponseasacross.Inaddition,Fig.4(B)and4(C)present the output plot choosing, in the menu, 2 and 3, respectively. In Fig. 4(C),the 95% CIandprior probabilities oftoxicity are repre-sentedasdotted anddashedlines,respectively. The reddot-dash lineinthelasttwoFiguresrepresentsthetoxicitythresholdwhich isusedfortheselectionoftheMTD.
Notethat, sincetheBayesianmodelsareimplementedinStan, running simulations can take very long time. Moreover, simula-tionsincludingtheestimationofthe95%credibleintervals(CI)for probability of toxicity at each dose level (i.e.
CI
=
TRUE
), can take moretime than excluding them (i.e.CI
=
FALSE
). Inthis case,torunthe10trialsincludingthe95%CIofprobabilityof tox-icity,about30minareneededonasingleportablecomputerwith anIntelCorei5.Instead,tosimulateonlytheMTDunderthesame settings,withoutestimatingthe95%CI,about18minarerequired onthesamecomputer.Amoreexpandedcomparisonofthensim
functionandfor1,000simulatedtrials,whichisoftenusedforthe simulation studies in the literature of dose-finding methods, are showninAppendixA.However,wesuggest torun simulationson adedicatedserver.
4. Conclusion
The
dfpk
packageimplementsnovelmethodsfordose-finding phase I clinical trials incorporating PK in the dose-toxicity rela-tionships[8]. In thispackage, each method can be used during a prospectiveadaptive trial,where the doseforthe next cohort of patientsdependsontheoutcomesofthe previouscohorts, in or-dertoestimatetherecommendeddoseforfurtherclinicaltrials.It can alsobe used to performsimulations beforethe beginning of trialinordertostudytherobustnessofthemethodtothe differ-entparameterssettingchoices.Running simulationsisalsouseful tocalibratesome parameters,butittakestime,thereforewe sug-gesttorunsimulationsonadedicatedserver.Thepackage isuser-friendly andseveralflexibleinputsare al-lowed:forinstancetheusercangeneratebyher/himselfscenarios (simulated datasets)and pass them on to the function
nsim
, or changethehyper-prior parametersoftheprior distributions used inthe Bayesian regression.The package will also be updated ac-cordingusersuggestionsandneeds.5. Discussion
Designing early phase clinical trials is of crucial importance, since all future steps in the clinical development orfailures de-pendonthesefirstresults.Statisticalcomputer programs,suchas
R
,facilitatedesignandthecheckingofperformance through sim-ulations.Anexampleofexisting Rpackagescanbe foundin[13]. However, to the best of our knowledge, there are no other soft-ware packages available that implement a formal integration of dose-findingandpharmacokinetics.OurRpackagecansupport in-terdisciplinarytrialteamsinimplementinginnovativedose-finding designusingPKinformationinphaseIstudies.Ursino et al. [8] compared a number of dose-finding meth-ods under several scenarios, in order to verify their behaviour andcharacteristics.ThePKCRMmethodbehavesastheCRMalone whentheLisveryhigh.Ontheotherhand,itgivesthesame prob-abilityofcorrect MTD selection(as theCRM) while reducing the probability ofoverdosing, when Lis appropriately chosen. There-fore,thisdesignisrecommendedwheninpreclinicalphases non-monitorabletoxicityhasbeenobservedorinsomepediatric stud-ies,whenLcanbeeasilysetfromaliteraturereview.ThePKLOGIT andPKTOX methodsare recommended whenmore precise dose-responsecurveestimationisrequired.ComparedtotheCRMthese methodsareabletobetterestimate theprobabilityoftoxicity as-sociatedwitheachdosealongwithaccurateMTDselection.Inthis way,aricherknowledgecanbetransmittedtosubsequentphases ofclinicaldevelopment.Theothermethodshavesimilarbehaviour toany dose-toxicityregression,andcan be usedfor comparisons insimulations.
Fig.4. (A)Plotofthedoseescalation(foreachpatient)inthetrial,(B)Boxplotofthesamplingdistributionoftheprobabilityoftoxicityateachdoseoverthetotalnumber oftrials,and(C)Plotoftheposteriordistributionsoftheprobabilityoftoxicityateachdose(includingtheestimationalongwiththelinesofthe95%CI),accordingtothe PKTOXmethod.
Theseprior hyperparameters were chosen aftersensitivity analy-sistogive goodperformance inmostcases.However, wesuggest settingthepriorhyperparamentersusingpreclinicalinformationor otherexternalpertinentinformationifthisisavailable.
Acknowledgements
We thanks thethree anonymousreviewersandtheassociated editorfor their suggestions. Thisresearch wasconductedas part oftheEuropeanproject,InSPiRe,InnovativeMethodologyforSmall PopulationsResearch.AlltheauthorswerefundedbytheEuropean Union’sSeventhFrameworkProgrammeforresearch,technological developmentand demonstration under grant agreement number FPHEALTH2013–602144.
AppendixA. Simulationtimes
Simulations based on Bayesian methods can be very tedious andtimeconsuming.Therefore,for1,000simulatedtrials,we sug-gesttouseadedicatedserver.Moreover,runninginparallelallthe scenariosandnotsequentiallycanalsoreducethetimeofthe sim-ulations.
Table A.1showstheestimatedtimesforconductingthe simu-lationsof10and1,000trials,excludingthe95%credibleintervals, forthemethodsPKTOXandPKCRMunderseveralsettings(i.e.the numberofchainsanditerationsfortheBayesianalgorithm).
TableA.1
Simulation’sestimatedtimesrunning10or1,000trials,inminutesand hours respectively, using different dose-findingmethodsunder several settingsforBayesianalgorithm(numberofchainsanditerations).
Bayesiansettings TR=10 TR=1,000
Methods Methods
PKTOX PKCRM PKTOX PKCRM
chains=4,iter=4000 18min 10min ≈ 32h ≈ 17h chains=4,iter=6000 26min 14min ≈ 45h ≈ 25h chains=3,iter=4000 13min 7min ≈ 23h ≈ 13h chains=6,iter=4000 26min 14.5min ≈ 44h ≈ 24h
AppendixB.S4classes
Oneofthebigadvantagesof
dfpk
packageisitsflexible frame-work based on the S4 classes andmethods structure. S4 classes haveallowedustoconstructrich andcomplicateddata represen-tationsthatneverthelessseemsimpletotheenduser.Theclassis theabstractdefinition,whileeverytimeweactuallyuseittostore theresultsforagivendataset,wecreateanobjectoftheclass.Three S4 classes are available, the
dose-class
, thescen-class
and thedosefinding-class
, in order to store, show or plot the corresponding results of the main R functionsTableB.1
Therequiredslots(i.e.arguments)inthedoseclass.
N Thetotalnumberofenrolledpatients.
y Abinaryvectoroftoxicityoutcomesfrompreviouspatients;1indicatesatoxicity,0otherwise. AUCs AvectorwiththecomputedAUCvaluesofeachpatient.
doses Avectorwiththedosespanel.
x Avectorwiththedoselevelsassignedtothepatientsinthetrial. theta Thetoxicitytarget.
options AlistofStanmodel’soptions.
newDose Thenextrecommendeddose(RD)level;equalsto0ifthetrialhasstopped,accordingtothestoppingrules. pstim Theestimatedmeanprobabilitiesoftoxicity.
pstimQ1 The1stquartileofestimatedprobabilityoftoxicity. pstimQ3 The3rdquartileofestimatedprobabilityoftoxicity. parameters TheStanmodel’sestimatedparameters.
model Acharacterstringtospecifytheselecteddose-findingmodelusedinthemethod.
Inthissection,abrieflydescriptionoftheaccessibleclassesisshown.
1.
dose-class
The
dose-class
is created to store and present the next recommended dose level in an ongoing trial through the R functionnextDose
.Wecanlookindetailatthestructureoftheclassasfollows:where,
ClassNewDose
isaunionofclasses“numeric”,“logical” and“NULL”.Accordinglytothestructure,the
dose
classconsistsof13slots(i.e.arguments)whicheachone hasaspecifictype. TableB.1givesa briefdefinitionofeachcorrespondingslotsinthedose
class.Anobjectthatcomesfromthe
dose-class
mustcontainalltheaboveslots.Theslotsareaccessedusing@,justascomponentsofa listthatareaccessedusing$.Here,anillustrationofhowtoaccesstheslotsofanobjectisgiven.Wesupposethat
nextD
isanobjectofthedose
class.Forexample,theslotsmodel
andy
canbeobtainedasfollows:where,PKTOX wastheselected dose-findingmodelandthevector (0,0,0,0,0,1,0,0,0,0,1,0,0,0,0)wasthetoxicityoutcome for eachpatientthatareusedinthefunction
nextDose
.Oncetheclassesaredefined,weprobablywanttoperformsomecomputationsonobjects.Inmostcaseswedonotcarehowtheobject isstoredinternally,thecomputer shoulddecidehow toperformthetasks. TheS4wayofreaching thisgoalistousegeneric functions andmethoddispatch.
Basedonouraboveexample,we hypothesisedthat westoredtheoutputofthefunction
nextDose
intheobjectnextD
.Topresent theresultswecanuseeitherthemethodshow
orBothmethodsgiveaniceandsimplepresentationoftheoutcomethatisstoredintheobject
nextD
.Inanycasewhereuserwantsto changehowtheresultsarepresented,she/hecaneasilydoitbysettingher/hisownshow
ordose
.Similarly, aplot
genericfunctionisdefinedforthisclassandcanbeeasilyaccessedthroughthecommand:TableB.2
Therequiredslots(i.e.arguments)inthescenclass.
PKparameters Subject’spharmacokinetic’s(PK)parametersfromthepopulationdistributions definedbythepopulationmean.
nPK Thelengthoftimepoints. time Thesamplingtimepoints.
idtr Theidnumberofthecorrespondingsimulateddataset. N Thetotalsamplesizepertrial.
doses Avectorofthedosespanel. preal Thepriortoxicityprobabilities. limitTox Thetoxicitythreshold.
omegaIIV Theinter-individualvariabilityfortheclearanceandthevolumeofdistribution. omegaAlpha Thepatient’ssensitivityparameter.
conc TheconcentrationcomputedatthePKpopulationvalues.
concPred Theconcentrationvalueswithproportionalerrorsforeachpatientateach dose.
tox Thetoxicityoutcome.
tab Asummarymatrixcontainingthesamplingtimepointsatthefirstrow followedbyconcPred,parametersandalphaAUC.Itusedbythe simulationfunctionnsim.
parameters ThesimulatedPKparametersofeachpatient. alphaAUC AvectorwiththecomputedAUCvaluesofeachpatient.
A
scen
isaS4classtosaveandshowadatasetsimulatedbythefunctionsim.data
.Wecanlookindetailatthestructureofthe classscen
asfollows:Thanks toS4classes,theusercaneasily createhis/herowndatasets.Forexample,he/shecancreateanewobjectforeach simulated trial,namedUserData,andstoreitina
scen-class
byasimilarwayusingthecommandnew
inthefollowingway:andthenadditinalist,alongwiththeothersimulateddatasets. AdetaileddefinitionofeachslotispresentedintheTableB.2.
Once again, user can accessto the slots andapply thegeneric functionsandmethods in this classby exactlythe same wayas in
dose-class
.Assume thatwe run 10(i.e.TR
=10) simulateddatasetsusing thefunctionsim.data
andsimulatedData
isascen
objectthen:
3.
dosefinding-class
TableB.3
Therequiredslots(i.e.arguments)inthedosefindingclass.
pid Patient’sIDprovidedinthestudy. N Thetotalsamplesizepertrial. time Thesamplingtimepoints. doses Avectorwiththedosespanel.
conc Theestimatedconcentrationvaluesforeachpatientateachdose. p0 TheskeletonofCRMforPKCRM.
L TheAUCthresholdtobesetbeforestartingthetrialforPKCRM. nchains ThenumberofchainsfortheStanmodel.
niter ThenumberofiterationsfortheStanmodel. nadapt ThenumberofwarmupiterationsfortheStanmodel.
newDose Thenextmaximumtolerateddose(MTD)ifTR=1otherwisethepercentageof MTDselectionforeachdoselevelafteralltrialsstartingfromdose0;equals to0ifthetrialhasstoppedbeforetheend,accordingtothestoppingrules. MTD Avectorcontainingthenextmaximumtolerateddoses(MTD)ofeachtrial
(TR);equalsto0ifthetrialhasstoppedbeforetheend,accordingtothe stoppingrules.
MtD Thefinalnextmaximumtolerated(MTD)doseafterallthetrials. theta Thetoxicitythreshold.
doseLevels Avectorofdoselevelsassignedtopatientsinthetrial. toxicity Theestimatedtoxicityoutcome.
AUCs AvectorwiththecomputedAUCvaluesofeachpatient. TR Thetotalnumberoftrialstobesimulated.
preal Thepriortoxicityprobabilities.
pstim Theestimatedmeanprobabilitiesoftoxicity. pstimQ1 The1stquartileoftheestimatedprobabilityoftoxicity. pstimQ3 The3rdquartileoftheestimatedprobabilityoftoxicity.
model Acharacterstringtospecifytheselecteddose-findingmodelusedinthe method.
seed Theseedoftherandomnumbergeneratorthatisusedatthebeginningof eachtrial.
It’sstructureisgivenbelow:
where,21differentslotsareavailable.TableB.3definesallthepossibleslots.
Identicallywiththe
dose
andscen
S4classes,theslotscanpickedusingthe@“operator” andthegenericfunctionsandmethodscan beappliedinthesameway.References
[1] S.Chevret, StatisticalMethodsfor Dose-FindingExperimentsofStatistics in Practice,JohnWileyandSons,Chichester,WestSussex,England,2006. [2] H. Derendorf, L.J.Lesko,P.Chaikin,W.A. Colburn,P.Lee,R. Miller, R.
Pow-ell,G.Rhodes,D.Stanski,J.Venitz,Pharmacokinetic/pharmacodynamic mod-elingindrugresearchanddevelopment, J.Clin.Pharmacol.40 (12)(2000) 1399–1418.
[3] E.Comets, S.Zohar,Asurvey ofthe waypharmacokinetics arereported in publishedphaseiclinicaltrials,withanemphasisononcology,Clin. Pharma-cokinet.48(6)(2009)387–395.
[4] F.Bretz,J.C.Pinheiro,M.Branson,Combiningmultiplecomparisonsand mod-elingtechniquesindose-responsestudies,Biometrics61(3)(2005)738–748. [5] S.Piantadosi,G.Liu,Improveddesignsfordoseescalationstudiesusing
phar-macokineticmeasurements,Stat.Med.15(15)(1996)1605–1618,doi:10.1002/ (SICI)1097-0258(19960815)15:151605::AID-SIM3253.0.CO;2-2.
[6] S.Patterson,S.Francis,M.Ireson,D.Webber,J.Whitehead,AnovelBayesian decisionprocedureforearly-phasedose-findingstudies,J.Biopharm.Stat.9(4) (1999)583–597,doi:10.1081/BIP-100101197.
[7] J.Whitehead,Y.Zhou,L.Hampson,E.Ledent,A.Pereira,Abayesianapproach fordose-escalationinaphaseiclinicaltrialincorporatingpharmacodynamic endpoints,J. Biopharm.Stat.17 (6)(2007) 1117–1129. PMID:18027220doi: 10.1080/10543400701645165.
[8]M.Ursino,S.Zohar,F.Lentz,C.Alberti,T.Friede,N.Stallard,E.Comets, Dose-findingmethodsforphaseIclinicaltrialsusingpharmacokineticsinsmall pop-ulations,Biom.J.(2017),doi:10.1002/bimj.201600084.
[9]RCoreTeam,R:alanguageandenvironmentforstatisticalcomputing,in:R Foundationfor StatisticalComputing,Vienna,Austria,2013. ISBN3-900 051-07-0,http://www.R-project.org/.
[10]J.Whitehead,S.Patterson,D.Webber,S.Francis,Y.Zhou,Easy-to-implement Bayesianmethodsfordose-escalationstudiesinhealthyvolunteers, Biostatis-tics2(1)(2001)47–61,doi:10.1093/biostatistics/2.1.47.
[11]J.O’Quigley,M.Pepe,L.Fisher, Continualreassessmentmethod:apractical de-signforphase1clinicaltrialsincancer,Biometrics46(1)(1990)33–48. [12]G.Lestini,C.Dumont,F.Mentré,Influenceofthesizeofcohortsinadaptive
designfornonlinearmixedeffectsmodels:anevaluationbysimulationfora pharmacokinetic andpharmacodynamicmodelfor abiomarkerinoncology, Pharm.Res.32(10)(2015)3159–3169,doi:10.1007/s11095-015-1693-3. [13]E. Zhang, H.G. Zhang, Cran task view: clinical trial design, monitoring,