Tutorials › Pharmacokinetic-Pharmacodynamic (PK/PD) Modeling › Weighted Fitting of Concentration-Effect Curves

Direct-Effect Models: Linear, Emax and Sigmoid Emax · Tutorial 29 of 598

Weighted Fitting of Concentration-Effect Curves

You will learn to fit direct-effect curves by weighting each observation according to its response variance, and to interpret how those weights alter estimates and influence.

Intermediate 12 min read

What You'll Learn

  • Define inverse-variance weights and the assumptions behind weighted least squares.
  • Derive the weighted least-squares objective from independent Gaussian observations.
  • Calculate a weighted slope for a linear concentration-effect model.
  • Estimate an Emax amplitude when baseline and EC50 are fixed.
  • Compare weighted and unweighted fitting, including a case where they favor different fits.
  • Identify variance misspecification, excessive influence, and other weighting pitfalls.

Why Weight Concentration-Effect Observations?

A concentration-effect data set may include observations with different levels of precision. For example, measurements at some concentrations may be more variable across replicates than measurements at others. Ordinary nonlinear least squares gives each residual the same squared-error weight. That is appropriate when residual variances are equal, but it can give imprecise observations undue influence when precision differs substantially. Weighted least squares makes the contribution of each observation depend on its variance.

The purpose of weighting is not to make the fitted curve pass closer to every point, nor to favor concentrations considered biologically important. It is to account for differences in measurement precision under a specified error model. The resulting curve can differ from an unweighted fit because the fitting criterion has changed.

Definition: Let \(Y_i\) be the observed response at concentration \(C_i\), and let \(f(C_i;\theta)\) be the direct-effect model prediction with parameter vector \(\theta\). If the residual variance for observation \(i\) is \(\sigma_i^2\), its inverse-variance weight is \(w_i=1/\sigma_i^2\). Weighted least squares estimates \(\theta\) by minimizing $$ Q_W(\theta)=\sum_{i=1}^{n} w_i\left[Y_i-f(C_i;\theta)\right]^2. $$ An observation with smaller variance receives a larger weight.

The weight has units inverse to response squared, so each term in \(Q_W\) is dimensionless. Multiplying all weights by the same positive constant does not change the minimizing parameter values: it multiplies the whole objective by that constant. Relative weights, not their absolute scale, determine the fit.

Assumptions and Justification

A standard justification follows from a model in which observations are independent and \(Y_i=f(C_i;\theta)+\varepsilon_i\), with \(\varepsilon_i\sim N(0,\sigma_i^2)\). Assume the variances are known, or are supplied as fixed estimates for the purpose of fitting. The joint log-likelihood, apart from constants, is $$ -\frac{1}{2}\sum_{i=1}^{n}\left[\log(\sigma_i^2)+\frac{\left(Y_i-f(C_i;\theta)\right)^2}{\sigma_i^2}\right]. $$ When the variances are fixed and do not depend on \(\theta\), the log-variance terms do not change as \(\theta\) changes. Maximizing this likelihood is therefore equivalent to minimizing \(Q_W(\theta)\), with \(w_i=1/\sigma_i^2\).

This justification depends on the variance information being appropriate and the observations being independent. Gaussian residuals give the exact likelihood interpretation; minimizing the weighted squared errors can still be used as a fitting criterion without Gaussian residuals, but its likelihood interpretation and efficiency claims then need additional justification. If observations are correlated, separate inverse-variance weights alone do not describe their joint uncertainty. Likewise, if the variances are themselves estimated, treating those estimates as fixed does not account for uncertainty in them.

For a direct-effect curve, use the model prediction appropriate to the analysis. For example, an Emax curve can be written \(f(C)=E_0+E_{\max}C/(EC_{50}+C)\), with the parameters interpreted according to the chosen parameterization. Weighting changes the objective used to estimate the parameters; it does not change the curve’s definition or the meaning of its parameters.

Worked Example: Weighted Slope for a Linear Effect

Hypothetical data. Suppose response is modeled as proportional to concentration with no intercept, \(f(C_i;s)=sC_i\). Three observations have concentrations \(1,2,3\) mg/L and responses \(1,5,5\) response units. Suppose their variances are \(1,4,1\) response-units squared, so the weights are \(1,1/4,1\). The linear model through the origin is the stated assumption here; this calculation does not establish that a zero intercept is appropriate for a particular application.

The objective is \(\sum_i w_i(Y_i-sC_i)^2\). Differentiating with respect to \(s\), setting the derivative to zero, and solving gives

