FormalPara Key Points

The R program can handle pharmacokinetic/pharmacodynamic data analysis.

Sample running with real data demonstrates satisfactory results.

The R program is freely available to use.

1 Introduction

Dose-finding studies occupy a central place in the clinical development of new drugs [1]. They are crucial for defining the optimal dose range of a new drug, i.e., the clinical recommended dose for achieving the optimal therapeutic effect [2]. Conventionally, the effective therapeutic dose is explored in clinical trials, which are usually divided into phase I, II, and III trials [3, 4]. However, this approach requires considerable time, resources, and effort. Moreover, ethical issues are frequently encountered. Properly designed and accurately performed in early dose-finding studies can reduce the number of volunteers required in double-blind phase II trials and in comparative large-scale phase III trials, as well as reducing time and cost [2]. Pharmacokinetic/pharmacodynamic link models are widely used in dose-finding studies [57] and can facilitate the design of early clinical trials [8]. Such models link dose–concentration relationships (pharmacokinetics) with concentration–effect relationships (pharmacodynamics) to predict the time course of drug effects resulting from a certain dosage regimen [9]. Based on these relationship and known pharmacokinetic parameters, predictions of the intensity and decay of the pharmacological effect are possible.

Various software packages can be employed in the dose-selection process, e.g., WinNonlin, NONMEM, DAS, and 3P87/97. 3P87/97 can handle a variety of linear and nonlinear pharmacokinetic models, but it is unable to perform pharmacodynamic modeling. Consequently, it cannot establish the concentration–response relationship, making it less beneficial in the dose-selection process. DAS is commonly used in China, because of its broad pharmacological calculation functionality, including pharmacokinetics, pharmacodynamics, and the dynamics of drug interactions, among others. WinNonlin is a sophisticated industry-standard tool for nonlinear modeling that is particularly suited to non-compartmental analysis and pharmacokinetic/pharmacodynamic modeling. It facilitates simulations to evaluate data from bioavailability and clinical pharmacology studies. However, WinNonlin and DAS can carry out pharmacokinetic/pharmacodynamic analysis only for individual subjects: they cannot deal with the inter-individual variability. More precisely, they do not have the capacity to perform stochastic simulation, which is a key feature of many dose-selection decisions. NONMEM, a nonlinear mixed-effect modeling tool, remains the commonly used computational package for population-level pharmacokinetic/pharmacodynamic analysis. Several population analysis methods that can manage inter-individual and intra-individual variability are available in NONMEM, e.g., the iterative two-stage method, stochastic approximation, and Markov-chain Monte Carlo Bayesian analysis. However, because NONMEM is written in Fortran language, running the program is difficult for many new users [10]. In addition, their high price limits the utilities of these packages for some researchers. To summarize, as a consequence of limited features, operational difficulties, high prices, and low accessibility, these commercial software packages either cannot meet the needs of dose-finding studies or are not available to some researchers [11].

R software has gained popularity recently because of  its powerful statistical techniques, support of object-oriented programming, and its accessibility for free of charge. The purpose of this study is to create a freely available R code package to support dose selection via a pharmacokinetic/pharmacodynamic link model. With this package, users enter experimental pharmacokinetic and pharmacodynamic data and, by changing a few user-specialized codes, can then quickly obtain the pharmacokinetic/pharmacodynamic parameters and a suggested effective therapeutic dosage. A clinical study is introduced to illustrate the operation of our R package. The package is validated by comparing parameters with those calculated using WinNonlin.

2 Materials and Methods

2.1 Phase I Study

