Basic PKanalix workflow
In the example below we show how to create a new PKanalix project from a dataset, choose the NCA settings, run the NCA parameter calculation and retrieve the results. In addition, “table1” R package is used to display a nicely formatted table.
library(lixoftConnectors)
initializeLixoftConnectors(software="pkanalix")
# get path to dataset from demos
data_file <- paste0(getDemoPath(),"/2.case_studies/data/Theo_extravascular_singledose.csv")
# Create new PKanalix project
newProject(data = list(dataFile = data_file,
headerTypes = list(ID='id',time='time',DV="observation",
Amount="amount", FORM="catcov",AGE="contcov",
HT="contcov",SEQ="catcov",Period="occ")))
# Choose settings for NCA task
setNCASettings(administrationtype = list("1"="extravascular"),
integralMethod = "LinLogTrapLinLogInterp",
blqMethodAfterTmax="missing",
lambdaRule="adjustedR2",
partialAucTime=list(T,c(0,24)),
ajdr2AcceptanceCriteria=list(T,0.97),
computedNCAParameters=c("AUCINF_obs","Cmax","Tmax"))
# Save project
saveProject(projectFile = "theo_NCA.pkx")
# Compute NCA
runNCAEstimation()
# Select NCA parameters from results
indivParams = getNCAIndividualParameters("AUCINF_obs","Cmax")$parameters
print(head(indivParams))
# Post-processing of the results:
# summarizing the results split by formulation in a table
library(table1)
table1::label(indivParams$AUCINF_obs) <- "AUC to infinity"
table1::label(indivParams$Cmax) <- "Cmax"
table1::table1(~AUCINF_obs + Cmax | FORM, data = indivParams)
The generated table is:
