This example uses data collected on 59 preterm infants given phenobarbital during the first 16 days after birth. Each infant received an initial dose followed by one or more sustaining doses by intravenous bolus administration. A total of between 1 and 6 concentration measurements were obtained from each infant at times other than dose times, for a total of 155 measurements. Infant weights and APGAR scores (a measure of newborn health) were also recorded. Data was described in [1], a study funded by the NIH/NIBIB grant P41-EB01975.
Load the data.
Visualize the data.
Create a one-compartment PK model with bolus dosing and linear clearance to model such data.
Suppose there is a correlation between the volume of the central compartment (Central
) and the weight of infants. You can define this parameter-covariate relationship using a covariate model that can be described as
,
where, for each ith infant, V
is the volume, θs (thetas) are fixed effects, η (eta) represents random effects, and WEIGHT
is the covariate.
Define the fixed and random effects. The column names of each table must have the names of fixed effects and random effects, respectively.
Change the group label ID to GROUP as required by the sbiosampleparameters
function.
Generate parameter values for the volumes of central compartments Central based on the covariate model for all infants in the data set.
You can then simulate the model using the sampled parameter values. For convenience, use the function-like interface provided by a SimFunction object.
First, construct a SimFunction object using the createSimFunction method, specifying the volume (Central) as the parameter, and the drug concentration in the compartment (Drug_Central) as the output of the SimFunction object, and the dosed species.
The data set ds contains dosing information for each infant, and the groupedData object provides a convenient way to extract such dosing information. Convert ds to a groupedData object and extract dosing information.
Simulate the model using the sampled parameter values from phi and the extracted dosing information of each infant, and plot the results. The ith run uses the ith parameter value in phi and dosing information of the ith infant.