The pharmacokinetic/pharmacodynamic data were obtained from a phase I clinical study on a new drug, pegylated recombinant human granulocyte colony-stimulating factor (PEG-G-CSF). It was a single-center, double-blind, dose-escalation, placebo-controlled study of single subcutaneous administration. The main inclusion criteria, exclusion criteria, ethical committee agreement, and all other important details can be found in Supplement 1. A total of 34 healthy subjects were randomly assigned to four different dosage groups: six healthy subjects each for the 30- and 200-μg/kg groups, and 11 healthy subjects each for the 60- and 100-μg/kg dosage groups. Each dosage group contained one placebo control who was excluded from the process of model fitting. Pharmacokinetic observations involved measuring the serum PEG-G-CSF concentration (ng/ml) immediately before administration and at 1, 3, 6, 8, 10, and 12 h and at 1, 2, 3, 4, 5, 6, 8, 10, 13, and 17 days after administration. Pharmacodynamic observations involved measuring the value of absolute neutrophil count (ANC, 109/l) before administration and at 3, 6, 8, 10, and 12 h and at 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 18, and 22 days after administration.

2.2 Data Analysis

We write a software package in R (Version 3.2.3, The R Foundation for Statistical Computing, Vienna, Austria) for pharmacokinetic/pharmacodynamic analysis. We use linear regression and linear least-squares methods for parameter estimation. To manage inter-individual variability (by modifying the model parameters), we adopt the standard two-stage (STS) approach. The potential recommended therapeutic dose can then be obtained using the sigmoid E max model. Finally, our software package is validated by comparing the model parameters obtained using our software and Phoenix WinNonlin (Build 6.1.0.173, Pharsight Corporation, Mountain View, CA, USA). The main steps of our algorithm are explained in the following sections, and the details are given in Supplement 2.

2.2.1 Parameter Estimation

The STS approach performs pharmacokinetic/pharmacodynamic analysis in two steps [13]. The first step involves fitting a model to individual data and estimation of the individual parameters, with no predefined relationship between different individuals in the population. These individual parameters are then used in the second step, in which the average parameters (mean) and variability (standard deviation, SD) in the population are calculated.

2.2.1.1 The First Step: Individual Data Fitting

A pharmacokinetic/pharmacodynamic link model is needed to analyze the relationship between drug concentration and effect for individual data. The model is formalized in the following equations:

$$C = f\left( {k;t} \right)$$
(1)
$$C_{e} = f\left( {k,k_{e} ;t} \right)$$
(2)
$$E = E_{0} + \frac{{E_{m} C_{e}^{\gamma } }}{{EC_{50}^{\gamma } + C_{e}^{\gamma } }}$$
(3)

where C and C e are the serum concentration in the central compartment and the effect compartment, and E is the effect of the drug. E 0 and E m are, respectively, the initial effect and the difference between the maximal effect and the initial effect, whereas EC50 is the concentration at 50 % maximal effect. γ is the binding coefficient and k is the vector of transfer rates, incorporating k 01, the transfer rate of drug from the site of absorption to the central compartment; k 10, the elimination rate from the central compartment; and k 12 and k 21, the transfer rates between the central compartment and the peripheral compartment. k e is the transfer rate from the central compartment to the effect compartment (or biophase).

We chose a compartment model for pharmacokinetic analysis and the sigmoid E max model for the pharmacodynamic analysis, because of their universality in the pharmacokinetic/pharmacodynamic link model [9]. We introduced an effect compartment to deal with the time lag between C and E [13, 14]. In other words, the relationship between C and E can be replaced by the relationship between C e and E. The latter relationship can be directly processed by the sigmoid E max model, and the pharmacokinetic and pharmacodynamic models are thereby linked [1518].

The two-compartment model is used to illustrate the algorithm in detail without loss of generality. The model is expressed as follows:

$$C = Le^{ - \alpha t} + Me^{ - \beta t} + Ne^{{ - k_{10} t}}$$
(1-1)
$$C_{e} = k_{e} Me^{{ - k_{e} t}} \left( {\frac{{e^{{\left( {k_{e} \text{ - }\alpha } \right)t}} - 1}}{{k_{e} \text{ - }\alpha }} + \frac{{e^{{\left( {k_{e} \text{ - }\beta } \right)t}} - 1}}{{k_{e} \text{ - }\beta }} + \frac{{e^{{\left( {k_{e} \text{ - }k_{01} } \right)t}} - 1}}{{k_{e} \text{ - }k_{01} }}} \right)$$
(2-1)
$$E = E_{0} + \frac{{E_{m} C_{e}^{\gamma } }}{{EC_{50}^{\gamma } + C_{e}^{\gamma } }}$$
(3-1)