$$ \hat{s}_W=\frac{\sum_i w_iC_iY_i}{\sum_i w_iC_i^2} =\frac{1(1)(1)+(1/4)(2)(5)+1(3)(5)} {1(1^2)+(1/4)(2^2)+1(3^2)} =\frac{18.5}{11} =1.682\ \text{response units per mg/L}. $$

The fitted responses are \(1.682\), \(3.364\), and \(5.045\) response units. The residuals, observed minus fitted, are \(-0.682\), \(1.636\), and \(-0.0455\) response units. Their weighted squared contributions are approximately \(0.465\), \(0.669\), and \(0.00207\), respectively. Thus the second observation contributes most to this objective: its residual is large enough to outweigh its smaller weight relative to the first observation.

For comparison, the unweighted through-origin estimate is \(\sum C_iY_i/\sum C_i^2=(1+10+15)/(1+4+9)=26/14=1.857\) response units per mg/L. The weighted estimate is lower because the observation at \(C=2\) mg/L, which pulls the unweighted estimate upward, has only one-quarter the weight of either other observation. Neither estimate is automatically preferable: the variance assumptions determine which fitting criterion is justified.

Weighted Estimation in an Emax Model

For nonlinear models, the same weighted objective applies, but parameters usually have to be estimated by numerical optimization. A useful special case makes the weighting calculation explicit. If baseline \(E_0\) and \(EC_{50}\) are fixed, the Emax prediction is linear in \(E_{\max}\). Define \(g_i=C_i/(EC_{50}+C_i)\); then the model is \(Y_i=E_0+E_{\max}g_i+\varepsilon_i\). Minimizing the weighted sum of squared residuals gives

$$ \hat{E}_{\max,W} =\frac{\sum_i w_i g_i(Y_i-E_0)}{\sum_i w_i g_i^2}. $$

This expression estimates only the amplitude with the other specified parameters held fixed. It is not a general closed-form solution for simultaneously estimating \(E_0\), \(E_{\max}\), and \(EC_{50}\). In the general case, a nonlinear optimizer minimizes \(Q_W(\theta)\); as in nonlinear least squares, the result can depend on parameter identifiability and successful optimization.

Worked Example: Weighted Emax Amplitude

Hypothetical data. Consider an Emax curve with fixed \(E_0=0\) response units and fixed \(EC_{50}=2\) mg/L. At concentrations \(1,2,6\) mg/L, suppose the responses are \(3,4,7\) response units, with variances \(1,4,1\) response-units squared. Thus the weights are \(1,1/4,1\), and the model fractions \(g_i\) are \(1/3,1/2,3/4\). The exercise estimates only \(E_{\max}\); it does not estimate or validate the fixed baseline or \(EC_{50}\).

Substitute these values in the weighted amplitude formula:

$$ \hat{E}_{\max,W} =\frac{1(1/3)(3)+(1/4)(1/2)(4)+1(3/4)(7)} {1(1/3)^2+(1/4)(1/2)^2+1(3/4)^2} =\frac{1+0.5+5.25}{1/9+1/16+9/16} =\frac{6.75}{53/72} =\frac{486}{53} =9.170\ \text{response units}. $$

Using the same fixed \(E_0\) and \(EC_{50}\), an unweighted estimate is \[ \hat{E}_{\max} =\frac{1+2+5.25}{1/9+1/4+9/16} =\frac{8.25}{133/144} =\frac{1188}{133} =8.932\ \text{response units}. \] The weighted estimate is higher because the middle-concentration observation, with variance four times as large as the other two, receives less influence. This difference is a consequence of the assumed variances, not evidence that weighting has uncovered a universally more correct parameter value.

How Weights Change Influence

Each observation’s direct contribution to the objective is \(w_i r_i^2\), where \(r_i=Y_i-f(C_i;\theta)\). A large residual does not necessarily imply a large contribution if its weight is small; conversely, even a modest residual can matter substantially when its weight is large. The local effect on the fitted parameters also depends on how the model prediction changes with each parameter at that concentration. Consequently, weights alter the balance of information across the response range, but do not by themselves guarantee that all parameters are well estimated.

Worked Example: Weighted and Unweighted Criteria Can Rank Fits Differently

Hypothetical comparison. Suppose responses at three ordered concentrations are \(2,4,6\) response units. Two candidate direct-effect fits predict, respectively, \((2,2,6)\) and \((1,4,5)\) response units. These predictions are used only to compare objective values; the example does not claim that either candidate is the fitted Emax curve for the data. Suppose the response variances are \(0.01,4,0.01\), giving weights \(100,0.25,100\).

