Linear1InfusionSingleDose_ClV
from the library
of modelsRespPK
and
create and add the response PK to the statistical modelDesign
Bras test
of size 150RespPK
brasTest
create and add the administration
parameters of the response PKbrasTest
to the design MyDesign
MyDesign
to the PFIM project
MyProject
MyDesign2
to the project
MyProject_optimization
In this example, we simulate an 1-compartment model with linear elimination for IV infusion over 1 hour (inspired by (Sukeishi et al. 2022)). One hundred and fifty (150) subjects receive a 400mg loading dose on the first day, followed by 4 daily doses of 200mg. Blood samples are taken at the end of the \(1^{st}\) infusion (H1), H20, H44, H66 and H120. By evaluating this design, we will then select 4 sampling times on intervals (0,48) and (72,120) for an optimal design using PSO (Particle Swarm Optimization) algorithm.
Reports of the design evaluation and optimization are available at https://github.com/iame-researchCenter/PFIM
MyProject_evaluation
: project for the design evaluation
named eval_PK_Sukeishi-2021-GS441524
MyProject_optimization
: project for the design
optimization named opti_PK_Sukeishi-2021-GS441524
= PFIMProject( name = "eval_PK_Sukeishi-2021-GS441524" )
MyProject_evaluation = PFIMProject( name = "opti_PK_Sukeishi-2021-GS441524" ) MyProject_optimization
= StatisticalModel() MyStatisticalModel
Linear1InfusionSingleDose_ClV
from the
library of models= getModel( PFIMLibraryOfModels, "Linear1InfusionSingleDose_ClV" ) MyPKModel
= defineModelEquations( MyStatisticalModel, MyPKModel ) MyStatisticalModel
= ModelParameter( "V", mu = 50, omega = sqrt( .26 ), distribution = LogNormalDistribution() )
pV = ModelParameter( "Cl", mu = 5, omega = sqrt( .34 ), distribution = LogNormalDistribution() ) pCl
= defineParameter( MyStatisticalModel, pV )
MyStatisticalModel = defineParameter( MyStatisticalModel, pCl ) MyStatisticalModel
RespPK
and create and add the response PK to the
statistical model= Combined1( sigma_inter = 0.5, sigma_slope = sqrt( 0.15 ) )
errorModelresponsePK
= Response( "RespPK", errorModelresponsePK )
responsePK
= addResponse( MyStatisticalModel, responsePK ) MyStatisticalModel
= defineStatisticalModel( MyProject_evaluation, MyStatisticalModel )
MyProject_evaluation = defineStatisticalModel( MyProject_optimization, MyStatisticalModel ) MyProject_optimization
Design
= Design( "Design" ) MyDesign
Bras test
of size 150= Arm( name = "Bras test", arm_size = 150 ) brasTest
RespPK
= addSampling( brasTest, SamplingTimes( outcome = "RespPK", sample_time = c( 1,12,24,44,72,120 ) ) ) brasTest
brasTest
create and add the administration
parameters of the response PK= Administration( outcome = "RespPK", Tinf = rep( 1, 5 ), time_dose = seq( 0, 96, 24 ) , amount_dose = c( 400, rep( 200, 4 ) ) )
administration_brasTest
= addAdministration( brasTest, administration_brasTest ) brasTest
brasTest
to the design
MyDesign
= addArm( MyDesign, brasTest ) MyDesign
MyDesign
to the PFIM project
MyProject
= addDesign( MyProject_evaluation, MyDesign ) MyProject_evaluation
= EvaluatePopulationFIM( MyProject_evaluation )
evaluationPop = EvaluateIndividualFIM( MyProject_evaluation )
evaluationInd = EvaluateBayesianFIM( MyProject_evaluation ) evaluationBay
show( evaluationPop )
show( evaluationInd )
show( evaluationBay )
# set the path and name of the report to save the report
= "....."
outputPath
= list( unitTime=c("hour"), unitResponses= c("mcg/mL","DI%") )
plotOptions
reportPFIMProject( evaluationPop,
outputPath = outputPath, plotOptions = plotOptions )
reportPFIMProject( evaluationInd,
outputPath = outputPath, plotOptions = plotOptions )
reportPFIMProject( evaluationBay,
outputPath = outputPath, plotOptions = plotOptions )
MyDesign2
to the project
MyProject_optimization
= Design( name = "MyDesign2")
MyDesign2 = addDesign( MyProject_optimization, MyDesign2 ) MyProject_optimization
= SamplingConstraint( response = "RespPK", continuousSamplingTimes = list( c( 1,48 ), c( 72,120 ) ) )
samplingBoundsConstraintRespPK = SamplingConstraint( response = "RespPK", min_delay = 5 )
samplingMinimalDelayConstraintRespPK
= DesignConstraint()
Constr1
= addSamplingConstraint( Constr1, samplingBoundsConstraintRespPK )
Constr1 = addSamplingConstraint( Constr1, samplingMinimalDelayConstraintRespPK )
Constr1 = addSamplingConstraints( brasTest2, Constr1 ) brasTest2
= addArm( MyDesign2, brasTest2 ) MyDesign2
= addDesign( MyProject_optimization, MyDesign2 ) MyProject_optimization
= PSOAlgorithm( maxIteration = 100, populationSize = 10, personalLearningCoefficient = 2.05, globalLearningCoefficient = 2.05, showProcess = TRUE ) psoOptimizer
= OptimizeDesign( MyProject_optimization, psoOptimizer, PopulationFim() ) optimization_populationFIM
show( optimization_populationFIM )
# set the path to save the report
= "....."
outputPath
= list( unitTime=c("hour"), unitResponses= c("mcg/mL","DI%") )
plotOptions
reportPFIMProject( optimization_populationFIM, outputPath = outputPath, plotOptions = plotOptions )