Assume that the sample data are denoted as E and the respective observation time is denoted as T. After a value of k e is given, which is denoted as k e0, the pattern of the sigmoid E max model can be rewritten as:

$$\frac{{E_{m} }}{{E - E_{0} }} - 1 = \frac{{EC_{50}^{\gamma } }}{{EC_{50}^{\gamma } + C_{e}^{\gamma } }}$$
(3-2)

The following equation for C (e0,T), the concentration of effect compartment in a certain time, shows that the value of C is affected by k e0 and T:

$$C_{{\left( {e0,T} \right)}} = k_{e0} Me^{{ - k_{e0} T}} \left( {\frac{{e^{{\left( {k_{e0} \text{ - }\alpha } \right)T}} - 1}}{{k_{e0} \text{ - }\alpha }} + \frac{{e^{{\left( {k_{e0} \text{ - }\beta } \right)T}} - 1}}{{k_{e0} \text{ - }\beta }} + \frac{{e^{{\left( {k_{e0} \text{ - }k_{01} } \right)T}} - 1}}{{k_{e0} \text{ - }k_{01} }}} \right)$$
(2-2)

This equation is derived by integrating differential equations with the initial condition C e (0) = 0. The left side of Eq. (3–2) is always greater than 0 for the assumption E 0 = 0.95E min and E m  = 1.05E max. By taking the logarithm of both sides of the equation and denoting the left side as E 1, then \(\ln \left( {E_{1} } \right) = - \gamma \ln C_{{\left( {e0,T} \right)}} + \gamma \ln {\text{EC}}_{50}\) (3−3). The parameters of the above regression can be obtained by the linear least squares method. Denoting the regression vector \(\left( \begin{aligned} - \gamma \hfill \\ \gamma \ln {\text{EC}}_{50} \hfill \\ \end{aligned} \right) = \left( \begin{aligned} a \hfill \\ b \hfill \\ \end{aligned} \right)\), then

$${\text{EC}}_{50} = e^{{ - \frac{b}{a}}}$$
(4)

For k e0,

$$E = \frac{{E_{m} }}{{e^{{a\ln C_{{\left( {e0,T} \right)}} }} + 1}} + E_{0}$$
(5)

Because k e and k are usually the same order of magnitude, the interval for k e can be estimated as 0.5k < k e  < 10 k. For a step length of, say, 0.01, all the values close to k e can be tried. For instance, when k e  = 0.5 k, group (k e , EC50, γ)1 can be generated; when k e  = 0.5k + 0.01, group (k e , EC50, γ)2 can be generated, and so on. This procedure can be carried out easily on a personal computer. The value of k e that minimizes the sum of the squares of the error (SSE) of the effect is k e0, and the acceptable values of parameters are (k e0, EC50, γ). SSE is given by:

$${\text{SSE}} = \sum {\left( {E - \hat{E}} \right)^{2} }$$
(6)

where E is observed effect and \(\hat{E}\) is fitted effect.

2.2.1.2 The Second Step: Population Analysis

Population characteristics \(\hat{\beta }_{\text{STS}}\) and \(\hat{D}_{\text{STS}}\) of each parameter are estimated as the empirical mean (arithmetic or geometric) and variance of the individual parameters according to the following equations:

$$\hat{\beta }_{\text{STS}} = \frac{1}{N}\sum\limits_{j = 1}^{N} {\hat{\beta }_{j} }$$
(7)
$$\hat{D}_{\text{STS}} = \frac{1}{N}\sum\limits_{j = 1}^{N} {\left( {\hat{\beta }_{j} - \hat{\beta }_{\text{STS}} } \right)}^{2}$$
(8)

