Overview

Description

Use the pooled PK data to derive population PK parameters for a “standard” PK model (i.e. a model of the Monolix PK library).

The structural model is automatically defined using the names of the PK parameters.

Allowed names are: ‘Tlag’, ‘Mtt’, ‘Ktr’, ‘ka’, ‘Tk0’, ‘V’, ‘V1’, ‘V2’, ‘V3’, ‘Q’, ‘Q2’, ‘Q3’, ‘Cl’, ‘k’, ‘k12’, ‘k21’, ‘k13’, ‘k31’, ‘Vm’, ‘Km’.

A Monolix project is then automatically created using these values as initial population parameters.

Usage

pkpopini <- function(data=NULL, project=NULL, parameter=NULL, 
                     new.project=NULL, new.dir=NULL, par.ini=NULL) 

Arguments

data
a list with fields
project
a Monolix project
parameter
a vector of PK parameter names
new.project
name of the new Monolix project (a default name is created if not provided)
new.dir
name of the directory where the created files are stored (default is the current working directory)
par.ini
a vector of PK parameter values (optional)


Examples

Reading a data file

Let us use the warfarin PK data in this example:

head(read.csv('data/warfarinPK.csv'))
##   id time   y amount   wt age sex
## 1  1    0   .    100 66.7  50   1
## 2  1   24 9.2      . 66.7  50   1
## 3  1   36 8.5      . 66.7  50   1
## 4  1   48 6.4      . 66.7  50   1
## 5  1   72 4.8      . 66.7  50   1
## 6  1   96 3.1      . 66.7  50   1
library(Rsmlx)
warfarinPK <- list(
  dataFile = "data/warfarinPK.csv",
  headerTypes = c("id", "time", "observation", "amount", "contcov", "contcov", "catcov"))

Let us compute population parameters for a one compartment model with a lag time, a zero order absorption process and a linear elimination.

warf.ini1 <- pkpopini(data=warfarinPK, parameter=c("Tlag", "Tk0", "V", "Cl")) 

By default, a new Monolix project, called pk_TlagTk0VCl.mlxtran, is created with ``good inital values’’. Here, the structural model for this project is oral0_1cpt_TlagTk0VCl.txt

print(warf.ini1)
## $pop.ini
##      Tlag       Tk0         V        Cl 
## 0.4976130 2.7169311 8.0309565 0.1314533 
## 
## $project
## [1] "./pk_TlagTk0VCl.mlxtran"
## 
## $model
## [1] "C:/ProgramData/Lixoft/MonolixSuite2018R2/factory/library/pk/oral0_1cpt_TlagTk0VCl.txt"
## 
## $data
## $data$dataFile
## [1] "data/warfarinPK.csv"
## 
## $data$headerTypes
## [1] "id"          "time"        "observation" "amount"      "contcov"    
## [6] "contcov"     "catcov"     
## 
## $data$administration
## [1] "oral"

The new project will now be named warfPK1.mlxtran and saved in directory warfarinPK

warf.ini2 <- pkpopini(data=warfarinPK, parameter=c("Tlag", "Tk0", "V", "k"), 
                      new.dir="warfarinPK", new.project="warfPK1.mlxtran") 


Using a Monolix project

If a Monolix project has been already created using the data file, it can be used

warfarinPK.project <- "projects/warfarinPK.mlxtran"

By default, pkpopini will use the PK model used for this project

warfp.ini1 <- pkpopini(project=warfarinPK.project, new.dir="warfarinPK") 
print(warfp.ini1$pop.ini)
##      Tlag        ka         V        Cl 
## 0.6627284 0.6934133 7.9764600 0.1316656

Another PK model will be used if a list of PK parameter names is provided

warfp.ini2 <- pkpopini(project=warfarinPK.project, parameter=c("Tlag","Tk0", "V", "k", "k12", "k21"), new.dir="warfarinPK") 
print(warfp.ini2$pop.ini)
##       Tlag        Tk0          V          k        k12        k21 
## 0.49778864 3.08325084 7.01241200 0.01777342 0.00782713 0.03226273