Overview

Description

Explore and visualize Mlxtran and pharmML models with the Mlxplore software


Usage

mlxplore(model, parameter, output, treatment=NULL,group=NULL)


Arguments

model
a Mlxtran or PharmML model.
mlxplore(model='myPKmodel.txt', ... )
output
a list with fields
o <- list(name= c('C','E'), time=seq(0,24,by=0.1))
mlxplore(..., output=o, ... )
parameter
a vector of parameters with their names and values
p <- c(a=1, b=-0.5, c=3)
mlxplore(...,parameter=p, ... )
treatment
a list with fields
tr <- list(time=c(0,12), amount=50, rate=50)
mlxplore(...,treatment=tr, ... )
group
a list of lists with unique field
g1  <- list(treatment=adm1)
g2  <- list(treatment=adm2)
mlxplore(...,group=list(g1,g2), ... )


Examples

Example 1

[LONGITUDINAL]
input = {ka, V, k}

EQUATION:
D=100
f1 = D/V*exp(-k*t)
f2 = D*ka/(V*(ka-k))*(exp(-k*t) - exp(-ka*t))
p <- c( ka=0.5, V=10, k=0.2)
f <- list(name = c('f1','f2'), time = seq(0, 25, by=0.1))

mlxplore(model     = 'model/analytical.txt', 
         parameter = p, 
         output    = f)

Remark: the inputs arguments of mlxplore are those of simulx. When could then run simulx with the same inputs arguments:

library(gridExtra)

res <- simulx(model     = 'model/analytical.txt', 
              parameter = p, 
              output    = f)
plot1 <- ggplot(data=res$f1) + geom_line(aes(x=time, y=f1))
plot2 <- ggplot(data=res$f2) + geom_line(aes(x=time, y=f2)) 
grid.arrange(plot1, plot2, ncol=2)


Example 2

[LONGITUDINAL]
input = {F1, F2, ka, Tk0, kl, k23, k32, V, k, Vm, Km}

PK:
compartment(cmt=1, amount=Al)
compartment(cmt=2, amount=Ac)
peripheral(k23,k32)
oral(type=1, cmt=1, ka,  p=F1)
oral(type=2, cmt=2, Tk0, p=F2)
iv(type=3, cmt=2)
transfer(from=1, to=2, kt=kl)
elimination(cmt=1, k)
elimination(cmt=2, Km, Vm)
Cc = Ac/V
adm1 <- list(type=1, time=seq(6, 66, by=8),  amount=2)
adm2 <- list(type=2, time=seq(9, 57, by=12), amount=1)
adm3 <- list(type=3, time=seq(12,60, by=12), amount=1,rate=0.2)

p <- c(F1=0.5, F2=0.8, ka=0.5, Tk0=4, kl=0.5, k23=0.3, k32=0.5, V=10, k=0.2, Vm=0.5, Km=1)

Cc <- list(name = "Cc", time = seq(0,to=80,by=0.1))

mlxplore(model     = "model/pk3.txt", 
         parameter = p, 
         output    = Cc, 
         treatment = list(adm1, adm2, adm3))