where \(\hat{\beta }_{j}\) is the estimate of individual parameter. The standard deviation (\(\hat{S}_{\text{STS}}\)) is estimated as the square root of \(\hat{D}_{\text{STS}}\). N − 1 can be used instead of N in the denominator of the variance estimate.

2.2.2 Computation of Appropriate Dosage

According to population pharmacokinetic/pharmacodynamic estimates, several groups of dosages and their corresponding effects can be produced. The relationship between them can be analyzed using the sigmoid E max model, whereas the parameters can be computed by linear transformation, as mentioned in Sect. 2.2.1. Accordingly, the dosage corresponding to a certain percentage of the maximum effect is taken as the appropriate dosage. The steps below show the algorithm for computing the potential recommended therapeutic dosage.

2.2.2.1 The First Step: Computing the Average Serum Concentration

The average serum concentration (C av), which is the average concentration of a drug between absorption and excretion, can be computed as follows:

$$C_{\text{av}} = \frac{\text{AUC}}{t}$$
(9)

where AUC is the area under the concentration–time curve. AUC can be calculated from the pharmacokinetic model by integrating the concentration over time. t is the clinically effective duration, which can be determined on the basis of clinical experience, and is normally the time when the drug concentration approaches zero.

2.2.2.2 The Second Step: Computing the Average Effect

The effect correlated to C av is E av. With all the parameters of the pharmacokinetic/pharmacodynamic link model have been generated, the effect can be computed once the concentration is given. Because the pharmacokinetic model gives the relationship between concentration and time, the t value that produces the smallest difference between C and C av can be considered as the equivalence time t av. Then, an equivalence concentration of the effect compartment, Ceav, can be computed as:

$${\text{Ce}}_{\text{av}} = k_{e0} e^{{ - k_{e0} t_{\text{av}} }} \left( {\frac{L}{{k_{e0} \text{ - }\alpha }}(e^{{\left( {k_{e0} \text{ - }\alpha } \right)t_{av} }} - 1) + \frac{M}{{k_{e0} \text{ - }\beta }}(e^{{\left( {k_{e0} \text{ - }\beta } \right)t_{\text{av}} }} - 1) + \frac{N}{{k_{e0} \text{ - }k_{10} }}(e^{{\left( {k_{e0} \text{ - }k_{01} } \right)t_{\text{av}} }} - 1)} \right)$$
(2-3)

where L, M, N, α, β, k 10, and k e0 are given by the pharmacokinetic model. Finally, E av can be computed as:

$$E_{\text{av}} = E_{0} + \frac{{E_{m} {\text{Ce}}_{\text{av}}^{\gamma } }}{{{\text{EC}}_{50}^{\gamma } + {\text{Ce}}_{\text{av}}^{\gamma } }}$$
(3-3)

where E 0 and E m , respectively, are the initial value of the effect and the range of the effect correlated to a certain dosage. EC50 and γ are given by the pharmacodynamic model.

2.2.2.3 The Third Step: Computing the Relationship Between C av and E av

The selection of a dosage is based on C avs and E avs, where s indicates different dosage groups. Each dosage D i (i = 1, 2, 3…) can be fitted by the sigmoid E max model. The parameters of the sigmoid E max model of C av and E av can be found in the same way, as data are fitted using the pharmacodynamic model. EC50 is given as one of the parameters of the model, and then EC90 (the concentration when the effect reaches 90 %) is given by:

$${\text{EC}}_{90} = e^{{\log {\text{EC}}_{50} + \log \left( {\frac{{E - E_{0} }}{{\left[ {E_{m} - \left( {E - E_{0} } \right)} \right]\gamma }}} \right)}}$$
(10)

where E 0 and E m are the initial value and range, respectively, of E avs. In most cases, E 0 is zero. The relationship between a given dose and the average concentration can then be established. The appropriate dosage D is usually set as the dose whose corresponding average concentration is close to EC90. In addition, researchers can determine the potential recommended dose by combining the model fitting results and clinical practice.

3 Results