For the first candidate, the residuals are \((0,2,0)\). Its unweighted sum of squared errors is \(0^2+2^2+0^2=4\), and its weighted objective is \(100(0^2)+0.25(2^2)+100(0^2)=1\). For the second candidate, the residuals are \((1,0,1)\). Its unweighted sum of squared errors is \(1+0+1=2\), but its weighted objective is \(100(1)+0.25(0)+100(1)=200\).

The unweighted criterion favors the second candidate, while the inverse-variance-weighted criterion strongly favors the first. Under the stated variance assumptions, the endpoint observations are much more precise, so their discrepancies count much more in the weighted objective. This example shows why reporting a fit without specifying whether and how it was weighted can leave its basis unclear.

Diagnostics, Alternatives, and Limitations

Before interpreting a weighted fit, check that the weights reflect plausible response variances on the scale being modeled. Replicate measurements can help estimate variability at a concentration, although estimates from few replicates can be unstable. A fitted curve should also be inspected in the original response scale and in standardized residuals \(r_i/\sigma_i\). If these standardized residuals show systematic concentration-related patterns, the mean curve or variance assumptions may be inadequate; weighting alone does not repair a misspecified concentration-effect relationship.

A high-precision observation can exert strong influence, especially when it lies in a concentration region that constrains a parameter. Check whether a small number of such observations dominate the objective or whether the estimated parameters change substantially under reasonable alternative variance estimates. A weight that is accidentally too large can pull the fit toward a single measurement. Weights should not be chosen after seeing which values produce a preferred biological conclusion.

ApproachCriterion or assumptionWhen it is appropriate
Unweighted least squaresMinimizes \(\sum_i r_i^2\); treats observations equally in response unitsWhen residual variances are reasonably equal, or equal weighting is the chosen fitting criterion
Inverse-variance weighted least squaresMinimizes \(\sum_i r_i^2/\sigma_i^2\)When observation-specific variances are known or credibly estimated and the independence assumption is reasonable
Likelihood with an estimated variance modelEstimates mean and variance components together under a specified likelihoodWhen variance is not known in advance and a defensible variance model is available

The likelihood approach is not simply equivalent to fixed-weight fitting when the variance parameters are also estimated: changing the variance parameters changes the likelihood as well as the residual scaling. The appropriate choice depends on what is known about the data-generating process. Weighted fitting also cannot resolve weak identifiability, poor concentration coverage, or confounding among Emax parameters; those issues remain even if the weights are correct.

Common pitfall: “The observation has the largest residual, so it must have the greatest effect on the weighted fit.” This is not generally true. Its objective contribution is \(w_i r_i^2\), and its effect on parameter estimates also depends on model sensitivity at that concentration. Compare weighted contributions and inspect the assumptions behind the weights rather than ranking observations by residual size alone.
1
Specify the mean curve.
Choose the direct-effect model and state which parameters are estimated or fixed.
2
Specify the variance information.
State whether variances are known or estimated, and set \(w_i=1/\sigma_i^2\) for the observations.
3
Fit and evaluate.
Minimize \(Q_W(\theta)\), then examine the curve and standardized residuals for lack of fit or excessive influence.
4
Report the criterion.
Describe the variance assumptions and distinguish weighted estimates from unweighted ones.

Check Your Understanding

Answer each question, then compare your reasoning with the brief solutions.

  1. If one observation has variance \(9\) response-units squared and another has variance \(1\), what are their inverse-variance weights, and which is larger?
  2. Why does multiplying every weight by the same positive constant leave the minimizing parameter values unchanged?
  3. In the fixed-baseline, fixed-\(EC_{50}\) Emax example, what quantity was estimated, and why was the formula a weighted linear-regression expression?
  4. Can an observation with a smaller residual contribute more to the weighted objective than one with a larger residual? State the condition using \(w_i r_i^2\).

Solutions. (1) The weights are \(1/9\) and \(1\), respectively; the observation with variance \(1\) has the larger weight. (2) A common positive multiplier scales the whole objective but does not change which parameter values minimize it. (3) Only \(E_{\max}\) was estimated. With baseline and \(EC_{50}\) fixed, the response is linear in \(E_{\max}\) through the known model fraction \(g_i\). (4) Yes. An observation with residual \(r_a\) contributes more than one with residual \(r_b\) when \(w_a r_a^2>w_b r_b^2\), regardless of which residual has greater absolute size.

Clinical Biostats