delicatessen.estimating_equations.pharmacokinetics.ee_emax_ed
- ee_emax_ed(theta, dose, delta, ed50)
Estimating equation for the \(\delta\)-effective dose with the E-max model. The estimating equation is
\[\sum_{i=1}^n \left\{ \theta_z + \frac{(\theta_m - \theta_l) \theta_d}{\theta{50} + \theta_d} - \theta_m(1 - \delta) - \theta_z \delta \right\} = 0\]where \(\theta_d\) is the \(ED(\delta)\), and the other \(\theta\) are from a E-max model. For proper uncertainty estimation, this estimating equation should be stacked with the E-max model.
- Parameters
theta (int, float) – Theta value corresponding to the ED(delta).
dose (ndarray, list, vector) – 1-dimensional vector of n response values, used to construct correct shape for output.
delta (float) – The effective dose level of interest, ED(delta).
ed50 (float) – Estimated parameter for the ED50 from the PL.
- Returns
Returns a 1-by-n NumPy array evaluated for the input
theta.- Return type
array
Examples
Construction of a estimating equations for ED25 with
ee_loglogisticshould be done similar to the following>>> from delicatessen import MEstimator >>> from delicatessen.data import load_inderjit >>> from delicatessen.estimating_equations import ee_emax, ee_emax_ed
For demonstration, we use dose-response data from Inderjit et al. (2002), which can be loaded from
delicatessendirectly. Notice that here the response data is modified to correspond to the descrease in root length (since the E-max model assumes increase dose leads to increased response). This example is purely for illustration and one may not think this is the appopriately model for this context>>> d = load_inderjit() # Loading array of data >>> response = np.max(d[:, 0]) - d[:, 0] # Response data >>> dose = d[:, 1] # Dose data
Defining psi, or the stacked estimating equations
>>> def psi(theta): >>> e_model = ee_emax(theta=theta, X=dose, y=response) >>> ed_25 = ee_emax_ed(theta[3], dose=dose, delta=0.25, >>> ed50=theta[2]) >>> return np.vstack((e_model, >>> ed_25,))
Notice that the estimating equations are stacked in the order of the parameters in
theta(the first 3 belong to 3PL and the last belong to ED(25)).>>> estr = MEstimator(psi, init=[np.max(response), >>> (np.max(response)+np.min(response)) / 2, >>> (np.max(response)+np.min(response)) / 2, >>> (np.max(response)+np.min(response)) / 2]) >>> estr.estimate(solver='lm')
Inspecting the parameter estimates, variance, and confidence intervals
>>> estr.theta >>> estr.variance >>> estr.confidence_intervals()
Inspecting the parameter estimates
>>> estr.theta[0] # upper limit >>> estr.theta[1] # ED(50) >>> estr.theta[2] # steepness >>> estr.theta[3] # ED(25)
References
Bonate PL. Pharmacokinetic-Pharmacodynamic Modeling and Simulation 2nd edition. pg 153.