The R code package written to perform the pharmacokinetic/pharmacodynamic analysis outlined in the above algorithm is given in the “Appendix”. The package contains four parts: data processing, parameter estimation, simulation, and model diagnostics. The results of each step as applied to the data generated in a clinical study are presented below.

Step 1:

Data Processing

All the relevant data generated by the clinical trial are put in a csv file, with observations recorded by columns giving patient ID, time, drug concentration, and the effect (lines 1–49).

Step 2:

Parameter Estimation

The algorithm for estimating the pharmacokinetic parameters k 01, k 10, k 12, and k 21; the pharmacodynamic parameters k e0, γ, and EC50; and the related C av and E av values for each individual in each dosage group were coded using the linear least-squares method in lines 50–153.

The Akaike information criterion (AIC) is applied to select whether the one-compartment model or the two-compartment model should be used. Consequently, the two-compartment model is chosen for the pharmacokinetic analysis, and the target time is set at 120 h, i.e., AUC0–120 is computed in our example. This time was selected, because the serum concentration of the drug is very small after 120 h. Consequently, 120 h was considered to be the clinically effective period for the drug PEG-G-CSF.

Step 3:

Simulation

Simulation of the clinical study data was performed in lines 154–326. The results fall into four categories: fitted concentration–time curves for each individual and comparison with the original data (Table 1; Fig. 1); fitted effect–time curves for each individual and a comparison with the original data (Table 2; Fig. 2); the relationship between C av and E av determined by the sigma E max model based on four dosages (Table 3; Fig. 3); and a linear relationship between the dose and AUC0–120 (Fig. 4). The final parameters are calculated by the population pharmacokinetic STS method, which produces mean value and SD of individual parameters in each dosage group (Table 4).

Table 1 Fitting results of each dosage of pegylated recombinant human granulocyte colony-stimulating factor by the pharmacokinetic model
Fig. 1
figure 1

Fitted results of our pharmacokinetic model for dosages of PEG-G-CSF 30, 60, 100, and 200 μg/kg (ad, respectively). The data points show the observed serum PEG-G-CSF concentrations for each individual. The dashed lines show the fitted curves for each individual. The solid line is the fitted concentration–time relationship of the population derived using the STS method. PEG-G-CSF pegylated recombinant human granulocyte colony-stimulating factor

Table 2 Fitting results of each dosage of pegylated recombinant human granulocyte colony-stimulating factor by the pharmacodynamic model
Fig. 2
figure 2

Fitted results of our pharmacodynamic model for dosages of pegylated recombinant human granulocyte colony-stimulating factor 30, 60, 100, and 200 μg/kg (ad, respectively). The data points show the observed effects (i.e., the absolute neutrophil counts, ANC) for each individual. The dashed lines show the fitted effect– time relationship for each individual. The solid line is the fitted effect–time relationship of the population derived using the STS method

Table 3 C av and E av of each dosage of pegylated recombinant human granulocyte colony-stimulating factor by the pharmacokinetic–pharmacodynamic model
Fig. 3
figure 3

Results of the average concentration (C av) and average effect (E av) determined by our pharmacokinetic/pharmacodynamic link model. The fitted curve shows the relationship between the concentration and effect based on the sigmoid E max model

Fig. 4
figure 4

Relationship between AUC0–120 and dosage. The dots represent the AUC0–120 of each individual in each dosage group. The line shows the fitted relationship between AUC0–120 and dosage

Table 4 Detailed comparison of R estimates with those of WinNonlin by pegylated recombinant human granulocyte colony-stimulating factor dosage

Note that the initial concentration is zero in the study. Because G-CSF is normally present in the human body at very low concentrations, we regard the pre-administration level as the background value. The observed concentrations (Table 1) have had this background value subtracted. The observed concentration/effect data presented in Tables 1 and 2 are mean values of the individual concentrations/effects in each dosage group. The predicted concentration/effect data were fitted with the STS method rather than simply using the mean concentration/effect to fit the model.

Step 4:

Model Diagnostics

