Original data
This dataset is a modified version of the Vanoxerine data. The compound is renamed LIX1234. The dataset contains two dose groups (50 mg and 75 mg) but no placebo data. In order to mitigate the effect of diurnal variation in QTc, time-matched QTc measurements collected prior to drug administration on Day -1 are used for the baseline correction.
The starting dataset has the following structure:
All baseline records on day -1 are flagged with BASELINE=”Y”. The TIME column contains the nominal time after the previous dose. For each individual, the ECG recording times on day 0 have a matching time on day -1.
Data processing
In order to use the provided R functions, the R script mlxQTcTools.R must be sourced. In addition, a monolixSuite installation must be available and the lixoftConnectors R package installed. In order to indicate the location of the MonolixSuite installation, the functioninitQTc(path=...) is used.
source('../_mlxQTcTools/mlxQTcTools.R')
initQTc(path="C:/Program Files/Lixoft/MonolixSuite2024R1")
In order to perform a concentration-QTc analysis, it is necessary to apply the following processing:
-
calculate heart-rate correction for QT to generate QTc, for instance using Fridericia’s formula
-
calculate the baseline-corrected QTc, i.e ΔQTc, using the time-matched baseline records indicated with BASELINE=Y
-
for exploratory data visualization purpose, the ΔHR can also be computed
Covariates and regressor variables which will appear in the conc-QTc model are also added as additional columns:
-
the centered QTc baseline
-
time as categorical factor
-
concentration and RR interval duration
The steps can be performed using the function process_QTcData():
process_QTcData(data="LIX1234_timeMatched.csv",
QTname = "ECGQT", RRname = "ECGRR", CONCname = "CONC", TRTname = NULL,
IDname = "SUBJID", TIMEname = "TIME",
bComputeBaseline = T, BLFLAGname = "BASELINE", baselineType = "time-matched",
bComputeQTc = T, correctionMethod = "Fridericia",
outName = "LIX1234_timeMatched_formatted.csv", silent=F)
The column containing the QT, RR, drug concentration, treatment (placebo or drug), subject id and time are indicated using the arguments QTname, RRname, CONCname, IDname, TIMEname. Given we don’t have placebo data, the TRTname and placeboName arguments are not used.
Given that the QTc column (heart rate-corrected QT) is not present in the dataset, it is computed using bComputeQTc = TRUE. Several correction methods are available and can be chosen using correctionMethod = "Fridericia", "Bazett", "Framingham", "Hodges" or “Population”.
If the QTc baseline is not present yet in the dataset, it can be computed by giving bComputeBaseline = TRUE and indicating the baseline flag column in BLFLAGname. The baseline flag column should contain “0”/”1” values or “N”/”Y” values with “Y” and “1” indicating that baseline records. The baseline type is given with the baselineType="time-matched" argument.
The name of the output file is given via the outName argument.
Running the function generates the following console output:
Info: Given that no 'TRTname' column has been defined, the dataset is assumed to have no placebo data and a single treatment.
Info: The HR column has not been provided and has thus been calculated based on the 'ECGRR' column.
Info: The QTc column has been calculated based on the 'ECGQT' and 'ECGRR' columns, using Fridericia's formula: QTc=QT/(RR/1000)^(1/3)
Info: The BLQTc and BLHR columns have been calculated for each combination of SUBJID, TIME, using the lines flagged as BASELINE=Y or 1.
Info: After creation of the BLQTc and BLHR columns, the baseline lines (flagged as BASELINE=Y or 1) are useless and have been removed.
Info: The dQTc and dHR columns have been calculated as dQTc=QTc-BLQTc and dHR=HR-BLHR.
Info: The BLQTc_cent column has been calculated as BLQTc_cent=BLQTc-mean(BLQTc).
Info: There is no placebo data, ddQTc will not be calculated.
Info: The Cc_reg (concentration as regressor), RR_reg (RR as regressor) and TIME_cat (TIME as categorical covariate) columns have been added.
==> Created new dataset LIX1234_timeMatched_formatted.csv.
The Info lines give details about the data processing steps. The Warning lines draw attention on unusual situations such as missing concentration on lines not belonging to the placebo group. The console output can be avoided using silent=T.
The generated formatted dataset is the following. It contain all columns needed to create a Monolix project for conc-QTc analysis as well as creating the usual exploratory data analysis plots.
Note that the baseline records have been used to create the BLQTc column and that the baseline lines have then been deleted.
Model fitting
The next step is to generate and run Monolix projects to estimate the parameters of the concentration-ΔQTc models. Both linear and non-linear conc-QTc relationships are considered.
To generate and run the Monolix projects to run the con-QTc analysis, the function generateAllQTcProjects() is used.
generateAllQTcProjects(dataSet="LIX1234_timeMatched_formatted.csv",
IDname="SUBJID", TIMEname="TIME", TRTname=NULL, CONCname="CONC",
placeboName = "no placebo", baselineType="time-matched",
addStratCatCov = "DOSE",
modelFolder="../_mlxQTcTools/models/dQTcModels/",
projectFolder="./mlx_runs/",
isddQTC = FALSE,
bRun = TRUE)
The user should provide the formatted dataset in the argument dataSet, as well as the name of the columns containing the subject id in IDname, time in TIMEname, concentration in CONCname. The TRTname argument is not used given that we have no placebo data. The other columns (e.g QT, QTc, HR, etc) must have predefined headers and do not need to be specified. To specify that there is no placebo data, one can indicate placeboName = "no placebo".
The DOSE column of the dataset can be used to stratify plots in the report. To make this possible, it is necessary to generate a Monolix project where this column is tagged as categorical covariate (even if it is not used in the model). This is specified with addStratCatCov = "DOSE".
The folder containing the structural models to be used to generate the monolix runs are given in the argument modelFolder. The R package contains a pre-written library of models with linear, Emax, Emax with sigmoidicity and loglinear conc-QTc relationship. User-defined models can be added to this folder is needed. In folder in which the runs are generated is the projectFolder argument.
Whether conc-ΔΔQTc or conc-ΔQTc should be run is indicated using isddQTC = T or F. To run the projects after having created them, use bRun = T.
When running the function, the console output indicates the generated runs, the implemented models and the progress of the parameter estimation:
Created project ./mlx_runs//dQTc_Emax.mlxtran with model:
dQTc = (theta0 + eta0) + theta4 * BLQTc_cent + (theta2 + eta2) * Conc/(Conc + theta5)
Running project... Done.
Created project ./mlx_runs//dQTc_EmaxSigma.mlxtran with model:
dQTc = (theta0 + eta0) + theta4 * BLQTc_cent + (theta2 + eta2) * Conc^theta6/(Conc^theta6 + theta5^theta6)
Running project... Done.
Created project ./mlx_runs//dQTc_Linear.mlxtran with model:
dQTc = (theta0 + eta0) + theta4 * BLQTc_cent + (theta2 + eta2) * Conc
Running project... Done.
Created project ./mlx_runs//dQTc_Linear_effectComp.mlxtran with model:
dQTc = (theta0 + eta0) + theta4 * BLQTc_cent + (theta2 + eta2) * Ce with dCe/dt = (Conc - Ce)/theta5
Running project... Done.
Created project ./mlx_runs//dQTc_LogLinear.mlxtran with model:
dQTc = (theta0 + eta0) + theta4 * BLQTc_cent + (theta2 + eta2) * log(1 + Conc/theta5)
Running project... Done.
Note that in the absence of placebo data, the pre-specified model has been modified and does not contain the TRT term. In addition, in the case of time-matched baseline, the TIME factor is also not needed.
The generated Monolix runs can be opened with the Monolix GUI for inspection.
Report generation
A standard report can be generated using the function quarto_render() and a Quarto template. The quarto template will read the results from generated Monolix projects and generate a report including:
-
Exploratory data analysis (data summary, QT/QTc, heart rate correction, baseline QTc, ΔQTc and concentration-time)
-
Model assumption assessments (heart-rate independence from drug concentration, QTc independence from heart rate, linearity of the concentration-QTc relationship, immediate effect of concentration change on ΔQTc change)
-
Modeling results (comparison of the different models, model fit, parameter estimates, goodness of fit)
-
Derivation of the ΔΔQTc prediction intervals, including assessment of the 10-ms threshold
The quarto function is called in the following way:
quarto_render(input = "../_mlxQTcTools/QTc_quarto_allModels.qmd",
output_file = "LIX1234_dQTc_report_timeMatched.docx",
execute_params = list(folderName = "../Example_LIX1234_timeMatchedBaseline/mlx_runs", # give relative path from quarto template (.qmd) to folder containing runs
compoundName = "LIX1234",
CONCcolumn = "CONC",
TRTcolumn = NULL,
STRATcolumn = "DOSE",
STRATname = "Dose group",
bHasPlacebo = FALSE,
concentrationLabel = "Concentration",
concentrationUnit = "pg/mL",
studyType = "dQTc",
nBins = 10))
The input is the quarto template. A standard quarto template is provided in the package but it can also be adjusted to the users need. The output_file indicates the name of the generated report as word document. The execute_params list the folder containing the Monolix runs in folderName, the string to be used as compound name in compoundName, the column of the formatted dataset containing the concentration in CONCcolumn. The TRTcolumn is set to NULL but DOSE column to be use for plot stratification is indicated in STRATcolumn = "DOSE", and the header/label to be used for the stratification column in STRATname. Then comes a logical to indicate whether the dataset contains placebo data in bHasPlacebo, the type of study using studyType = "dQTc", the concentration unit in concentrationUnit(for plot labels), the number of bins to average the concentration in nBins, and the BICc threshold to consider that an alternative model is better than the linear model in thresBICc.
Note that the folderName must indicate the relative path from the .qmd template (not the R working directory) to the folder containing the runs.
The generated report can be visualized below:
The word version of the report can be download here.
Conclusion
The conc-ΔQTc data for this drug is best captured by an Emax model. The upper bound of the 90% confidence interval at the geometric mean maximum concentration is 28.7 ms and exceeds the 10 ms threshold.