The statistical criteria for evaluating the goodness-of-fit of the model, including the coefficient of determination (R 2), the AIC, and Bayesian information criterion (BIC), are calculated in lines 327–380. The results are presented in Table 4.

3.1 Estimation of the Potential Recommended Therapeutic Dosage

The potential recommended therapeutic dosage is usually taken as the dosage that can achieve a given percentage of E max (EC90 in this case). As shown in Fig. 4, there is a linear relationship between AUC0–120 (or C av) and dose (D). We obtain EC90 = 24.49 (ng/ml) by the sigmoid E max model. Considering individual diversity and optimizing the efficacy of the drug, we could select 60 μg/kg (which achieved 88.89 % of E max) as the potential recommended therapeutic dose on a weight basis, and 3.6 mg for a standard weight of 60 kg.

4 Discussion

4.1 Applicability of Our Pharmacokinetic/Pharmacodynamic Model

To set up a pharmacokinetic/pharmacodynamic link model to carry out dose exploration, it is necessary to select appropriate pharmacokinetic and pharmacodynamic models. Compartment models are widely used in pharmacokinetic analysis [19, 20], and we use AIC criteria to determine the selection of a one-compartment or a two-compartment model. We employ the two-compartment extravascular model for the pharmacokinetic analysis, because PEG-G-CSF is administered by subcutaneous injection, and its pharmacokinetics is compatible with the two-compartment model. Consequently, our software package is applicable only to extravascular administration and is not appropriate for intravascular administration. There are many other commonly used modeling methods, such as the non-compartmental model, that could have been used to calculate the pharmacokinetic parameters without assuming the number of compartments [21]. However, in the analysis of the pharmacokinetic/pharmacodynamic model, it is necessary to use a compartment model for pharmacokinetic analysis. As a preliminary exploration of a pharmacokinetic/pharmacodynamic link model coded in R, we select the classic compartment method without loss of generality.

With concentration and response data on the effect compartment, Several basic pharmacodynamic models, such as the fixed effect model, the linear model, the log–linear model, the E max model, and the sigmoid E max model, can be used to extract pharmacodynamic parameters from the concentration and response data [22]. As a generalization of the Emax model and an empirical function for describing the nonlinear concentration relationship, the sigmoid E max model is classical and is typically used [2327]. With the compartment model and the sigmoid E max model, the effect can be computed once the concentration is given [28]. Note that this characterization of the dose–concentration–effect relationship is essentially confined to drugs that have a direct correlation between the measured concentration and the observed effect [9]. It is not appropriate for drugs for which the peaks of concentration and effect are not reached concurrently. Consequently, we introduce an effect compartment to deal with the time lag between concentration and effect [13, 14].

To summarize, we adopt the commonly used and widely applicable compartment model and sigmoid E max model to establish a pharmacokinetic/pharmacodynamic link model. In future work, we will consider introducing alternative pharmacokinetic models, such as the non-compartment model, and alternative pharmacodynamic models, such as the mixed-effect model, to improve the flexibility and applicability of our package for pharmacokinetic/pharmacodynamic analysis.

4.2 Validation of Our Pharmacokinetic/Pharmacodynamic Analysis

There are several other pharmacological software packages that can perform pharmacokinetic/pharmacodynamic analysis. To validate our package, we compare our model parameters and model diagnostic statistics with those calculated by the widely used software WinNonlin. The pharmacokinetic model both in our package and in WinNonlin is a two-compartment model, and both use the sigmoid E max model for the pharmacodynamic analysis. Our algorithm is the linear least-squares approach, whereas the algorithm in WinNonlin is the Gauss–Newton method with the Levenberg and Hartley modification. A comparison of the two software packages is given in Table 4. For the four dosage groups, 20 of the 32 parameters calculated using our package are within 30 % difference of the values calculated using WinNonlin. The R 2 values for the goodness-of-fit of our model are all greater than 0.7. Moreover, the differences in R 2, AIC, and BIC between the two packages are all less than 40 %. Based on this comparison, we conclude that our package’s performance is satisfactory.

4.3 Limitations of Our Algorithm

Certainly, there are large differences for some parameters in Table 4. For example, the difference for E 0 in the 60 μg/kg group is greater than 55 %, and the difference for k 21 in the 100 μg/kg group is greater than 46 %. Moreover, all the goodness-of-fit statistics for the WinNonlin model are smaller than those for our model, which indicates that WinNonlin does a better job of model fitting. These differences result from the different algorithms used for model fitting. Our package uses linear least-squares method to estimate parameters. In our study, neither the compartment model nor the sigmoid E max model is fundamentally linear. We use a log algorithm to change them into a linear form to make them compatible with linear regression methods. Consequently, errors occur in the estimation of both pharmacokinetic and pharmacodynamic parameters. Furthermore, because the linear least-squares method is applied twice in the two-compartment model, the second step (based on the first step) enlarges the error. Nonlinear regression has some advantages compared with linear regression [2931]. If the process is inherently nonlinear, nonlinear regression (such as the Gauss–Newton method employed in WinNonlin) can describe it better than linear regression. We adopt linear least-squares regression for the preliminary exploration of pharmacokinetic/pharmacodynamic analysis, because of its simplicity and effectiveness. In future work, we may consider nonlinear methods to improve parameter estimation.

Another source of error is that the pharmacokinetics of biological products, such as PEG-G-CSF, exhibit relatively large inter-individual variability [32, 33]. The observed mean concentration/effect for individuals in each group presented in Tables 1 and 2 actually have large standard variation. Therefore, as we mentioned before, we adopt a typical population pharmacokinetic method, STS method rather than directly using the mean concentration/effect data, to estimate the model parameters and predict the concentration/effect. Therefore, despite fitting the population data well, our model would generate large errors (Tables 1, 2), because of the large variability of the observed data. The STS method is a simple approach for pooling individual estimates of the model parameters. However, simply calculating the mean and standard deviation of individual parameters tends to overestimate parameter dispersion. Moreover, if the modeling is performed with sparse data, the STS method may run into practically unidentifiable parameters or problems resulting from the model selection [34, 35]. Several advanced population pharmacokinetic methods can handle these inter-individual and intra-individual variabilities. These methods include the global two-stage method, the iterative two-stage method, the Bayesian two-stage method, the nonlinear mixed effects model, and nonparametric methods [36, 37]. We may consider incorporating some of these techniques into our package to improve the handling of inter-individual variability in the future.

4.4 Meaning for Drug Research

To ensure efficacy and safety, a key objective in new drug research is to estimate an effective therapeutic dose. If the dose is too low, treatment may prove ineffective. If the dose is too high, problems of safety and tolerability may arise [38]. Using pharmacokinetic/pharmacodynamic modeling in phase I clinical trials involving dose exploration can save a lot of time and resources. We aim to implement the complex pharmacokinetic/pharmacodynamic data fitting process by producing a software package that is compact, flexible, readily available, and can be widely used. R is fully free computational programming software that is becoming increasingly popular worldwide. Users of our package can import their pharmacokinetic/pharmacodynamic data and quickly obtain parameter estimates and the dose-exploration range.

5 Conclusions

Dose-finding studies are of great importance in clinical pharmacology, especially those studies dedicated to finding the dose that can achieve a certain percentage of the maximal treatment effect. Many current commercially available pharmacological analysis packages require a steep learning curve. We have shown that it is possible to model pharmacokinetic/pharmacodynamic data and address optimal dose problems in a package based on the R programming language. We present our algorithm and demonstrate the accessibility and feasibility of the package by modeling data obtained in a clinical study. The validation procedure implemented by the widely accepted software WinNonlin illustrates that our package is satisfactory. Although the package has limitations in respect of the types of pharmacokinetic/pharmacodynamic model and model fitting algorithm employed, we have created a simple, freely available tool to fit pharmacokinetic/pharmacodynamic data that can be used by those who do not have access to commercial pharmacological software. The next step in our research will address the limitations and make the R package more applicable.